Postman Dynamic Variables

Dynamic variable, as the name suggests, generates random data to your API requests and collection run. It is like a random library in a programming language. It generates random data each time in response like a random number, alphabets, alphanumeric or color, etc.

A dynamic variable name starts with '$.' In the request URL section, a dynamic variable should be written in {{__}} format.

Let's say you have to pass an integer number from 1 to 1000, so for that, you need to add {{$randomInt}}.

Like the above example of the number variable, Postman supports so many other dynamic variables as well.

Some important Dynamic Variables are

Numbers, Texts and Colors

Variable NameDescription
$randomAlphaNumericA random alphanumeric character
$randomIntA random integer between 1 and 1000
$randomColorA random color
$randomHexColorA random hex value
$randomAbbreviationA random abbreviation
$randomBooleanA random boolean value like true or false

Address, Location, Phone

Variable NameDescription
$randomCountryA random country
$randomCountryCodeRandom country code of two letters (ISO 3166-1 alpha-2)
$randomCityA random city name
$randomStreetNameA random street name
$randomStreetAddressA random street address
$randomLatitudeA random latitude coordinate
$randomLongitudeA random longitude coordinate
$randomPhoneNumberA random 10-digit phone number
$randomPhoneNumberExtA random phone number with an extension of 12 digits

Profession

Variable NameDescription
$randomJobTypeA random job type
$randomJobTitleA random job title
$randomJobDescriptorA random job descriptor
$randomJobAreaA random job area

Names

Variable NameDescription
$randomFullNameA random first and last name
$randomNamePrefixA random name prefix
$randomNameSuffixA random name suffix
$randomFirstNameA random first name
$randomLastNameA random, last name

Dates

Variable NameDescription
$randomWeekdayA random weekday
$randomMonthA random month
$randomDateRecentA random recent datetime
$randomDateFutureA random future datetime
$randomDatePastA random past datetime

Databases

Variable NameDescription
$randomDatabaseTypeA random database type
$randomDatabaseCollationA random database collection
$randomDatabaseColumnA random database column name

Domains, Username, and Emails

Variable NameDescription
$randomUrlA random URL
$randomUserNameA random username
$randomEmailA random email address
$randomDomainNameA random domain name
$randomDomainSuffixA random domain suffix

Internet and IP address

Variable NameDescription
$randomIPA random IPv4 address
$randomIPV6A random IPv6 address
$randomPasswordA random alphanumeric password of 15-character
$randomUserAgentA random user agent
$randomProtocolA random internet protocol
$randomMACAddressA random MAC address

Files and Directories

Variable NameDescription
$randomCommonFileNameA random file name
$randomFileNameA random file name (includes uncommon extensions)
$randomFileExtA random file extension (includes uncommon extensions)
$randomFileTypeA random file type including uncommon file types
$randomCommonFileTypeA random, common file type
$randomCommonFileExtA random, common file extension
$randomDirectoryPathA random directory path

Images

Variable NameDescription
$randomImageA random image
$randomImageUrlA URL for a random image
$randomAnimalsImageA URL for a random animal image
$randomCityImageA URL for a random city image
$randomFoodImageA URL for a random food image
$randomTransportImageA URL for a random transportation image
$randomSportsImageA URL for a random sports image
$randomTechnicsImageA URL for a random tech image

Business

Variable NameDescription
$randomCompanyNameA random company name
$randomCompanySuffixA random company suffix (e.g., Inc, LLC, Group)
$randomBsA random phrase of business-speak

Finance

Variable NameDescription
$randomCurrencyNameA random currency name
$randomCurrencySymbolA random currency symbol
$randomCurrencyCodeA random 3-letter currency code (ISO-4217)
$randomBitcoinA random bitcoin address
$randomTransactionTypeA random transaction type (e.g., invoice, payment, deposit)
$randomBankAccountA random bank account number of 8-digit
$randomBankAccountNameA random bank account name (e.g., savings account, checking account)





Latest Courses