Wilayah Indonesia
Provinsi, kabupaten/kota, dan kecamatan.
Base URL
https://use.api.co.id
Semua endpoint ada di bawah path /regional/indonesia dan dipanggil dengan header x-api-co-id. Filter (nama, kode wilayah induk) dan nomor halaman dikirim sebagai query parameter. Response berisi metadata wilayah yang terstruktur beserta kode identifikasinya.
Struktur data
| Level | Endpoint |
|---|---|
| Provinsi | /provinces |
| Kabupaten/Kota | /regencies |
| Kecamatan | /districts |
| Desa/Kelurahan | /villages |
| Kode pos (terhubung ke desa/kelurahan) | /postal-codes |
Data bisa ditelusuri berjenjang (provinsi → kabupaten/kota → kecamatan → desa/kelurahan), difilter berdasarkan nama, dan mendukung pagination.
Endpoint premium
Endpoint berikut membutuhkan langganan premium:
| Endpoint | Fungsi |
|---|---|
/regional/indonesia/search | Pencarian lanjutan di semua level wilayah berdasarkan nama atau kode pos |
/regional/indonesia/postal-codes | Daftar semua kode pos |
/regional/indonesia/postal-codes/:postal_code | Daftar desa/kelurahan berdasarkan kode pos |
Field is_courier_support
Setiap data desa/kelurahan memuat field is_courier_support. Field ini memberi tahu apakah wilayah tersebut sudah didukung untuk cek ongkos kirim:
true— kode wilayah ini bisa langsung Anda gunakan di API Cek Ongkos Kirim.false— wilayah ini belum didukung untuk cek ongkos kirim. Silakan buka tiket untuk meminta aktivasi wilayah tersebut sebelum melakukan cek ongkir.
Dengan mengecek is_courier_support terlebih dahulu, Anda bisa memastikan kode wilayah sudah didukung sehingga terhindar dari kegagalan saat menghitung ongkos kirim.
Provinces
List All Provinces
Get all provinces in Indonesia.
### Query Parameters
- name (optional): Filter by province name (case-insensitive partial match)
- page (optional): Page number (default: 1)
- Note: Pagination size is fixed at 100 items per page and cannot be configured
### Examples
``bash # Get all provinces GET /regional/indonesia/provinces
# Search provinces by name GET /regional/indonesia/provinces?name=jawa
# With pagination GET /regional/indonesia/provinces?page=1
| Nama | Tipe | Keterangan |
|---|---|---|
nameOpsional | string | Filter by province name (case-insensitive partial match) Contoh: jawa |
pageOpsional | integer | Page number Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/provinces" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "11", "name": "ACEH" }, { "code": "12", "name": "SUMATERA UTARA" }, { "code": "13", "name": "SUMATERA BARAT" } ], "paging": { "page": 1, "size": 100, "total_item": 34, "total_page": 1 }}Get Province by Code
Get a specific province by code, including all regencies in that province.
### Path Parameters
- code (required): Province code (2 digits)
### Examples
``bash # Get Aceh province (code 11) GET /regional/indonesia/provinces/11
# Get Jakarta province (code 31) GET /regional/indonesia/provinces/31
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | Province code (2 digits) Contoh: 11 |
curl -X GET "https://use.api.co.id/regional/indonesia/provinces/11" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "code": "11", "name": "ACEH" }}Get Regencies in Province
Get all regencies/cities in a specific province.
### Path Parameters
- code (required): Province code
### Query Parameters
- name (optional): Filter by regency name
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | Province code Contoh: 11 |
| Nama | Tipe | Keterangan |
|---|---|---|
nameOpsional | string | Filter by regency name (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/provinces/11/regencies" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "1101", "name": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }, { "code": "1102", "name": "KABUPATEN ACEH SINGKIL", "province_code": "11", "province": "ACEH" } ], "paging": { "page": 1, "size": 100, "total_item": 23, "total_page": 1 }}Regencies
List All Regencies
Get all regencies/cities in Indonesia.
### Query Parameters
- province_code (optional): Filter by province code
- name (optional): Filter by regency name
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
province_codeOpsional | string | Filter by province code (optional) |
nameOpsional | string | Filter by regency name (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/regencies" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "1101", "name": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }, { "code": "1102", "name": "KABUPATEN ACEH SINGKIL", "province_code": "11", "province": "ACEH" }, { "code": "1201", "name": "KABUPATEN TAPANULI TENGAH", "province_code": "12", "province": "SUMATERA UTARA" } ], "paging": { "page": 1, "size": 100, "total_item": 514, "total_page": 6 }}Get Regency by Code
Get a specific regency by code.
### Path Parameters
- code (required): Regency code (4 digits)
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | Regency code (4 digits) Contoh: 1101 |
curl -X GET "https://use.api.co.id/regional/indonesia/regencies/1101" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "code": "1101", "name": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }}Get Districts in Regency
Get all districts in a specific regency.
### Path Parameters
- code (required): Regency code
### Query Parameters
- name (optional): Filter by district name
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | Regency code Contoh: 1101 |
| Nama | Tipe | Keterangan |
|---|---|---|
nameOpsional | string | Filter by district name (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/regencies/1101/districts" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "110101", "name": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }, { "code": "110102", "name": "SIMEULUE TIMUR", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" } ], "paging": { "page": 1, "size": 100, "total_item": 10, "total_page": 1 }}Districts
List All Districts
Get all districts in Indonesia.
### Query Parameters
- regency_code (optional): Filter by regency code
- name (optional): Filter by district name
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
regency_codeOpsional | string | Filter by regency code (optional) |
nameOpsional | string | Filter by district name (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/districts" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "110101", "name": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }, { "code": "110102", "name": "SIMEULUE TIMUR", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" } ], "paging": { "page": 1, "size": 100, "total_item": 7213, "total_page": 73 }}Get District by Code
Get a specific district by code.
### Path Parameters
- code (required): District code (6 digits)
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | District code (6 digits) Contoh: 110101 |
curl -X GET "https://use.api.co.id/regional/indonesia/districts/110101" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "code": "110101", "name": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }}Get Villages in District
Get all villages in a specific district.
### Path Parameters
- code (required): District code
### Query Parameters
- name (optional): Filter by village name
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | District code Contoh: 110101 |
| Nama | Tipe | Keterangan |
|---|---|---|
nameOpsional | string | Filter by village name (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/districts/110101/villages" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "1101010001", "name": "LATIUNG", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH", "postal_codes": [ "23891" ], "is_courier_support": true }, { "code": "1101010002", "name": "LABUHAN BAJAU", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH", "postal_codes": [ "23891" ], "is_courier_support": true } ], "paging": { "page": 1, "size": 100, "total_item": 18, "total_page": 1 }}Villages
List All Villages
Get all villages in Indonesia.
### Query Parameters
- district_code (optional): Filter by district code
- name (optional): Filter by village name
- postal_code (optional): Filter by postal code
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
| Nama | Tipe | Keterangan |
|---|---|---|
district_codeOpsional | string | Filter by district code (optional) |
nameOpsional | string | Filter by village name (optional) |
postal_codeOpsional | string | Filter by postal code (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/villages" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "1101010001", "name": "LATIUNG", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH", "postal_codes": [ "23891" ], "is_courier_support": true }, { "code": "1101010002", "name": "LABUHAN BAJAU", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH", "postal_codes": [ "23891" ], "is_courier_support": true } ], "paging": { "page": 1, "size": 100, "total_item": 83916, "total_page": 840 }}Get Village by Code
Get a specific village by code with full hierarchy information.
### Path Parameters
- code (required): Village code (10 digits)
| Nama | Tipe | Keterangan |
|---|---|---|
codeWajib | string | Village code (10 digits) Contoh: 1101010001 |
curl -X GET "https://use.api.co.id/regional/indonesia/villages/1101010001" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": { "code": "1101010001", "name": "LATIUNG", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH", "postal_codes": [ "23891" ], "is_courier_support": true }}Postal Codes (Premium)
List All Postal Codes
Get all postal codes. This endpoint requires a premium subscription.
### Query Parameters
- village_code (optional): Filter by village code
- postal_code (optional): Filter by postal code
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
### Error Responses
- 403 Forbidden: User is not a premium member
- 401 Unauthorized: User not authenticated
| Nama | Tipe | Keterangan |
|---|---|---|
village_codeOpsional | string | Filter by village code (optional) |
postal_codeOpsional | string | Filter by postal code (optional) |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/postal-codes" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "id": 1, "postal_code": "23891", "village_code": "1101010001", "village": "LATIUNG", "district_code": "110101", "district": "TEUPAH SELATAN", "regency_code": "1101", "regency": "KABUPATEN SIMEULUE", "province_code": "11", "province": "ACEH" }, { "id": 2, "postal_code": "12210", "village_code": "3174050001", "village": "GROGOL UTARA", "district_code": "317405", "district": "KEBAYORAN LAMA", "regency_code": "3174", "regency": "KOTA JAKARTA SELATAN", "province_code": "31", "province": "DKI JAKARTA" } ], "paging": { "page": 1, "size": 100, "total_item": 87657, "total_page": 877 }}Get Villages by Postal Code
Find villages by postal code. This endpoint requires a premium subscription.
### Path Parameters
- postal_code (required): Postal code (5 digits)
### Examples
``bash
# Find villages with postal code 12345
GET /regional/indonesia/postal-codes/12345
### Error Responses
- 403 Forbidden: User is not a premium member
- 401 Unauthorized: User not authenticated
| Nama | Tipe | Keterangan |
|---|---|---|
postal_codeWajib | string | Postal code (5 digits) Contoh: 12210 |
curl -X GET "https://use.api.co.id/regional/indonesia/postal-codes/12210" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "is_success": true, "message": "Success", "data": [ { "code": "3174050001", "name": "GROGOL UTARA", "district_code": "317405", "district": "KEBAYORAN LAMA", "regency_code": "3174", "regency": "KOTA JAKARTA SELATAN", "province_code": "31", "province": "DKI JAKARTA", "postal_codes": [ "12210" ], "is_courier_support": true } ], "paging": { "page": 1, "size": 100, "total_item": 1, "total_page": 1 }}Search (Premium)
Search Regional Data
Search across all regional data types by name or postal code. This endpoint requires a premium subscription.
### Query Parameters
- query (required): Search term (can be a name or postal code)
- type (optional): Filter by type (province, regency, district, village)
- page (optional): Page number
- Note: Pagination size is fixed at 100 items per page and cannot be configured
### Examples
``bash # Search by name GET /regional/indonesia/search?query=jakarta
# Search by postal code GET /regional/indonesia/search?query=12210
# Search only villages GET /regional/indonesia/search?query=bantul&type=village
### Error Responses
- 403 Forbidden: User is not a premium member
- 401 Unauthorized: User not authenticated
| Nama | Tipe | Keterangan |
|---|---|---|
queryWajib | string | Search term (required) - can be a name (province, regency, district, village) or postal code Contoh: jakarta |
typeOpsional | string | Filter by type: province, regency, district, village (optional) Nilai: provinceregencydistrictvillage |
pageOpsional | integer | Page number (optional) Contoh: 1 |
curl -X GET "https://use.api.co.id/regional/indonesia/search?query=jakarta" \ -H "x-api-co-id: $API_CO_ID_KEY"{ "status": "success", "timestamp": "2025-12-25 08:55:38", "result": [ { "province_code": "31", "province": "DKI JAKARTA", "city_code": "3174", "city": "KOTA JAKARTA SELATAN", "district_code": "317405", "district": "KEBAYORAN LAMA", "village_code": "3174050001", "village": "GROGOL UTARA", "postal_code": "12210", "is_courier_support": true } ], "paging": { "page": 1, "size": 100, "total_item": 1, "total_page": 1 }}