Use dynamic variables to return randomly generated data

The Faker library enables you to generate sample data in Postman using predefined variables. Use these variables just like you would any other variable in Postman. Their values are generated at the time of execution, and their names start with a $ symbol, for example, $guid or $timestamp.

Collections icon See how to use dynamic variables to create randomized mock data. To try out this collection template, select Mock data generation.

The following is a list of dynamic variables whose values are randomly generated during the request/collection run.

To use dynamic variables in pre-request or post-response scripts, you need to use pm.variables.replaceIn(), for example pm.variables.replaceIn('{{$randomFirstName}}').

Common

Variable NameDescriptionExamples
$guidA uuid-v4 style guid"611c2e81-2ccb-42d8-9ddc-2d0bfa65c1b4"
"3a721b7f-7dc9-4c45-9777-516942b98e0d"
"22eca807-006b-47df-9511-e92e37f5071a"
$timestampThe current UNIX timestamp in seconds1562757107, 1562757108, 1562757109
$isoTimestampThe current ISO timestamp at zero UTC2020-06-09T21:10:36.177Z
2019-10-21T06:05:50.000Z
2019-07-29T18:29:00.000Z
$randomUUIDA random 36-character UUID"6929bb52-3ab2-448a-9796-d6480ecad36b"
"53151b27-034f-45a0-9f0a-d7b6075b67d0"
"727131a2-2717-44ad-ab02-006587e947dc"

Text, numbers, and colors

Variable NameDescriptionExamples
$randomAlphaNumericA random alpha-numeric character6, "y", "z"
$randomBooleanA random boolean valuetrue, false
$randomIntA random integer between 0 and 1000802, 494, 200
$randomColorA random color"red", "fuchsia", "grey"
$randomHexColorA random hex value"#47594a", "#431e48", "#106f21"
$randomAbbreviationA random abbreviationSQL, PCI, JSON

Internet and IP addresses

Variable NameDescriptionExamples
$randomIPA random IPv4 address241.102.234.100, 216.7.27.38
$randomIPV6A random IPv6 addressdbe2:7ae6:119b:c161:1560:6dda:3a9b:90a9
c482:23a4:ce4c:a668:7736:6cc5:b0b6:cc37
c791:18d1:fbba:87d8:d929:22aa:5a0a:ac3d
$randomMACAddressA random MAC address33:d4:68:5f:b4:c7, 1f:6e:db:3d:ed:fa
$randomPasswordA random 15-character alpha-numeric passwordt9iXe7COoDKv8k3, QAzNFQtvR9cg2rq
$randomLocaleA random two-letter language code (ISO 639-1)"ny", "sr", "si"
$randomUserAgentA random user agentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.9.8; rv:15.6) Gecko/20100101 Firefox/15.6.6
Opera/10.27 (Windows NT 5.3; U; AB Presto/2.9.177 Version/10.00)
Mozilla/5.0 (Windows NT 6.2; rv:13.5) Gecko/20100101 Firefox/13.5.6
$randomProtocolA random internet protocol"http", "https"
$randomSemverA random semantic version number7.0.5, 2.5.8, 6.4.9

Names

Variable NameDescriptionExamples
$randomFirstNameA random first nameEthan, Chandler, Megane
$randomLastNameA random last nameSchaden, Schneider, Willms
$randomFullNameA random first and last nameConnie Runolfsdottir, Sylvan Fay, Jonathon Kunze
$randomNamePrefixA random name prefixDr., Ms., Mr.
$randomNameSuffixA random name suffixI, MD, DDS

Profession

Variable NameDescriptionExamples
$randomJobAreaA random job areaMobility, Intranet, Configuration
$randomJobDescriptorA random job descriptorForward, Corporate, Senior
$randomJobTitleA random job titleInternational Creative Liaison,
Product Factors Officer,
Future Interactions Executive
$randomJobTypeA random job typeSupervisor, Manager, Coordinator

Phone, address, and location

Variable NameDescriptionExamples
$randomPhoneNumberA random ten-digit phone number700-008-5275, 494-261-3424, 662-302-7817
$randomPhoneNumberExtA random phone number with extension (12 digits)27-199-983-3864, 99-841-448-2775
$randomCityA random city nameSpinkahaven, Korbinburgh, Lefflerport
$randomStreetNameA random street nameKuhic Island, General Street, Kendrick Springs
$randomStreetAddressA random street address5742 Harvey Streets, 47906 Wilmer Orchard
$randomCountryA random countryLao People's Democratic Republic, Kazakhstan, Austria
$randomCountryCodeA random two-letter country code (ISO 3166-1 alpha-2)CV, MD, TD
$randomLatitudeA random latitude coordinate55.2099, 27.3644, -84.7514
$randomLongitudeA random longitude coordinate40.6609, 171.7139, -159.9757

Images

Variable NameDescriptionExamples
$randomAvatarImageA random avatar imagehttps://s3.amazonaws.com/uifaces/faces/twitter/johnsmithagency/128.jpg
https://s3.amazonaws.com/uifaces/faces/twitter/xadhix/128.jpg
https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg
$randomImageUrlA URL of a random imagehttp://lorempixel.com/640/480
$randomAbstractImageA URL of a random abstract imagehttp://lorempixel.com/640/480/abstract
$randomAnimalsImageA URL of a random animal imagehttp://lorempixel.com/640/480/animals
$randomBusinessImageA URL of a random stock business imagehttp://lorempixel.com/640/480/business
$randomCatsImageA URL of a random cat imagehttp://lorempixel.com/640/480/cats
$randomCityImageA URL of a random city imagehttp://lorempixel.com/640/480/city
$randomFoodImageA URL of a random food imagehttp://lorempixel.com/640/480/food
$randomNightlifeImageA URL of a random nightlife imagehttp://lorempixel.com/640/480/nightlife
$randomFashionImageA URL of a random fashion imagehttp://lorempixel.com/640/480/fashion
$randomPeopleImageA URL of a random image of a personhttp://lorempixel.com/640/480/people
$randomNatureImageA URL of a random nature imagehttp://lorempixel.com/640/480/nature
$randomSportsImageA URL of a random sports imagehttp://lorempixel.com/640/480/sports
$randomTransportImageA URL of a random transportation imagehttp://lorempixel.com/640/480/transport
$randomImageDataUriA random image data URIdata:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22undefined%22%20height%3D%22undefined%22%3E%20%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22grey%22%2F%3E%20%20%3Ctext%20x%3D%220%22%20y%3D%2220%22%20font-size%3D%2220%22%20text-anchor%3D%22start%22%20fill%3D%22white%22%3Eundefinedxundefined%3C%2Ftext%3E%20%3C%2Fsvg%3E

Finance

Variable NameDescriptionExamples
$randomBankAccountA random 8-digit bank account number09454073, 65653440, 75728757
$randomBankAccountNameA random bank account nameHome Loan Account, Checking Account, Savings Account. Auto Loan Account
$randomCreditCardMaskA random masked credit card number3622, 5815, 6257
$randomBankAccountBicA random BIC (Bank Identifier Code)EZIAUGJ1, KXCUTVJ1, DIVIPLL1
$randomBankAccountIbanA random 15-31 character IBAN (International Bank Account Number)MU20ZPUN3039684000618086155TKZ
BR7580569810060080800805730W2
XK241602002200395017
$randomTransactionTypeA random transaction typeinvoice, payment, deposit
$randomCurrencyCodeA random 3-letter currency code (ISO-4217)CDF, ZMK, GNF
$randomCurrencyNameA random currency nameCFP Franc, Cordoba Oro, Pound Sterling
$randomCurrencySymbolA random currency symbol$, £
$randomBitcoinA random bitcoin address3VB8JGT7Y4Z63U68KGGKDXMLLH5
1GY5TL5NEX3D1EA0TCWPLGVPQF5EAF
14IIEXV2AKZAHSCY2KNYP213VRLD

Business

Variable NameDescriptionExamples
$randomCompanyNameA random company nameJohns - Kassulke, Grady LLC
$randomCompanySuffixA random company suffixInc, LLC, Group
$randomBsA random phrase of business speakkiller leverage schemas,
bricks-and-clicks deploy markets,
world-class unleash platforms
$randomBsAdjectiveA random business speak adjectiveviral, 24/7, 24/365
$randomBsBuzzA random business speak buzzwordrepurpose, harness, transition
$randomBsNounA random business speak noune-services, markets, interfaces

Catchphrases

Variable NameDescriptionExamples
$randomCatchPhraseA random catchphraseFuture-proofed heuristic open architecture,
Quality-focused executive toolset,
Grass-roots real-time definition
$randomCatchPhraseAdjectiveA random catchphrase adjectiveSelf-enabling, Business-focused, Down-sized
$randomCatchPhraseDescriptorA random catchphrase descriptorbandwidth-monitored, needs-based, homogeneous
$randomCatchPhraseNounRandomly generates a catchphrase nounsecured line, superstructure,installation

Databases

Variable NameDescriptionExamples
$randomDatabaseColumnA random database column nameupdatedAt, token, group
$randomDatabaseTypeA random database typetinyint, text
$randomDatabaseCollationA random database collationcp1250_bin, utf8_general_ci, cp1250_general_ci
$randomDatabaseEngineA random database engineMyISAM, InnoDB, Memory

Dates

Variable NameDescriptionExamples
$randomDateFutureA random future datetimeTue Mar 17 2020 13:11:50 GMT+0530 (India Standard Time),
Fri Sep 20 2019 23:51:18 GMT+0530 (India Standard Time),
Thu Nov 07 2019 19:20:06 GMT+0530 (India Standard Time)
$randomDatePastA random past datetimeSat Mar 02 2019 09:09:26 GMT+0530 (India Standard Time),
Sat Feb 02 2019 00:12:17 GMT+0530 (India Standard Time),
Thu Jun 13 2019 03:08:43 GMT+0530 (India Standard Time)
$randomDateRecentA random recent datetimeTue Jul 09 2019 23:12:37 GMT+0530 (India Standard Time),
Wed Jul 10 2019 15:27:11 GMT+0530 (India Standard Time),
Wed Jul 10 2019 01:28:31 GMT+0530 (India Standard Time)
$randomWeekdayA random weekdayThursday, Friday, Monday
$randomMonthA random monthFebruary, May, January

Domains, emails, and usernames

Variable NameDescriptionExamples
$randomDomainNameA random domain namegracie.biz, armando.biz, trevor.info
$randomDomainSuffixA random domain suffixorg, net, com
$randomDomainWordA random unqualified domain namegwen, jaden, donnell
$randomEmailA random email addressPablo62@gmail.com, Ruthe42@hotmail.com, Iva.Kovacek61@hotmail.com
$randomExampleEmailA random email address from an "example" domainTalon28@example.com, Quinten_Kerluke45@example.net, Casey81@example.net
$randomUserNameA random usernameJarrell.Gutkowski, Lottie.Smitham24, Alia99
$randomUrlA random URLhttps://anais.net, https://tristin.net, http://jakob.name

Files and directories

Variable NameDescriptionExamples
$randomFileNameA random file name (includes uncommon extensions)neural_sri_lanka_rupee_gloves.gdoc,
plastic_awesome_garden.tif,
incredible_ivory_agent.lzh
$randomFileTypeA random file type (includes uncommon file types)model, application, video
$randomFileExtA random file extension (includes uncommon extensions)war, book, fsc
$randomCommonFileNameA random file namewell_modulated.mpg4,
rustic_plastic_tuna.gif,
checking_account_end_to_end_robust.wav
$randomCommonFileTypeA random, common file typeapplication, audio
$randomCommonFileExtA random, common file extensionm2v, wav, png
$randomFilePathA random file path/home/programming_chicken.cpio,
/usr/obj/fresh_bandwidth_monitored_beauty.onetoc,
/dev/css_rustic.pm
$randomDirectoryPathA random directory path/usr/bin, /root, /usr/local/bin
$randomMimeTypeA random MIME typeaudio/vnd.vmx.cvsd,
application/vnd.groove-identity-message,
application/vnd.oasis.opendocument.graphics-template

Stores

Variable NameDescriptionExamples
$randomPriceA random price between 0.00 and 1000.00531.55, 488.76, 511.56
$randomProductA random productTowels, Pizza, Pants
$randomProductAdjectiveA random product adjectiveUnbranded, Incredible, Tasty
$randomProductMaterialA random product materialSteel, Plastic, Frozen
$randomProductNameA random product nameHandmade Concrete Tuna, Refined Rubber Hat
$randomDepartmentA random commerce categoryTools, Movies, Electronics

Grammar

Variable NameDescriptionExamples
$randomNounA random nounmatrix, bus, bandwidth
$randomVerbA random verbparse, quantify, navigate
$randomIngverbA random verb ending in -ingsynthesizing, navigating, backing up
$randomAdjectiveA random adjectiveauxiliary, multi-byte, back-end
$randomWordA random wordwithdrawal, infrastructures, IB
$randomWordsSome random wordsSamoa Synergistic sticky copying Grocery,
Corporate Springs,
Christmas Island Ghana Quality
$randomPhraseA random phraseYou can't program the monitor without navigating the mobile XML program!,
overriding the capacitor won't do anything, we need to compress the optical SMS transmitter!,
I'll generate the virtual AI program, that should microchip the RAM monitor!

Lorem ipsum

Variable NameDescriptionExamples
$randomLoremWordA random word of lorem ipsum textest
$randomLoremWordsSome random words of lorem ipsum textvel repellat nobis
$randomLoremSentenceA random sentence of lorem ipsum textMolestias consequuntur nisi non quod.
$randomLoremSentencesA random 2 to 6 sentences of lorem ipsum textEt sint voluptas similique iure amet perspiciatis vero sequi atque. Ut porro sit et hic. Neque aspernatur vitae fugiat ut dolore et veritatis. Ab iusto ex delectus animi. Voluptates nisi iusto. Impedit quod quae voluptate qui.
$randomLoremParagraphA random paragraph of lorem ipsum textAb aliquid odio iste quo voluptas voluptatem dignissimos velit. Recusandae facilis qui commodi ea magnam enim nostrum quia quis. Nihil est suscipit assumenda ut voluptatem sed. Esse ab voluptas odit qui molestiae. Rem est nesciunt est quis ipsam expedita consequuntur.
$randomLoremParagraphs3 random paragraphs of lorem ipsum textVoluptatem rem magnam aliquam ab id aut quaerat. Placeat provident possimus voluptatibus dicta velit non aut quasi. Mollitia et aliquam expedita sunt dolores nam consequuntur. Nam dolorum delectus ipsam repudiandae et ipsam ut voluptatum totam. Nobis labore labore recusandae ipsam quo.


Voluptatem occaecati omnis debitis eum libero. Veniam et cum unde. Nisi facere repudiandae error aperiam expedita optio quae consequatur qui. Vel ut sit aliquid omnis. Est placeat ducimus. Libero voluptatem eius occaecati ad sint voluptatibus laborum provident iure.

Autem est sequi ut tenetur omnis enim. Fuga nisi dolor expedita. Ea dolore ut et a nostrum quae ut reprehenderit iste. Numquam optio magnam omnis architecto non. Est cumque laboriosam quibusdam eos voluptatibus velit omnis. Voluptatem officiis nulla omnis ratione excepturi.

$randomLoremTextA random amount of lorem ipsum textQuisquam asperiores exercitationem ut ipsum. Aut eius nesciunt. Et reiciendis aut alias eaque. Nihil amet laboriosam pariatur eligendi. Sunt ullam ut sint natus ducimus. Voluptas harum aspernatur soluta rem nam.
$randomLoremSlugA random lorem ipsum URL slugeos-aperiam-accusamus, beatae-id-molestiae, qui-est-repellat
$randomLoremLines1 to 5 random lines of lorem ipsumDucimus in ut mollitia.
A itaque non.
Harum temporibus nihil voluptas.
Iste in sed et nesciunt in quaerat sed.

Last modified: 2020/09/04