#Location
#address
Generate a random street address
Optionally mandate that it return a short suffix
#altitude
Generate a random altitude, in meters.
By default, includes 5 digits of accuracy after the decimal. Can override with the fixed
option.
By default, max of 8848m (height of Mount Everest), but this can be overridden with the max
option.
#areacode
Generate a random area code
Note, this is a US area code, we have little support for internationalization at this time. Hope to fix that in the future!
#city
Generate a random city name
#coordinates
Generate random coordinates, which are latitude and longitude, comma separated.
By default includes 5 fixed digits after decimal, can specify otherwise.
By default cooridnates' format is dd, can specify otherwise.
#country
Return a random country.
By default, returns only the 2 letter ISO 3166-1 code for the country.
Optionally specify that it ought to return a full country name.
#depth
Generate a random depth, in meters. Depths are always negative
By default, includes 5 digits of accuracy after the decimal. Can override with the fixed
option.
By default, maximum (or minimum depending on your frame of reference) depth of -2550 (depth of the Mariana Trench), but this can be overridden with the min
option.
#geohash
Generate a random geohash. More details on what a geohash is.
By default, includes 7 characters of accuracy. Can override with the length
option.
#latitude
Generate a random latitude.
range: -90 to 90
By default includes 5 fixed digits after decimal, can specify otherwise.
By default includes entire range of allowed latitudes, can specify a min and/or max to bound it
By default latitudes' format is dd, can specify otherwise.
#locale
Generate a random ISO-639-1 language code
Generate a random IETF region code
Note, the language codes comes from the ISO-639-1 spec and the region codes come from IETF standard
#longitude
Generate a random longitude.
range: -180 to 180
By default includes 5 fixed digits after decimal, can specify otherwise.
By default includes entire range of allowed longitudes, can specify a min and/or max to bound it
By default longitude' format is dd, can specify otherwise.
#phone
Generate a random phone
By default conforms to NANP for a proper US phone number.
Optionally disable formatting.
Optionally specify a country.
Note, at current we only have support for 'us'
, 'uk'
, or 'fr'
for countries.
For uk
and fr
, optionally specify a mobile phone.
For us
, optionally specify an exampleNumber for a '555' area code.
#postal
Return a Canadian Postal code. Returned postal code is valid with respect to the Postal District (first character) and format only.
#postcode
Generate a random (U.K.) postcode. Returned postcode is valid with respect to the Postcode Area (first characters) and format only.
#province
Return a random province.
By default, returns only the 2 letter abbreviation for province.
Optionally specify that it ought to return a full province name.
Optionally specify the country from which it should return the province name.
Note, currently support for country is limited to: 'ca', 'it'
.
#state
Return a random state.
By default, returns only the 2 letter abbreviation for state.
Optionally specify that it ought to return a full state name.
Optionally add U.S. Territories ('American Samoa', 'Federated States of Micronesia', 'Guam', 'Marshall Islands', 'Northern Mariana Islands', 'Puerto Rico', 'Virgin Islands, U.S.') to the mix of randomly selected items:
Optionally add Armed Forces to the list as well:
For all U.S. states, territories, and armed forces, specify all of them:
For just territories or armed forces, specify that it ought not return U.S. states:
Optionally specify a country (US specific options are ignored if country is specified and different from 'us'
):
#street
Generate a random street
Optionally mandate that it returns a short suffix
Optionally specify the number of syllables used to generate the street name
Optionally specify a country to localize street prefixes
Note, currently support for country is limited to: 'us', 'it'
.
#zip
Generate a random (U.S.) zip code.
Can optionally specify that it ought to return a Zip+4: