1. Datasets
  2. Postal Codes
  3. Niue

Niue Postal Codes API

1 postal code for Niue, from GeoNames. Filter the collection with country=NU and you get the same JSON shape as every other country.

GET /v1/postal-codesCC BY 4.0NU28 Nov 2026

Request and response

Add country filtering to the collection endpoint and you get Niue records back. 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=NU \
  -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