Dokumentasi API Wilayah Indonesia

API Wilayah Indonesia adalah api data wilayah seluruh indonesia mulai dari provinsi, kabupaten, kecamatan dan kelurahan.
Untuk informasi dapatkan api key di halaman utama, klik binderbyte.com

Request Provinsi

GET https://api.binderbyte.com/wilayah/provinsi?api_key=... HTTP/1.1

Response Provinsi

{
    "code": "200",
    "messages": "SUCCESS",
    "value": [
        {
            "id": "11",
            "name": "ACEH"
        },
        {
            "id": "12",
            "name": "SUMATERA UTARA"
        },
        {
            "id": "13",
            "name": "SUMATERA BARAT"
        }]
    }

Request Kabupaten

GET https://api.binderbyte.com/wilayah/kabupaten?api_key=...&id_provinsi=36 HTTP/1.1

Response Kabupaten

{
    "code": "200",
    "messages": "SUCCESS",
    "value": [
        {
            "id": "3601",
            "province_id": "36",
            "name": "KAB. PANDEGLANG"
        },
        {
            "id": "3602",
            "province_id": "36",
            "name": "KAB. LEBAK"
        },
        {
            "id": "3603",
            "province_id": "36",
            "name": "KAB. TANGERANG"
        }]
    }

Request Kecamatan

GET https://api.binderbyte.com/wilayah/kecamatan?api_key=...&id_kabupaten=3672 HTTP/1.1

Response Kecamatan

{
    "code": "200",
    "messages": "SUCCESS",
    "value": [
        {
            "id": "367201",
            "regency_id": "3672",
            "name": "Cibeber"
        },
        {
            "id": "367202",
            "regency_id": "3672",
            "name": "Cilegon"
        },
        {
            "id": "367203",
            "regency_id": "3672",
            "name": "Pulomerak"
        }]
    }

Request Kelurahan

GET https://api.binderbyte.com/wilayah/kelurahan?api_key=...&id_kabupaten=367202 HTTP/1.1

Response Kelurahan

{
    "code": "200",
    "messages": "SUCCESS",
    "value": [
        {
            "id": "3672021001",
            "district_id": "367202",
            "name": "Bagendung"
        },
        {
            "id": "3672021002",
            "district_id": "367202",
            "name": "Ciwedus"
        },
        {
            "id": "3672021003",
            "district_id": "367202",
            "name": "Bendungan"
        }]
    }

Response Error

{
        "code": "400",
        "messages": "FAILED_GET_VALUE"
}