1. Indonesia
  2. Postal codes

Indonesia Postal codes API

Indonesian postal codes from Indonesian postal reference and GeoNames crosswalks, served through the same key and JSON format as the world datasets.

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/id/postal-codes
curl 'https://api.apifor.dev/v1/id/postal-codes' \
  -G -d limit=1 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "success": true,
  "data": [
    {
      "id": "legacy-villages-v1:1101012001",
      "postal_code": "23773",
      "village_code": "1101012001",
      "district_code": "110101",
      "regency_code": "1101",
      "province_code": "11"
    }
  ]
}

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
idstring"legacy-villages-v1:1101012001"
postal_codestring"23773"
village_codestring"1101012001"
district_codestring"110101"
regency_codestring"1101"
province_codestring"11"

Filters and paging

Query parameters accepted by GET /v1/id/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