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 type + street name
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 example
frFrance75001
usUnited States90210
ukUnited KingdomAB1 2CD
deGermany10115
esSpain28001

Code Examples

curl -X GET \
  "https://api.sylvain.sh/v4/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