Apidog Docs
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
HomeLearning CenterSupport CenterAPI References
HomeLearning CenterSupport CenterAPI References
Discord Community
Slack Community
X / Twitter
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
  1. Learning Center
  • Back to home
  • Dynamic values Modules
  • Airline
  • Animal
  • Color
  • Commerce
  • Company
  • Database
  • Datatype
  • Date
  • Finance
  • Food
  • Git
  • Hacker
  • Helpers
  • Image
  • Internet
  • Location
  • Lorem
  • Music
  • Number
  • Person
  • Phone
  • Science
  • String
  • System
  • Vehicle
  • Word
  1. Learning Center

Internet

Module to generate internet related entries.
Overview
For user accounts, you may need an {{$internet.email}} and a {{$internet.password}}, as well as a ASCII {{$internet.userName}} or Unicode {{$internet.displayName}}. Since the emails generated could coincidentally be real email addresses, you should not use these for sending real email addresses. If this is a concern, use {{$internet.exampleEmail}} instead.
For websites, you can generate a {{$internet.domainName}} or a full {{$internet.url}}.
To make your data more 🔥, you can use {{$internet.emoji}}.
You also have access to a number of the more technical elements of web requests, such as {{$internet.httpMethod}}, {{$internet.httpStatusCode}}, {{$internet.ip}}, {{$internet.mac}}, {{$internet.userAgent}}, and {{$internet.port}}.

color#

Generates a random css hex color code in aesthetically pleasing color palette.
Based on http://stackoverflow.com/questions/43044/algorithm-to-randomly-generate-an-aesthetically-pleasing-color-palette
Parameters
NameTypeDefaultDescription
blueBasenumber0The optional base blue in range between 0 and 255.
greenBasenumber0The optional base green in range between 0 and 255.
redBasenumber0The optional base red in range between 0 and 255.
Returns: string
Examples

displayName#

Generates a display name using the given person's name as base. The resulting display name may use one or both of the provided names. If the input names include Unicode characters, the resulting display name will contain Unicode characters. It will not contain spaces.
Parameters
NameTypeDefaultDescription
firstNamestring{{$person.firstName}}The optional first name to use.
lastNamestring{{$person.lastName}}The optional last name to use.
Returns: string
Examples

domainName#

Generates a random domain name.
Returns: string
Examples

domainSuffix#

Returns a random domain suffix.
Returns: string
Examples

domainWord#

Generates a random domain word.
Returns: string
Examples

email#

Generates an email address using the given person's name as base.
Parameters
NameTypeDefaultDescription
allowSpecialCharactersbooleanfalseWhether special characters such as .!#$%&'*+ should be included in the email address.
firstNamestring{{$person.firstName}}The optional first name to use.
lastNamestring{{$person.lastName}}The optional last name to use.
providerstringThe mail provider domain to use. If not specified, a random free mail provider will be chosen.
Returns: string
Examples

emoji#

Generates a random emoji.
Returns: string
Examples

exampleEmail#

Generates an email address using an example mail provider using the given person's name as base.
Parameters
NameTypeDefaultDescription
allowSpecialCharactersbooleanfalseWhether special characters such as .!#$%&'*+ should be included in the email address.
firstNamestring{{$person.firstName}}The optional first name to use.
lastNamestring{{$person.lastName}}The optional last name to use.
Returns: string
Examples

httpMethod#

Returns a random http method.
Can be either of the following:
GET
POST
PUT
DELETE
PATCH
Returns: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
Examples

httpStatusCode#

Generates a random HTTP status code.
Returns: number
Examples

ip#

Generates a random IPv4 or IPv6 address.
Returns: string
Examples

ip4#

Generates a random IPv4 address.
Returns: string
Examples

ip6#

Generates a random IPv6 address.
Returns: string
Examples

mac#

Generates a random mac address.
Parameters
NameTypeDefaultDescription
separatorstring:The optional separator to use. Can be either ':', '-' or ''.
Returns: string
Examples

password#

Generates a random password-like string. Do not use this method for generating actual passwords for users. Since the source of the randomness is not cryptographically secure, neither is this generator.
Parameters
NameTypeDefaultDescription
lengthnumber15The length of the password to generate.
memorablebooleanfalseWhether the generated password should be memorable.
patternRegExp/\w/The pattern that all chars should match. This option will be ignored, if memorable is true.
prefixstring The prefix to use.
Returns: string
Examples

password#

Generates a random port number.
Returns: number
Examples

protocol#

Returns a random web protocol. Either http or https.
Returns: 'http' | 'https'
Examples

url#

Generates a random http(s) url.
Parameters
NameTypeDefaultDescription
appendSlashboolean{{$datatype.boolean}}Whether to append a slash to the end of the url (path).
protocolHTTPProtocolTypehttpsThe protocol to use.
Returns: string
Examples

userAgent#

Generates a random user agent string.
Returns: string
Examples

userName#

Generates a username using the given person's name as base. The resulting username may use neither, one or both of the names provided. This will always return a plain ASCII string. Some basic stripping of accents and transliteration of characters will be done.
Parameters
NameTypeDefaultDescription
firstNamestring{{$person.firstName}}The optional first name to use.
lastNamestring{{$person.lastName}}The optional last name to use.
Returns: string
Examples

Previous
Image
Next
Location
Built with