Skip to content

Regencies API

The Regencies API provides access to all 514 Indonesian regencies and cities (kabupaten/kota) with their geographic data and administrative relationships.

Endpoints

List Regencies

http
GET /nusa/regencies

Returns a paginated list of all regencies.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 15, max: 100)
searchstringSearch by name or code
codes[]arrayFilter by specific regency codes

Example Request

bash
curl "https://your-app.com/nusa/regencies?search=jakarta&per_page=10"

Example Response

json
{
  "data": [
    {
      "code": "31.71",
      "province_code": "31",
      "name": "Kota Jakarta Selatan",
      "latitude": -6.2615,
      "longitude": 106.8106,
      "coordinates": [...],
      "postal_codes": ["12110", "12120", "..."]
    }
  ],
  "links": {
    "first": "https://your-app.com/nusa/regencies?page=1",
    "last": "https://your-app.com/nusa/regencies?page=35",
    "prev": null,
    "next": "https://your-app.com/nusa/regencies?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 35,
    "per_page": 15,
    "to": 15,
    "total": 514
  }
}

Get Regency

http
GET /nusa/regencies/{code}

Returns a specific regency by its code.

Path Parameters

ParameterTypeDescription
codestringRegency code in xx.xx format

Example Request

bash
curl "https://your-app.com/nusa/regencies/33.75"

Get Regency Districts

http
GET /nusa/regencies/{code}/districts

Returns all districts within a specific regency.

Example Request

bash
curl "https://your-app.com/nusa/regencies/33.75/districts"

Get Regency Villages

http
GET /nusa/regencies/{code}/villages

Returns all villages within a specific regency.

Example Request

bash
curl "https://your-app.com/nusa/regencies/33.75/villages?per_page=50"

Data Attributes

Regency Object

AttributeTypeDescription
codestringRegency code in xx.xx format
province_codestringParent province code
namestringRegency/City name in Indonesian
latitudenumberGeographic center latitude
longitudenumberGeographic center longitude
coordinatesarrayBoundary polygon coordinates
postal_codesarrayAll postal codes within the regency

Released under the MIT License.