API Genie makes realistic values (names, emails, addresses, IBANs, dates…) with its own faker
library. Its providers are named like those of faker.js
(person.firstName, internet.email) and are used by:
- the
x-faker (or x-apigenie-mock-faker) extension of schemas, in
apigenie-server and
data;
@mock(faker:, args:) and graphql.fields.<field>.faker of the GraphQL mock;
fake(name, ...arguments) of mock scripts and {{fake:name}} of gRPC templates;
- smart names: string properties called like
email, first_name or city.
Arguments
A provider takes arguments by position or by name, and checks them: an argument it doesn’t take,
of the wrong type, out of its bounds or not one of its choices is an error naming the provider
and the parameter (faker: number.int: parameter min: expects an integer, not a string).
properties:
owner: {type: string, x-faker: person.fullName}
age: {type: integer, x-faker: {number.int: [18, 90]}}
code: {type: string, x-faker: {string.alpha: {length: 6, casing: upper}}}
email:
type: string
x-faker: {provider: internet.email, args: [Ada, Lovelace], options: {provider: example.org}}
Arguments are numbers, strings and booleans. Whole numbers given as decimals (JavaScript and
YAML give 6.0) are integers.
Records
Some providers make related values together, as a record (an object): person.profile (a person’s
sex, first and last names of that sex, full name, a username made of the names, an email of that
username and an adult’s birth date), location.address (an address of one country, with its code
and a time zone of it; city, state and postal code are of the country but not of each other),
finance.card (an issuer’s number, verification value length and expiration),
finance.currency and commerce.product. A record is an object in JSON responses and data, and
its JSON text where the schema wants a string.
Countries
Names exist for 61 countries; addresses and phone numbers for 15 of them (US, PL, FR, DE, IT, RU,
IN, FI, ES, CZ, UA, DK, BR, AU and EE). Providers taking a country use the USA’s data when not
given one, except IBANs, BICs and national ids, which are then of a random country that has them.
Usernames and emails are ASCII: names in Latin, Cyrillic or Greek letters are transliterated
(Łukasz is Lukasz, Иван is Ivan); names in other scripts give usernames of American
names.
Validity
IBANs have valid ISO 13616 check digits, routing numbers a valid ABA checksum, card numbers and
IMEIs a valid Luhn check digit, and EAN and ISBN codes their check digits. National ids
(person.ssn) are valid for Poland (PESEL), the USA, Spain (NIE) and the United Kingdom
(National Insurance number), and only format-shaped for Germany, France, Italy and India. Bitcoin,
Litecoin and Ethereum addresses and VINs are format-shaped.
Reproducibility
--seed repeats a run. Faker draws its values with algorithms of its own, so a seed gives the
same faker values on every platform; the other choices of a mock (numbers, list lengths, which
optional properties) repeat on the same platform. Relative dates (date.past, date.recent,
birth dates) count from a reference time and repeat when it does too. Values may change between
versions of API Genie.
Providers
airline
| Provider |
Returns |
Description |
airline.aircraftTypeName |
string |
An aircraft type: regional, narrowbody or widebody. |
airline.airline |
string |
The name of an airline. |
airline.airplane |
string |
The name of an airplane model. |
airline.airport |
string |
The name of an airport. |
airline.flightNumber |
string |
A flight number. length (integer, 1 to 10, default 4): the number of digits. addLeadingZeros (boolean, default false): pad with zeros to the length. |
airline.recordLocator |
string |
A six-character booking reference. allowNumbers (boolean, default false): digits next to letters. |
airline.seat |
string |
A seat, e.g. 23C, of an aircraft of the type. aircraftType (one of regional, narrowbody, widebody, default narrowbody): regional, narrowbody or widebody. |
animal
| Provider |
Returns |
Description |
animal.bear |
string |
A bear species. |
animal.bird |
string |
A bird species. |
animal.cat |
string |
A cat breed. |
animal.cetacean |
string |
A cetacean species. |
animal.cow |
string |
A cattle breed. |
animal.crocodilia |
string |
A crocodilian species. |
animal.dog |
string |
A dog breed. |
animal.fish |
string |
A fish species. |
animal.horse |
string |
A horse breed. |
animal.insect |
string |
An insect species. |
animal.lion |
string |
A lion subspecies. |
animal.rabbit |
string |
A rabbit breed. |
animal.rodent |
string |
A rodent species. |
animal.snake |
string |
A snake species. |
animal.type |
string |
A kind of animal. |
book
| Provider |
Returns |
Description |
book.author |
string |
The name of an author. |
book.format |
string |
A book format, e.g. hardcover. |
book.genre |
string |
A literary genre. |
book.isbn |
string |
An ISBN-13 with its check digit. |
book.page |
integer |
A page number. |
book.publisher |
string |
The name of a publisher. |
book.releaseYear |
integer |
The year of a release. |
book.series |
string |
The name of a book series. |
book.title |
string |
The title of a book. |
book.translator |
string |
The name of a translator. |
color
| Provider |
Returns |
Description |
color.cmyk |
string |
A CMYK color. |
color.hex |
string |
A hexadecimal color, e.g. #a3c2f0. casing (one of lower, upper, default lower): lower or upper. prefix (one of 0x, #, nothing, default #): 0x, # or nothing. includeAlpha (boolean, default false): add an alpha channel. Also internet.color. |
color.hsb |
string |
An HSB color. |
color.hsl |
string |
An HSL color. includeAlpha (boolean, default false): add an alpha channel. |
color.hsv |
string |
An HSV color. |
color.lab |
string |
A CIELAB color. |
color.lch |
string |
An LCH color. includeAlpha (boolean, default false): add an alpha channel. |
color.name |
string |
The name of a color. |
color.rgb |
string |
An RGB color. includeAlpha (boolean, default false): add an alpha channel. |
color.yuv |
string |
A YUV color. |
commerce
| Provider |
Returns |
Description |
commerce.department |
string |
A store department. |
commerce.discountAmount |
number |
A discount amount. |
commerce.discountCode |
string |
A discount code. |
commerce.discountPercentage |
number |
A discount percentage. |
commerce.discountType |
string |
A kind of discount. |
commerce.ean13 |
string |
An EAN-13 barcode with its check digit. |
commerce.ean8 |
string |
An EAN-8 barcode with its check digit. |
commerce.isbn10 |
string |
An ISBN-10 with its check digit. |
commerce.isbn13 |
string |
An ISBN-13 with its check digit. |
commerce.paymentProvider |
string |
A payment provider. |
commerce.paymentType |
string |
A payment method. |
commerce.price |
string |
A price with two decimals, as text. min (number, default 0): the lowest price. max (number, default 1000): the highest price. |
commerce.product |
record |
A product whose name, description, department, price and SKU belong together, a record. |
commerce.productAdjective |
string |
An adjective for a product. |
commerce.productCategory |
string |
A product category. |
commerce.productDescription |
string |
A product description. |
commerce.productFullName |
string |
A product name with an adjective and a material. |
commerce.productId |
string |
A product identifier. |
commerce.productMaterial |
string |
A material of a product. |
commerce.productName |
string |
The name of a product. |
commerce.productRating |
number |
A product rating. |
commerce.productReview |
string |
A product review. |
commerce.sku |
string |
A stock keeping unit of digits. length (integer, 1 to 64, default 4): the number of digits. |
company
| Provider |
Returns |
Description |
company.buzzAdjective |
string |
A business buzzword adjective. |
company.buzzNoun |
string |
A business buzzword noun. |
company.buzzPhrase |
string |
A business buzzword phrase. Also company.bs. |
company.buzzVerb |
string |
A business buzzword verb. |
company.catchPhrase |
string |
A company catch phrase. |
company.catchPhraseAdjective |
string |
An adjective of a catch phrase. |
company.catchPhraseDescriptor |
string |
A descriptor of a catch phrase. |
company.catchPhraseNoun |
string |
A noun of a catch phrase. |
company.industry |
string |
An industry. |
company.name |
string |
The name of a company. Also company.companyName. |
company.type |
string |
A legal form of a company. |
computer
| Provider |
Returns |
Description |
computer.cpuManufacturer |
string |
A CPU manufacturer. |
computer.cpuModel |
string |
A CPU model. |
computer.cpuType |
string |
A CPU type. |
computer.gpuManufacturer |
string |
A GPU manufacturer. |
computer.gpuModel |
string |
A GPU model. |
computer.gpuType |
string |
A GPU type. |
computer.manufacturer |
string |
A computer manufacturer. |
computer.model |
string |
A computer model. |
computer.type |
string |
A kind of computer. |
crypto
| Provider |
Returns |
Description |
crypto.md5 |
string |
The MD5 digest of the data, or of a random word. data (string): the data to hash. |
crypto.sha256 |
string |
The SHA-256 digest of the data, or of a random word. data (string): the data to hash. |
database
| Provider |
Returns |
Description |
database.collation |
string |
A database collation. |
database.columnName |
string |
A column name. |
database.columnType |
string |
A column type. |
database.engine |
string |
A database engine. |
database.mongodbObjectId |
string |
A MongoDB ObjectId. |
datatype
| Provider |
Returns |
Description |
datatype.boolean |
boolean |
true with the probability. probability (number, 0 to 1, default 0.5): the probability of true, 0 to 1. |
date
| Provider |
Returns |
Description |
date.between |
string |
A moment between two RFC 3339 dates or date-times, both included. from (string, required): the first moment, e.g. 2024-01-01 or 2024-01-01T10:00:00Z. to (string, required): the last moment. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.birthdate |
string |
The birth moment of someone of an age on the reference date. minAge (integer, 0 to 150, default 18): the lowest age in years. maxAge (integer, 0 to 150, default 80): the highest age in years. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.birthdateByYear |
string |
A birth moment within the years. minYear (integer, 0 to 9999, default 1920): the first year. maxYear (integer, 0 to 9999, default 2000): the last year. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.future |
string |
A moment within calendar years after the reference time. years (integer, 1 to 1000, default 1): how many years ahead. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.month |
string |
The name of a month. abbreviated (boolean, default false): Jan rather than January. |
date.past |
string |
A moment within calendar years before the reference time. years (integer, 1 to 1000, default 1): how many years back. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.recent |
string |
A moment within days before the reference time. days (integer, 1 to 365000, default 3): how many days back. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.soon |
string |
A moment within days after the reference time. days (integer, 1 to 365000, default 3): how many days ahead. format (one of iso, timestamp, date, time, default iso): iso (an RFC 3339 date-time), timestamp (Unix seconds), date or time. |
date.weekday |
string |
The name of a day of the week. abbreviated (boolean, default false): Mon rather than Monday. |
finance
| Provider |
Returns |
Description |
finance.accountNumber |
string |
A bank account number of digits. length (integer, 1 to 64, default 8): the number of digits. Also finance.account. |
finance.accountType |
string |
A kind of bank account. |
finance.amount |
string |
An amount with two decimals, as text. min (number, default 0): the lowest amount. max (number, default 1000): the highest amount. symbol (string): a currency symbol to put first. |
finance.bic |
string |
A BIC (SWIFT code) of a bank of the country. country (one of PL, US, GB, DE, RO, FR, IN, IT, NL, ES): the ISO 3166-1 code of the country; the context’s, or any, when not given. |
finance.bitcoinAddress |
string |
A Bitcoin address (format-shaped, no checksum). |
finance.card |
record |
A payment card whose number, verification value and expiration belong to one issuer, a record. issuer (one of amex, discover, mastercard, visa): amex, discover, mastercard or visa, any when not given. |
finance.creditCardCvv |
string |
A three-digit card verification value. |
finance.creditCardExpirationDate |
string |
An expiration date MM/YY within three years of the reference time. |
finance.creditCardNumber |
string |
A card number with a valid Luhn check digit. issuer (one of amex, discover, mastercard, visa): amex, discover, mastercard or visa, any when not given. |
finance.currency |
record |
A currency’s name, ISO 4217 code and symbol, a record. |
finance.currencyCode |
string |
An ISO 4217 currency code. |
finance.currencyName |
string |
The name of a currency. |
finance.currencySymbol |
string |
The symbol of a currency, empty for some. |
finance.ethereumAddress |
string |
An Ethereum address (format-shaped, no checksum). |
finance.iban |
string |
An IBAN with valid ISO 13616 check digits. country (one of 27 codes): the ISO 3166-1 code of the country; the context’s, or any, when not given. |
finance.litecoinAddress |
string |
A Litecoin address (format-shaped, no checksum). |
finance.pin |
string |
A PIN of digits. length (integer, 1 to 64, default 4): the number of digits. |
finance.routingNumber |
string |
An ABA routing number with a valid checksum. |
food
| Provider |
Returns |
Description |
food.alcoholicBeverage |
string |
An alcoholic beverage. |
food.category |
string |
A food category. |
food.dish |
string |
The name of a dish. |
food.fruit |
string |
A fruit. |
food.grain |
string |
A grain. |
food.meat |
string |
A meat. |
food.milkProduct |
string |
A milk product. |
food.nonAlcoholicBeverage |
string |
A non-alcoholic beverage. |
food.nut |
string |
A nut. |
food.oil |
string |
A cooking oil. |
food.seafood |
string |
A seafood. |
food.seed |
string |
An edible seed. |
food.sugarProduct |
string |
A sugar product. |
food.vegetable |
string |
A vegetable. |
git
| Provider |
Returns |
Description |
git.branch |
string |
A branch name. maxIssueNumber (integer, 1 to 1000000000, default 100): the highest issue number in a name. |
git.commitDate |
string |
A commit date as git prints it, in the local time of its offset. maxYearsAgo (integer, 1 to 1000, default 15): how many years back. |
git.commitEntry |
string |
A commit as git log prints it. |
git.commitMessage |
string |
A commit message. |
git.commitSha |
string |
A commit hash of hexadecimal digits. length (integer, 1 to 40, default 40): the number of digits. |
hacker
| Provider |
Returns |
Description |
hacker.abbreviation |
string |
A technical abbreviation. |
hacker.adjective |
string |
A technical adjective. |
hacker.ingverb |
string |
A technical verb ending in -ing. |
hacker.noun |
string |
A technical noun. |
hacker.phrase |
string |
A technical phrase. |
hacker.verb |
string |
A technical verb. |
helpers
| Provider |
Returns |
Description |
helpers.fromPattern |
string |
A string from a pattern of a subset of regular expressions. pattern (string, required): # a digit, ? a letter, * either, [A-Z0-9] a class, {n} or {min,max} a repetition, \ a literal character. Also helpers.fromRegExp. |
helpers.replaceSymbols |
string |
A pattern with its symbols replaced by random characters. pattern (string, required): # becomes a digit, ? a letter, * either. |
image
| Provider |
Returns |
Description |
image.avatar |
string |
The URL of a GitHub avatar. Also image.avatarGitHub, internet.avatar. |
image.dimensions |
string |
Image dimensions, e.g. 640x480. |
image.type |
string |
An image file type. |
image.url |
string |
The URL of a placeholder image. width (integer, 1 to 10000, default 640): the width in pixels. height (integer, 1 to 10000, default 480): the height in pixels. category (one of animals, business, cats, city, food, nightlife, fashion, people, nature, sports, technics, transport): a picture category, any when not given. Also image.imageUrl. |
internet
| Provider |
Returns |
Description |
internet.domainName |
string |
A domain name. |
internet.domainSuffix |
string |
A top-level domain. |
internet.domainWord |
string |
A word of a domain name. |
internet.email |
string |
An email address, from the names when given. firstName (string): the first name to use, a random one when not given. lastName (string): the last name to use, a random one when not given. provider (string): the host after @, a free mail provider when not given. |
internet.emailProvider |
string |
The domain of a free email provider. |
internet.emoji |
string |
An emoji. type (one of smiley, body, person, nature, food, travel, activity, object, symbol, flag): smiley, body, person, nature, food, travel, activity, object, symbol or flag; any when not given. |
internet.exampleEmail |
string |
An email address at an example domain. firstName (string): the first name to use, a random one when not given. lastName (string): the last name to use, a random one when not given. |
internet.httpMethod |
string |
An HTTP method. |
internet.httpRequestHeader |
string |
The name of an HTTP request header. |
internet.httpResponseHeader |
string |
The name of an HTTP response header. |
internet.httpStatusCode |
integer |
An HTTP status code. type (one of informational, success, redirection, clientError, serverError): informational, success, redirection, clientError or serverError; any when not given. |
internet.ipv4 |
string |
An IPv4 address. class (one of a, b, c, default c): the address class a, b or c. Also internet.ip. |
internet.ipv6 |
string |
An IPv6 address. |
internet.mac |
string |
A MAC address. separator (string, default :): between the bytes. |
internet.mimeType |
string |
A media type. |
internet.password |
string |
A password of letters, digits and symbols. length (integer, 1 to 256, default 15): the number of characters. |
internet.port |
integer |
A port number. |
internet.protocol |
string |
http or https. |
internet.url |
string |
A URL. protocol (one of http, https, default https): http or https. |
internet.username |
string |
A username, from the names when given. firstName (string): the first name to use, a random one when not given. lastName (string): the last name to use, a random one when not given. Also internet.userName. |
location
| Provider |
Returns |
Description |
location.address |
record |
An address whose parts are of one country, with its code and a time zone, a record. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. |
location.buildingNumber |
string |
A building number. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.buildingNumber. |
location.city |
string |
A city. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.city. |
location.country |
string |
The name of a country. Also address.country. |
location.countryCode |
string |
An ISO 3166-1 country code. Also address.countryCode. |
location.county |
string |
A county; FakerError for countries without counties. country (one of 15 codes, default ES): the ISO 3166-1 code of a country with counties: EE or ES. Also address.county. |
location.direction |
string |
A compass direction. |
location.latitude |
string |
A latitude, as text. precision (integer, 0 to 7, default 4): the number of decimals. Also address.latitude. |
location.longitude |
string |
A longitude, as text. precision (integer, 0 to 7, default 4): the number of decimals. Also address.longitude. |
location.secondaryAddress |
string |
An apartment or suite. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.secondaryAddress. |
location.state |
string |
A state or region. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.state. |
location.street |
string |
A street name. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.streetName, location.streetName. |
location.streetAddress |
string |
A street with a building number. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.streetAddress. |
location.timeZone |
string |
An IANA time zone. Also address.timeZone. |
location.zipCode |
string |
A postal code. country (one of 15 codes): the ISO 3166-1 code of the country of the address, the context’s (or US) when not given. Also address.zipCode. |
lorem
| Provider |
Returns |
Description |
lorem.paragraph |
string |
A paragraph of placeholder text. minSentences (integer, 0 to 100, default 2): the fewest sentences. maxSentences (integer, 0 to 100, default 6): the most sentences. |
lorem.paragraphs |
string |
Paragraphs of placeholder text. min (integer, 0 to 100, default 2): the fewest paragraphs. max (integer, 0 to 100, default 4): the most paragraphs. |
lorem.sentence |
string |
A sentence of placeholder text. minWords (integer, 0 to 100, default 3): the fewest words. maxWords (integer, 0 to 100, default 10): the most words. |
lorem.sentences |
string |
Sentences of placeholder text. min (integer, 0 to 100, default 2): the fewest sentences. max (integer, 0 to 100, default 6): the most sentences. |
lorem.slug |
string |
Words joined by hyphens. wordCount (integer, 0 to 100, default 3): the number of words. |
lorem.word |
string |
A word of placeholder text. Also random.word. |
lorem.words |
string |
Words of placeholder text. count (integer, 0 to 1000, default 3): the number of words. Also random.words. |
medicine
| Provider |
Returns |
Description |
medicine.condition |
string |
A medical condition. |
medicine.medicalTest |
string |
A medical test. |
medicine.specialty |
string |
A medical specialty. |
movie
| Provider |
Returns |
Description |
movie.actor |
string |
The name of an actor. |
movie.actress |
string |
The name of an actress. |
movie.director |
string |
The name of a director. |
movie.genre |
string |
A film genre. |
movie.title |
string |
The title of a film. |
movie.tvShow |
string |
The title of a TV show. |
music
| Provider |
Returns |
Description |
music.artist |
string |
The name of a musical artist. |
music.genre |
string |
A musical genre. |
music.songName |
string |
The name of a song. |
number
| Provider |
Returns |
Description |
number.float |
number |
A number from min (included) to max (excluded). min (number, default 0): the lowest number. max (number, default 1000): the highest number. Also datatype.float. |
number.hex |
string |
A hexadecimal number. min (integer, 0 to 2147483647, default 0): the lowest number. max (integer, 0 to 2147483647, default 15): the highest number. |
number.int |
integer |
An integer from min to max, both included. min (integer, -9007199254740991 to 9007199254740991, default 0): the lowest integer. max (integer, -9007199254740991 to 9007199254740991, default 1000): the highest integer. Also datatype.number, random.number. |
person
| Provider |
Returns |
Description |
person.bio |
string |
A short biography. |
person.chineseZodiac |
string |
A Chinese zodiac sign. |
person.firstName |
string |
A first name. sex (one of male, female): male or female, either when not given. country (one of 61 codes): the ISO 3166-1 code of the country whose names to use, the context’s when not given. Also name.firstName. |
person.fullName |
string |
A full name. sex (one of male, female): male or female, either when not given. country (one of 61 codes): the ISO 3166-1 code of the country whose names to use, the context’s when not given. Also name.findName, name.fullName. |
person.gender |
string |
A gender identity. Also name.gender. |
person.hobby |
string |
A hobby. |
person.jobArea |
string |
An area of work. |
person.jobDescriptor |
string |
A descriptor of a job title. |
person.jobTitle |
string |
A job title. Also name.jobTitle. |
person.jobType |
string |
A kind of job. |
person.language |
string |
A language. |
person.lastName |
string |
A last name. sex (one of male, female): male or female, either when not given. country (one of 61 codes): the ISO 3166-1 code of the country whose names to use, the context’s when not given. Also name.lastName. |
person.middleName |
string |
A middle name. sex (one of male, female): male or female, either when not given. Also name.middleName. |
person.nationality |
string |
A nationality. |
person.prefix |
string |
A name prefix, e.g. Mrs.. sex (one of male, female): male or female, either when not given. Also name.prefix. |
person.profile |
record |
A person whose sex, names, username, email and birth date belong together, a record. sex (one of male, female): male or female, either when not given. country (one of 61 codes): the ISO 3166-1 code of the country whose names to use, the context’s when not given. |
person.sex |
string |
Male or Female. |
person.ssn |
string |
A national identification number: valid for PL, US, ES and GB, format-shaped for DE, FR, IT and IN. country (one of PL, US, GB, DE, FR, IT, ES, IN): the ISO 3166-1 code of the country; the context’s, or any, when not given. |
person.suffix |
string |
A name suffix, e.g. Jr.. Also name.suffix. |
person.zodiacSign |
string |
A western zodiac sign. |
phone
| Provider |
Returns |
Description |
phone.imei |
string |
An IMEI with a valid Luhn check digit. |
phone.manufacturer |
string |
A phone manufacturer. |
phone.modelName |
string |
A phone model. |
phone.number |
string |
A phone number. format (string): a pattern whose # become digits, e.g. ###-###-####; a random format when not given. Also phone.phoneNumber. |
phone.platform |
string |
A mobile platform. |
science
| Provider |
Returns |
Description |
science.chemicalElement |
string |
The name of a chemical element. |
science.currentUnit |
string |
A unit of electric current. |
science.distanceUnit |
string |
A unit of distance. |
science.massUnit |
string |
A unit of mass. |
science.temperatureUnit |
string |
A unit of temperature. |
science.timeUnit |
string |
A unit of time. |
science.unit |
string |
A unit of measurement. |
sport
| Provider |
Returns |
Description |
sport.athlete |
string |
The name of an athlete. sex (one of male, female): male or female, either when not given. |
sport.event |
string |
A sport event. |
sport.sport |
string |
A sport. |
sport.team |
string |
A soccer team. |
string
| Provider |
Returns |
Description |
string.alpha |
string |
Letters. length (integer, 0 to 10000, default 1): the number of characters. casing (one of mixed, lower, upper, default mixed): mixed, lower or upper. exclude (string): characters not to use. Also random.alpha. |
string.alphanumeric |
string |
Letters and digits. length (integer, 0 to 10000, default 1): the number of characters. casing (one of mixed, lower, upper, default mixed): mixed, lower or upper. exclude (string): characters not to use. Also random.alphaNumeric, string.alphaNumeric. |
string.binary |
string |
Binary digits. length (integer, 0 to 10000, default 1): the number of characters. |
string.fromCharacters |
string |
Characters picked from a set. characters (string, required): the characters to pick from. length (integer, 0 to 10000, default 1): the number of characters. |
string.hexadecimal |
string |
Hexadecimal digits. length (integer, 0 to 10000, default 1): the number of characters. casing (one of lower, upper, default lower): lower or upper. prefix (one of 0x, #, nothing, default 0x): 0x, # or nothing. Also datatype.hexadecimal. |
string.numeric |
string |
Decimal digits. length (integer, 0 to 10000, default 1): the number of characters. allowLeadingZeros (boolean, default true): whether the first digit may be 0. Also random.numeric. |
string.octal |
string |
Octal digits. length (integer, 0 to 10000, default 1): the number of characters. |
string.sample |
string |
Printable ASCII characters. length (integer, 0 to 10000, default 10): the number of characters. |
string.uuid |
string |
A version 4 UUID. Also datatype.uuid, random.uuid. |
system
| Provider |
Returns |
Description |
system.commonFileExt |
string |
A common file extension. |
system.commonFileName |
string |
A file name with a common extension. extension (string): the extension, a common one when not given. |
system.commonFileType |
string |
A common file type. |
system.cron |
string |
A cron expression. |
system.directoryPath |
string |
A directory path. |
system.fileExt |
string |
A file extension of a media type. type (one of video, audio, image, text, application): video, audio, image, text or application; any when not given. |
system.fileName |
string |
A file name. |
system.filePath |
string |
A file path. |
system.fileType |
string |
A file type. |
system.mimeType |
string |
A media type. |
system.networkInterface |
string |
A network interface name. |
system.semver |
string |
A semantic version. |
vehicle
| Provider |
Returns |
Description |
vehicle.bicycle |
string |
A kind of bicycle. |
vehicle.color |
string |
A vehicle color. |
vehicle.fuel |
string |
A fuel type. |
vehicle.manufacturer |
string |
A vehicle manufacturer. |
vehicle.model |
string |
A vehicle model. |
vehicle.type |
string |
A kind of vehicle. |
vehicle.vehicle |
string |
A vehicle manufacturer and model. |
vehicle.vin |
string |
A vehicle identification number (format-shaped, no check digit). |
vehicle.vrm |
string |
A UK vehicle registration mark. |
videoGame
| Provider |
Returns |
Description |
videoGame.genre |
string |
A video game genre. |
videoGame.platform |
string |
A gaming platform. |
videoGame.studioName |
string |
A game studio. |
videoGame.title |
string |
The title of a video game. |
weather
| Provider |
Returns |
Description |
weather.cloudCover |
integer |
Cloud cover, percent. |
weather.description |
string |
A description of the weather. |
weather.humidity |
integer |
Relative humidity, percent. |
weather.pressure |
number |
Air pressure, hPa or inHg. units (one of metric, imperial, default metric): metric or imperial. |
weather.temperature |
number |
A temperature, Celsius or Fahrenheit. units (one of metric, imperial, default metric): metric or imperial. |
weather.uvIndex |
integer |
A UV index. |
weather.visibility |
number |
Visibility, km or miles. units (one of metric, imperial, default metric): metric or imperial. |
weather.windSpeed |
number |
Wind speed, km/h or mph. units (one of metric, imperial, default metric): metric or imperial. |
word
| Provider |
Returns |
Description |
word.adjective |
string |
An English adjective. length (integer, 1 to 100): the length of the word, any when not given. |
word.adverb |
string |
An English adverb. length (integer, 1 to 100): the length of the word, any when not given. |
word.conjunction |
string |
An English conjunction. length (integer, 1 to 100): the length of the word, any when not given. |
word.interjection |
string |
An English interjection. length (integer, 1 to 100): the length of the word, any when not given. |
word.noun |
string |
An English noun. length (integer, 1 to 100): the length of the word, any when not given. |
word.preposition |
string |
An English preposition. length (integer, 1 to 100): the length of the word, any when not given. |
word.sample |
string |
An English word. length (integer, 1 to 100): the length of the word, any when not given. |
word.verb |
string |
An English verb. length (integer, 1 to 100): the length of the word, any when not given. |
word.words |
string |
English words. count (integer, 0 to 1000, default 1): the number of words. |