Skip to content

Address Generation ​

The /address endpoint generates one or more fictional postal addresses for a given country. Each address includes a street, city, zip code, region, and country name. If no country is specified, one is picked at random.

Parameters ​

ParameterRequiredDescription
countryNoCountry code: fr, us, uk, de, or es. Case-insensitive. Random if omitted.
countNoNumber of addresses to generate (1–10). Default: 1.

Response Fields ​

FieldTypeDescription
addressesobject[]List of generated address objects
addresses[].streetstringHouse number, street name and type — word order depends on country (see below)
addresses[].citystringCity name
addresses[].zipstringPostal/zip code formatted for the country
addresses[].statestringRegion or state name
addresses[].countrystringFull country name (e.g. France, United States)
addresses[].countryCodestringUppercased country code (e.g. FR, US)

Supported Countries ​

CodeCountryZip format exampleStreet word order
frFrance75001number + type + name
usUnited States90210number + name + type
ukUnited KingdomAB1 2CDnumber + name + type
deGermany10115number + name + type
esSpain28001number + type + name

us, uk, and de addresses put the street type last (e.g. 42 Main Street), while fr and es put it right after the number (e.g. 12 Rue de Paris).

Code Examples ​

curl -X GET \
  "https://api.sylvain.sh/v6/address"

Try It ​

Error Handling ​

Error MessageDescription
Unknown country code "xx". Supported: fr, us, uk, de, esThe country parameter is not a supported code
Count must be between 1 and 10The count parameter is out of the allowed range
Please provide a valid count (&count={n})The count parameter is not a valid number