random returns a fake value from a provider and method, named as 'Provider.method', with the method’s arguments as named arguments:
{{random'Name.fullName'}}
{{random'Number.numberBetween'min=1max=100}}
{{random'Address.city'locale='de'}}
locale= works with every method and chooses the language of the value. cachedRandom takes the same names and arguments plus a key=, and returns the same value for the same key everywhere in one response. How to use them is in Fake data with random and cachedRandom.
A method some rows list more than once takes different sets of arguments; use any one of them.
A template writes every argument as text or a number. MockHub turns the text into what the method takes:
Argument type
Write
Example
A value set, listed below
One of its values, in any letter case
'earth'
timestamp
A moment in ISO 8601, in UTC
'2024-01-01T00:00:00Z'
time
A time of day
'09:00'
duration
Years, months or days in ISO 8601
'P1D'
list
Values separated by commas
'alpha,beta'
Address
Method
Arguments
Notes
Address.buildingNumber
None
Address.city
None
Address.cityName
None
Address.cityPrefix
None
Address.citySuffix
None
Address.country
None
Address.countryCode
None
Address.countyByZipCode
postCode text
Address.eircode
None
Address.fullAddress
None
Address.latitude
None
Address.latLon
None
Address.latLon (another form)
delimiter text
Address.longitude
None
Address.lonLat
None
Address.lonLat (another form)
delimiter text
Address.mailBox
None
Address.postcode
None
Address.secondaryAddress
None
Address.state
None
Address.stateAbbr
None
Address.streetAddress
None
Address.streetAddress (another form)
includeSecondary true/false
Address.streetAddressNumber
None
Address.streetName
None
Address.streetPrefix
None
Address.streetSuffix
None
Address.timeZone
None
Address.zipCode
None
Returns a String representing a standard 5-digit zip code.
Address.zipCodeByState
stateAbbr text
Address.zipCodePlus4
None
Returns a String representing a ZIP+4 code for greater geographic specificity.
Ancient
Method
Arguments
Notes
Ancient.god
None
Ancient.hero
None
Ancient.primordial
None
Ancient.titan
None
Animal
Method
Arguments
Notes
Animal.genus
None
Animal.name
None
Animal.scientificName
None
Animal.species
None
App
Method
Arguments
Notes
App.author
None
App.name
None
App.version
None
Appliance
Method
Arguments
Notes
Appliance.brand
None
Appliance.equipment
None
Artist
Method
Arguments
Notes
Artist.name
None
Australia
Method
Arguments
Notes
Australia.animals
None
Australia.locations
None
Australia.states
None
Aviation
Method
Arguments
Notes
Aviation.aircraft
None
Aviation.airline
None
Returns an airline name.
Aviation.airplane
None
Aviation.airport
None
Returns an airport ICAO code.
Aviation.airport (another form)
codeType AviationCodeType
Returns either 3-letter IATA code or 4-letter ICAO code of a random airport
Aviation.airportName
None
Aviation.armyHelicopter
None
Aviation.cargo
None
Aviation.civilHelicopter
None
Aviation.engineType
None
Provides engine type name.
Aviation.flight
type AviationCodeType
Returns a flight number (IATA or ICAO format).
Aviation.flight (another form)
None
Returns a flight number without specifying flight number format.
Aviation.flightStatus
None
Returns a flight status.
Aviation.gate
None
Returns a gate id.
Aviation.general
None
Aviation.manufacturer
None
Provides a name of an aviation-related manufacturer.
Aviation.METAR
None
Provides a METAR weather report.
Aviation.specialTypeDesignator
None
Provides an aircraft special type designator.
Aviation.uldCode
None
Returns an ULD IATA code(prefix).
Aviation.uldType
None
Returns an ULD type.
Aviation.warplane
None
Aws
Method
Arguments
Notes
Aws.accountId
None
Aws.acmARN
None
Aws.albARN
None
Aws.albTargetGroupARN
None
Aws.region
None
Aws.route53ZoneId
None
Aws.securityGroupId
None
Aws.service
None
Aws.subnetId
None
Aws.vpcId
None
Azure
Method
Arguments
Notes
Azure.applicationGateway
None
Azure.appServiceEnvironment
None
Azure.appServicePlan
None
Azure.bastionHost
None
Azure.containerApps
None
Azure.containerAppsEnvironment
None
Azure.containerInstance
None
Azure.containerRegistry
None
Azure.cosmosDBDatabase
None
Azure.firewall
None
Azure.keyVault
None
Azure.loadBalancer
None
Azure.loadTesting
None
Azure.logAnalytics
None
Azure.managementGroup
None
Azure.mysqlDatabase
None
Azure.networkSecurityGroup
None
Azure.postgreSQLDatabase
None
Azure.region
None
Azure.resourceGroup
None
Azure.serviceBus
None
Azure.serviceBusQueue
None
Azure.serviceBusTopic
None
Azure.springApps
None
Azure.sqlDatabase
None
Azure.staticWebApp
None
Azure.storageAccount
None
Azure.subscriptionId
None
Azure.tenantId
None
Azure.virtualMachine
None
Azure.virtualNetwork
None
Azure.virtualWan
None
Barcode
Method
Arguments
Notes
Barcode.ean13
None
Barcode.ean8
None
Barcode.gtin12
None
Barcode.gtin13
None
Barcode.gtin14
None
Barcode.gtin8
None
Barcode.type
None
BloodType
Method
Arguments
Notes
BloodType.aboTypes
None
Returns a ABO blood type
BloodType.bloodGroup
None
Returns a blood group such as O−, O+, A-, A+, B-, B+, AB-, AB+
BloodType.pTypes
None
Returns a P blood type
BloodType.rhTypes
None
Returns an Rh blood type
Book
Method
Arguments
Notes
Book.author
None
Book.genre
None
Book.publisher
None
Book.title
None
Bool
Method
Arguments
Notes
Bool.bool
None
Brand
Method
Arguments
Notes
Brand.car
None
Brand.sport
None
Brand.watch
None
Business
Method
Arguments
Notes
Business.creditCardExpiry
None
Business.creditCardNumber
None
Business.creditCardType
None
Business.securityCode
None
Camera
Method
Arguments
Notes
Camera.brand
None
Generates a random camera brand.
Camera.brandWithModel
None
Generates a random camera brand with a model.
Camera.model
None
Generates a random camera model.
Cannabis
Method
Arguments
Notes
Cannabis.brands
None
Cannabis.buzzwords
None
Cannabis.cannabinoidAbbreviations
None
Cannabis.cannabinoids
None
Cannabis.categories
None
Cannabis.healthBenefits
None
Cannabis.medicalUses
None
Cannabis.strains
None
Cannabis.terpenes
None
Cannabis.types
None
Cat
Method
Arguments
Notes
Cat.breed
None
Cat.name
None
Cat.registry
None
Chiquito
Method
Arguments
Notes
Chiquito.expressions
None
Chiquito.jokes
None
Chiquito.sentences
None
Chiquito.terms
None
CNPJ
Method
Arguments
Notes
CNPJ.invalid
None
Return invalid and formatted
CNPJ.invalid (another form)
formatted true/false
Return invalid and (un)formatted
CNPJ.invalid (another form)
formatted true/false, multiBranch true/false
Return invalid and (un)formatted.
CNPJ.valid
None
Return valid and formatted
CNPJ.valid (another form)
formatted true/false
Return valid and formatted
CNPJ.valid (another form)
formatted true/false, multiBranch true/false
Return valid and formatted.
Code
Method
Arguments
Notes
Code.asin
None
Code.ean13
None
Code.ean8
None
Code.gtin13
None
Code.gtin8
None
Code.imei
None
Code.isbn10
None
Code.isbn10 (another form)
separator true/false
Code.isbn13
None
Code.isbn13 (another form)
separator true/false
Code.isbnGroup
None
Code.isbnGs1
None
Code.isbnRegistrant
None
Coin
Method
Arguments
Notes
Coin.flip
None
Color
Method
Arguments
Notes
Color.hex
None
Color.hex (another form)
includeHashSign true/false
Color.name
None
Commerce
Method
Arguments
Notes
Commerce.brand
None
Commerce.department
None
Commerce.material
None
Commerce.price
None
Generate a random price between 0.00 and 100.00
Commerce.price (another form)
min decimal, max decimal
Commerce.productName
None
Commerce.promotionCode
None
Commerce.promotionCode (another form)
digits number
Commerce.vendor
None
Community
Method
Arguments
Notes
Community.character
None
Community.quote
None
Company
Method
Arguments
Notes
Company.bs
None
When a straight answer won't do, BS to the rescue!
Company.buzzword
None
Company.catchPhrase
None
Generate a buzzword-laden catch phrase.
Company.industry
None
Company.logo
None
Generate a random company logo url in PNG format.
Company.name
None
Company.profession
None
Company.suffix
None
Company.url
None
Compass
Method
Arguments
Notes
Compass.abbreviation
None
A compass point as an abbreviation, such as NE or NbW. Each call draws its own.
Compass.azimuth
None
A compass point in degrees, from 0 to 348.75 in steps of 11.25. Each call draws its own.
Compass.word
None
A compass point by name, such as northeast or north by west. Each call draws its own.
Computer
Method
Arguments
Notes
Computer.brand
None
Computer.linux
None
Computer.macos
None
Computer.operatingSystem
None
Computer.platform
None
Computer.type
None
Computer.windows
None
Construction
Method
Arguments
Notes
Construction.heavyEquipment
None
Construction.materials
None
Construction.roles
None
Construction.standardCostCodes
None
Construction.subcontractCategories
None
Construction.trades
None
Cosmere
Method
Arguments
Notes
Cosmere.allomancers
None
Cosmere.aons
None
Cosmere.feruchemists
None
Cosmere.heralds
None
Cosmere.knightsRadiant
None
Cosmere.metals
None
Cosmere.shards
None
Cosmere.shardWorlds
None
Cosmere.sprens
None
Cosmere.surges
None
Country
Method
Arguments
Notes
Country.capital
None
Returns a random capital city.
Country.countryCode2
None
Returns a random two-letter ISO 3166-1 alpha-2 country code in lowercase.
Country.countryCode3
None
Returns a random three-letter ISO 3166-1 alpha-3 country code in lowercase.
Country.currency
None
Country.currencyCode
None
Country.flag
None
Generates a URL pointing to the flag image of a random country.
Country.name
None
Returns a random country name.
CPF
Method
Arguments
Notes
CPF.invalid
None
Return invalid and formatted
CPF.invalid (another form)
formatted true/false
Return invalid and formatted
CPF.valid
None
Return valid and formatted
CPF.valid (another form)
formatted true/false
Return valid and formatted
Credentials
Method
Arguments
Notes
Credentials.password
None
Generates a password, only with lowercase letters, numbers and with length between 8 and 16 characters.
Credentials.password (another form)
includeDigit true/false
Generates a password, only with lowercase letters and optionally numbers with length between 8 and 16 characters.
Credentials.password (another form)
minimumLength number, maximumLength number
Generates a password, only with lowercase letters, numbers and with min and max length defined by the user.
Generates a password with lowercase letters, numbers and optionally uppercase letters and special characters and with min and max length defined by the user.
Generates a password with lowercase letters and optionally uppercase letters, numbers and special characters and with min and max length defined by the user.
Credentials.userId
None
Generates a user ID based on the regex pattern defined in the resource file.
Credentials.userId (another form)
regex text
Generates a user ID based on the provided regex pattern.
Credentials.username
None
A lowercase username composed of the first_name and last_name joined with a '.'.
Credentials.weakPassword
None
Returns a weak password from a pre-defined list of common weak passwords.
CryptoCoin
Method
Arguments
Notes
CryptoCoin.coin
None
CultureSeries
Method
Arguments
Notes
CultureSeries.books
None
CultureSeries.civs
None
CultureSeries.cultureShipClassAbvs
None
CultureSeries.cultureShipClasses
None
CultureSeries.cultureShips
None
CultureSeries.planets
None
DcComics
Method
Arguments
Notes
DcComics.hero
None
DcComics.heroine
None
DcComics.name
None
DcComics.title
None
DcComics.villain
None
Demographic
Method
Arguments
Notes
Demographic.demonym
None
Demographic.educationalAttainment
None
Demographic.maritalStatus
None
Demographic.race
None
Demographic.sex
None
Device
Method
Arguments
Notes
Device.manufacturer
None
Device.modelName
None
Device.platform
None
Device.serial
None
Dog
Method
Arguments
Notes
Dog.age
None
Dog.breed
None
Dog.coatLength
None
Dog.gender
None
Dog.memePhrase
None
Dog.name
None
Dog.size
None
Dog.sound
None
Domain
Method
Arguments
Notes
Domain.firstLevelDomain
name text
First level domain string.
Domain.fullDomain
name text
Full domain string.
Domain.secondLevelDomain
name text
Second level domain string.
Domain.validDomain
name text
Return a random valid domain.
DrivingLicense
Method
Arguments
Notes
DrivingLicense.drivingLicense
stateAbbreviation text
Drone
Method
Arguments
Notes
Drone.batteryCapacity
None
Drone.batteryType
None
Drone.batteryVoltage
None
Drone.batteryWeight
None
Drone.chargingTemperature
None
Drone.flightTime
None
Drone.iso
None
Drone.maxAltitude
None
Drone.maxAngularVelocity
None
Drone.maxAscentSpeed
None
Drone.maxChargingPower
None
Drone.maxDescentSpeed
None
Drone.maxFlightDistance
None
Drone.maxResolution
None
Drone.maxShutterSpeed
None
Drone.maxSpeed
None
Drone.maxTiltAngle
None
Drone.maxWindResistance
None
Drone.minShutterSpeed
None
Drone.name
None
Drone.operatingTemperature
None
Drone.photoFormat
None
Drone.shutterSpeedUnits
None
Drone.videoFormat
None
Drone.weight
None
DungeonsAndDragons
Method
Arguments
Notes
DungeonsAndDragons.alignments
None
DungeonsAndDragons.backgrounds
None
DungeonsAndDragons.cities
None
DungeonsAndDragons.klasses
None
DungeonsAndDragons.languages
None
DungeonsAndDragons.meleeWeapons
None
DungeonsAndDragons.monsters
None
DungeonsAndDragons.races
None
DungeonsAndDragons.rangedWeapons
None
Educator
Method
Arguments
Notes
Educator.campus
None
Educator.course
None
Educator.secondarySchool
None
Educator.subjectWithNumber
None
Educator.university
None
ElectricalComponents
Method
Arguments
Notes
ElectricalComponents.active
None
ElectricalComponents.electromechanical
None
ElectricalComponents.passive
None
Emoji
Method
Arguments
Notes
Emoji.cat
None
Emoji.smiley
None
Emoji.vehicle
None
FakeDuration
Method
Arguments
Notes
FakeDuration.atMostDays
daysMax number
Returns a Duration object representing a random duration of days in the given range
FakeDuration.atMostHours
hoursMax number
Returns a Duration object representing a random duration of hours in the given range
FakeDuration.atMostMinutes
minutesMax number
Returns a Duration object representing a random duration of minutes in the given range
FakeDuration.atMostSeconds
secondsMax number
Returns a Duration object representing a random duration of seconds in the given range
FamousLastWords
Method
Arguments
Notes
FamousLastWords.lastWords
None
Generates random famous last words.
File
Method
Arguments
Notes
File.extension
None
File.fileName
None
File.fileName (another form)
dirOrNull text, nameOrNull text, extensionOrNull text, separatorOrNull text
File.mimeType
None
Finance
Method
Arguments
Notes
Finance.bic
None
Generates a random Business Identifier Code (BIC) compliant with ISO 9362.
Finance.creditCard
creditCardType CreditCardType
Generates a random credit card number of the specified type.
Finance.creditCard (another form)
None
Generate a random credit card number of a random type.
Finance.iban
None
Generates a random IBAN (International Bank Account Number).
Finance.iban (another form)
countryCode text
Generates an IBAN for the given country code.
Finance.usRoutingNumber
None
Generates a random US bank routing number of 9 characters.
Returns a port number between from and to (inclusive)
Internet.privateIpV4Address
None
Internet.publicIpV4Address
None
Internet.safeEmailAddress
None
Internet.safeEmailAddress (another form)
name text
Returns an email address based on the provided name and a safe domain (from "internet.safe_email").
Internet.slug
None
Internet.slug (another form)
wordsOrNull list, glueOrNull text
Internet.url
None
Returns a string representing a web URL, randomly including: http/https scheme, port, path elements (2 or none), file element (1 or none), params (2 or none), anchor (1 or none).
For example, expression text(5, 15, true, false, true generates a random string of length 5 to 15 containing at least one upper case letter and at least one digit.
Text.uppercaseCharacter
None
Time
Method
Arguments
Notes
Time.between
from time, to time
Generates a random time between two times.
Time.between (another form)
from time, to time, pattern text
Generates a string representation of a random time between two times.