1. Datasets
  2. Postal Codes

Postal Codes API

Match postal codes to place names and administrative areas. 1,836,750 records across 124 countries and territories, from GeoNames.

GET /v1/postal-codesCC BY 4.0124 countries28 Nov 2026

Request and response

The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

GET/v1/postal-codes
curl 'https://api.apifor.dev/v1/postal-codes' \
  -G -d country=AD -d limit=1 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "country_code": "AD",
      "postal_code": "AD100",
      "place_name": "Canillo",
      "admin1_name": "Canillo",
      "admin1_code": "02",
      "admin2_name": null,
      "admin2_code": null,
      "admin3_name": null,
      "admin3_code": null,
      "lat": 42.5833,
      "lng": 1.6667,
      "accuracy": 6
    }
  ]
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
idinteger1
country_codestring"AD"
postal_codestring"AD100"
place_namestring"Canillo"
admin1_namestring"Canillo"
admin1_codestring"02"
admin2_namenullablenull
admin2_codenullablenull
admin3_namenullablenull
admin3_codenullablenull
latnumber42.5833
lngnumber1.6667
accuracyinteger6

Filters and paging

Query parameters accepted by GET /v1/postal-codes. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
pageintegermin 1 · default 1
limitinteger1 to 200 · default 50
countrystringISO 3166-1 alpha-2
qstring2 to 100 chars
postal_codestringNone

Coverage by country

124 countries and territories have records in the 28 Nov 2026 snapshot. Each one has its own page with filters and counts.