Postal Codes All docs

Postal Codes API Reference

2 routes under /v1/postal-codes. Base URL https://api.apifor.dev, authenticated with x-api-key, one credit per request. Coverage and licence are on the Postal Codes page.

GET/v1/postal-codes

List postal codes with filters and paging.

ParameterInTypeRules
pagequeryintegermin 1 · default 1
limitqueryinteger1 to 200 · default 50
countryquerystringISO 3166-1 alpha-2
qquerystring2 to 100 chars
postal_codequerystringNone
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 · 200
{
  "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
    }
  ]
}
  • 200Successful response. Pagination is explicit; no silent truncation.
  • 400Invalid query parameters
  • 404Record not found
  • 500Dataset unavailable
GET/v1/postal-codes/{id}

Find postal codes by identifier.

ParameterInTypeRules
id *pathstringNone
GET/v1/postal-codes/{id}
curl 'https://api.apifor.dev/v1/postal-codes/{id}' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "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
  }
}
  • 200Successful response. Pagination is explicit; no silent truncation.
  • 400Invalid query parameters
  • 404Record not found
  • 500Dataset unavailable

Error handling · Rate limits · Source licences