Skip to main content

Fake Address API

MOCK DATA

Locale-aware fake postal addresses — street, city, state, zip, country and coordinates that all agree, plus a one-line formatted form in the local layout.

Generated test data for fixtures and development

Base URL
/api/addresses
Category
People
Capabilities
1 route Seedable 8 locales
Last updated
July 30, 2026

GET /api/addresses

Live requestRuns against the public API
No key required
GET/api/addresses?count=3&seed=42

Request parameters

No route-specific input is required.
Advanced response options8 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Locale for the generated data (names, addresses, …).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/addresses?count=3&seed=42"
const res = await fetch("https://randomapi.dev/api/addresses?count=3&seed=42");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/addresses?count=3&seed=42").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/addresses?count=3&seed=42"
), true);
$data = $json["data"];
Universal parameters Shared response and formatting options 8
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
locale enum

Locale for the generated data (names, addresses, …).

default: en
allowed: en | da | de | fr | es | it | pt | ja
example: locale=da
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=street,city
exclude list

Return all fields except these (comma-separated).

example: exclude=formatted
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 9
street string

Street name + number, formatted the local way (number-first in the US, number-last in Denmark).

example: 883 Maple Avenue

city string

City name from the locale's data.

example: Portland

state string nullable

State / region / prefecture; null where the locale has no state-level data.

example: Oregon

zipCode string

Postal code in the country's format (5-digit US ZIP, 4-digit Danish postnummer, NNN-NNNN Japanese…).

example: 97205

country string

English country name — always the locale's own country.

example: United States

countryCode string (ISO 3166-1 alpha-2)

Always matches the locale (en→US, da→DK, pt→BR…).

example: US

latitude float

6-decimal latitude inside the country's rough bounding box (approximate — not the street's real position).

example: 45.515209

longitude float

6-decimal longitude inside the country's rough bounding box.

example: -122.678437

formatted string

The parts assembled into one line in the country's postal order — always contains street and city verbatim.

example: 883 Maple Avenue, Portland, Oregon 97205, United States

Documented examples

Build-generated requests and complete responses
3
Three reproducible US addresses
GET /api/addresses?count=3&seed=42
{
  "data": [
    {
      "street": "7539 Alma Center",
      "city": "Noeberg",
      "state": "West Virginia",
      "zipCode": "90724",
      "country": "United States",
      "countryCode": "US",
      "latitude": 36.466762,
      "longitude": -85.396296,
      "formatted": "7539 Alma Center, Noeberg, West Virginia 90724, United States"
    },
    {
      "street": "992 Hershel Loop",
      "city": "Deltona",
      "state": "Maryland",
      "zipCode": "80738-5107",
      "country": "United States",
      "countryCode": "US",
      "latitude": 25.949127,
      "longitude": -123.669674,
      "formatted": "992 Hershel Loop, Deltona, Maryland 80738-5107, United States"
    },
    {
      "street": "648 W 11th Street",
      "city": "North Sabina",
      "state": "South Carolina",
      "zipCode": "95574",
      "country": "United States",
      "countryCode": "US",
      "latitude": 45.567616,
      "longitude": -117.216748,
      "formatted": "648 W 11th Street, North Sabina, South Carolina 95574, United States"
    }
  ],
  "meta": {
    "endpoint": "addresses",
    "count": 3,
    "seed": 42,
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Danish addresses (ZIP before city, DK country code)
GET /api/addresses?locale=da&count=5
{
  "data": [
    {
      "street": "Poppelvej 63A",
      "city": "Årslev",
      "state": "Midtjylland",
      "zipCode": "1100",
      "country": "Denmark",
      "countryCode": "DK",
      "latitude": 56.081123,
      "longitude": 11.215387,
      "formatted": "Poppelvej 63A, 1100 Årslev, Denmark"
    },
    {
      "street": "Ullevej 92B",
      "city": "Hadsten",
      "state": "Nordjylland",
      "zipCode": "7459",
      "country": "Denmark",
      "countryCode": "DK",
      "latitude": 54.722596,
      "longitude": 8.126658,
      "formatted": "Ullevej 92B, 7459 Hadsten, Denmark"
    },
    {
      "street": "Ulvevej 488",
      "city": "Taarbæk",
      "state": "Midtjylland",
      "zipCode": "0988",
      "country": "Denmark",
      "countryCode": "DK",
      "latitude": 57.25665,
      "longitude": 8.64742,
      "formatted": "Ulvevej 488, 0988 Taarbæk, Denmark"
    },
    {
      "street": "Rævevej 72",
      "city": "Jelling",
      "state": "Midtjylland",
      "zipCode": "7297",
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Japanese one-liners only, as CSV
GET /api/addresses?locale=ja&fields=formatted&format=csv&count=10
formatted
"057-9719 北海道 勝利市 6丁目7番6号, Japan"
"237-8073 鹿児島県 東拓海町 8丁目9番9号, Japan"
"887-0955 宮崎県 山下市 8丁目6番4号, Japan"
"916-9768 山口県 西啓子村 7丁目4番7号, Japan"
"931-5168 兵庫県 後藤町 7丁目7番7号, Japan"
"207-1729 香川県 柏木町 5丁目8番6号, Japan"
"935-1956 兵庫県 港高瀬市 1丁目5番6号, Japan"
"480-3179 鹿児島県 三郎村 9丁目2番5号, Japan"
"693-0462 静岡県 港上田市 3丁目7番3号, Japan"
"653-5510 宮崎県 北正二村 3丁目9番8号, Japan"

About this API

Coverage & behavior

Generates standalone postal addresses that are internally consistent: country and countryCode are always the locale's own country (?locale=da ⇒ Denmark/DK, never a random country), the street, city and zipCode come from that locale's data so numbers, spellings and zip formats look local, and formatted assembles those exact values into one line using the country's own postal order:

locale country code one-line layout
en United States US street, city, state ZIP, country
da Denmark DK street, ZIP city, country
de Germany DE street, ZIP city, country
fr France FR street, ZIP city, country
es Spain ES street, ZIP city, country
it Italy IT street, ZIP city, country
pt Brazil BR street, city - state, ZIP, country
ja Japan JP ZIP prefecture city street (largest → smallest), country

Because formatted is built from the record's own parts, it always contains street and city verbatim — handy for asserting your address parser round-trips. state is null for locales without state/region data.

The data is mock: streets and cities are plausible fake values (a generated address almost certainly doesn't exist), and latitude/longitude (6 decimals) are uniformly random within the country's rough bounding box — they land in the right country region but not at the street, and near coasts may fall over water. With a seed the same request returns byte-identical addresses forever.

Use it for

  • Seed checkout, shipping and profile forms with locale-correct address fixtures
  • Test address parsing and formatting against 8 national layouts (US, DK, DE, FR, ES, IT, BR, JP)
  • Reproducible map/geo demos via seed — pins stay in the right country

Frequently asked questions

Are these real street addresses?

No — every address is generated. Streets, cities, states, zip codes and coordinates are plausible and internally consistent for the chosen locale, but they don't point at real buildings.

Can I generate addresses for a specific country?

Yes — set locale (8 supported, e.g. locale=de for Germany) and the street, city, state and zip formats plus the one-line formatted form follow that country's conventions.

Do the coordinates match the address?

They're generated to agree with the record's country so data stays coherent — but they're still fake: don't reverse-geocode them and expect the same street.

How do I get the same addresses in every test run?

Pass seed — an identical seed and params return identical records forever; combine with count (up to 100) for a stable fixture set.

Standards & references