Loading...
Generate random addresses, phone numbers, and more programmatically. Integrate test data directly into your applications with our RESTful API.
Include your API key in the header of every request:
Authorization: Bearer YOUR_API_KEYYou can find your API key in your Pro account dashboard after subscribing.
https://addressgenerator.org/api/v1/api/v1/addressGenerate one or more random addresses for a given country and optional region.
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | Yes | ISO 3166-1 alpha-2 country code (e.g. US, GB, DE) |
region | string | No | State, province, or region code (e.g. CA, TX, ON) |
count | integer | No | Number of addresses to generate (1-100, default: 1) |
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://addressgenerator.org/api/v1/address?country=US®ion=CA&count=10"
{
"success": true,
"count": 10,
"country": "US",
"region": "CA",
"addresses": [
{
"street": "4521 Maple Drive",
"city": "San Francisco",
"state": "California",
"stateCode": "CA",
"zipCode": "94102",
"country": "United States",
"countryCode": "US",
"phone": "+1 (415) 555-0192",
"latitude": 37.7749,
"longitude": -122.4194
}
]
}/api/v1/countriesRetrieve a list of all countries supported by the address generator, including their available regions.
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://addressgenerator.org/api/v1/countries"
{
"success": true,
"count": 125,
"countries": [
{
"code": "US",
"name": "United States",
"regions": ["AL", "AK", "AZ", "AR", "CA", "..."]
},
{
"code": "GB",
"name": "United Kingdom",
"regions": ["ENG", "SCT", "WLS", "NIR"]
},
{
"code": "DE",
"name": "Germany",
"regions": ["BW", "BY", "BE", "BB", "..."]
}
]
}/api/v1/phoneGenerate random phone numbers in the correct format for a given country.
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | Yes | ISO 3166-1 alpha-2 country code (e.g. US, GB, JP) |
count | integer | No | Number of phone numbers to generate (1-100, default: 1) |
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://addressgenerator.org/api/v1/phone?country=US&count=5"
{
"success": true,
"count": 5,
"country": "US",
"phones": [
{ "number": "+1 (212) 555-0147", "formatted": "(212) 555-0147" },
{ "number": "+1 (310) 555-0283", "formatted": "(310) 555-0283" },
{ "number": "+1 (415) 555-0391", "formatted": "(415) 555-0391" },
{ "number": "+1 (512) 555-0064", "formatted": "(512) 555-0064" },
{ "number": "+1 (718) 555-0512", "formatted": "(718) 555-0512" }
]
}| Plan | API Access | Rate Limit |
|---|---|---|
| Free | No API access | — |
| Pro | Full access | 1,000 requests / day |
| Status | Meaning |
|---|---|
200 OK | Request succeeded |
400 Bad Request | Invalid or missing query parameters |
401 Unauthorized | Missing or invalid API key |
429 Too Many Requests | Rate limit exceeded |
500 Server Error | Something went wrong on our end |
Get your API key with a Pro subscription and start generating test data programmatically in minutes.
Get API Access