API Documentation

Parameter

No. Parameter Value Description
1 cmd
  • election
  • constituency
  • candidacy
  • candidate
  • wilayah_browse
  • wilayah_read
  • pollingstation_browse
  • pollingstation_read
  • result
Masing-masing adalah method dari service yang akan dijalankan di server
2 wilayah_id Lihat tabel referensi dataset Nomor ID untuk wilayah dari Provinsi hingga Kelurahan. Pada beberapa dataset selain wilayah.csv ditulis dengan nama berbeda yaitu pro_id atau kab_id.
3 constituency_id Lihat tabel referensi dataset Nomor ID untuk Dapil (Daerah Pemilihan), untuk Pilkada satu Pilkada satu Dapil. Pada Pemilu Legislatif satu Pemilu dapat terdiri dari beberapa Dapil.
4 candidacy_id Lihat tabel referensi dataset Nomor ID untuk pencalonan Paslon (Pasangan Calon). Satu Dapil dapat terdiri dari beberapa Paslon.
5 candidate_id Lihat tabel referensi dataset Nomor ID untuk Calon/Wakil. Dalam satu Paslon hanya terdiri dari dua orang, calon dan wakilnya.
6 tps_id Lihat tabel referensi dataset Nomor ID untuk TPS (Tempat Pemungutan Suara)
7 form_id Lihat tabel referensi dataset Nomor ID untuk Form Hasil, penggunaannya dikombinasikan dengan #wilayah_id

Contoh Request

No. Method URL Contoh Response JSON
1 election http://data.kpu.go.id/open/v1/api.php?cmd=election&wilayah_id=6729
{ "cmd" : "election",
  "comm" : "ok",
  "data" : [ { "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "kab_id" : "6729",
        "paslon" : "3",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup"
      },
      { "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "kab_id" : "6729",
        "paslon" : "3",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup"
      },
      { "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "kab_id" : "6729",
        "paslon" : "3",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup"
      }
    ],
  "records" : 3,
  "total_paslon" : 9,
  "wilayah" : "Wilayah > SUMATERA UTARA > LABUHANBATU SELATAN"
}
                                
2 constituency http://data.kpu.go.id/open/v1/api.php?cmd=constituency&constituency_id=1
{ "cmd" : "constituency",
  "comm" : "ok",
  "data" : [ { "calon" : "H. WILDAN ASWAN TANJUNG, SH, MM",
        "calon_id" : "1",
        "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "endorsement" : [ "Partai Demokrasi Indonesia Perjuangan",
            "Partai Keadilan Sejahtera",
            "Partai Demokrat",
            "Partai Bulan Bintang",
            "Partai Amanat Nasional",
            "Partai Hati Nurani Rakyat",
            "Partai NasDem"
          ],
        "kab_id" : "6729",
        "nourut" : "1",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup",
        "wakil" : "KHOLIL JUFRI HARAHAP",
        "wakil_id" : "2"
      },
      { "calon" : "H. USMAN, SE.M.SI.",
        "calon_id" : "3",
        "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "endorsement" : [ "Partai Golkar",
            "Partai Gerindra"
          ],
        "kab_id" : "6729",
        "nourut" : "2",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup",
        "wakil" : "ARWI WINATA",
        "wakil_id" : "4"
      },
      { "calon" : "BASYARUDDIN SIREGAR",
        "calon_id" : "5",
        "constituency_id" : "1",
        "dapil" : "LABUHANBATU SELATAN",
        "election_id" : "1",
        "endorsement" : "Perorangan",
        "kab_id" : "6729",
        "nourut" : "3",
        "pro_id" : "6728",
        "provinsi" : "SUMATERA UTARA",
        "type" : "pilbup",
        "wakil" : "YUSPIN, SH",
        "wakil_id" : "6"
      }
    ],
  "records" : 3,
  "wilayah" : "Wilayah > SUMATERA UTARA > LABUHANBATU SELATAN"
}
3 candidacy http://data.kpu.go.id/open/v1/api.php?cmd=candidacy&candidacy_id=1
{ "cmd" : "candidacy",
  "comm" : "ok",
  "data" : { "calon" : "H. WILDAN ASWAN TANJUNG, SH, MM",
      "calon_id" : "1",
      "constituency_id" : "1",
      "dapil" : "LABUHANBATU SELATAN",
      "election_id" : "1",
      "endorsement" : [ "Partai Demokrasi Indonesia Perjuangan",
          "Partai Keadilan Sejahtera",
          "Partai Demokrat",
          "Partai Bulan Bintang",
          "Partai Amanat Nasional",
          "Partai Hati Nurani Rakyat",
          "Partai NasDem"
        ],
      "kab_id" : "6729",
      "nourut" : "1",
      "pro_id" : "6728",
      "provinsi" : "SUMATERA UTARA",
      "type" : "pilbup",
      "wakil" : "KHOLIL JUFRI HARAHAP",
      "wakil_id" : "2"
    },
  "wilayah" : "Wilayah > SUMATERA UTARA > LABUHANBATU SELATAN"
}
4 wilayah_browse http://data.kpu.go.id/open/v1/api.php?cmd=wilayah_browse&wilayah_id=53241
{ "cmd" : "wilayah_browse",
  "comm" : "ok",
  "data" : [ { "daerah" : "5",
        "nama" : "JEMBRANA",
        "parent" : "53241",
        "singkatan" : "jembranakab",
        "tingkat" : "2",
        "wilayah_id" : "53242"
      },
      { "daerah" : "10",
        "nama" : "TABANAN",
        "parent" : "53241",
        "singkatan" : "tabanankab",
        "tingkat" : "2",
        "wilayah_id" : "53299"
      },
      { "daerah" : "6",
        "nama" : "BADUNG",
        "parent" : "53241",
        "singkatan" : "badungkab",
        "tingkat" : "2",
        "wilayah_id" : "53439"
      },
      { "daerah" : "7",
        "nama" : "GIANYAR",
        "parent" : "53241",
        "singkatan" : "gianyarkab",
        "tingkat" : "2",
        "wilayah_id" : "53508"
      },
      { "daerah" : "4",
        "nama" : "KLUNGKUNG",
        "parent" : "53241",
        "singkatan" : "klungkungkab",
        "tingkat" : "2",
        "wilayah_id" : "53586"
      },
      { "daerah" : "4",
        "nama" : "BANGLI",
        "parent" : "53241",
        "singkatan" : "banglikab",
        "tingkat" : "2",
        "wilayah_id" : "53650"
      },
      { "daerah" : "8",
        "nama" : "KARANGASEM",
        "parent" : "53241",
        "singkatan" : "karangasemkab",
        "tingkat" : "2",
        "wilayah_id" : "53727"
      },
      { "daerah" : "9",
        "nama" : "BULELENG",
        "parent" : "53241",
        "singkatan" : "bulelengkab",
        "tingkat" : "2",
        "wilayah_id" : "53814"
      },
      { "daerah" : "4",
        "nama" : "KOTA DENPASAR",
        "parent" : "53241",
        "singkatan" : "denpasarkota",
        "tingkat" : "2",
        "wilayah_id" : "53972"
      }
    ],
  "records" : 9,
  "wilayah" : "Wilayah > BALI"
}
5 wilayah_read http://data.kpu.go.id/open/v1/api.php?cmd=wilayah_read&wilayah_id=53241
{ "cmd" : "wilayah_read",
  "comm" : "ok",
  "data" : { "daerah" : "4",
      "nama" : "BALI",
      "parent" : "0",
      "singkatan" : "baliprov",
      "tingkat" : "1",
      "wilayah_id" : null
    },
  "wilayah" : "Wilayah > BALI"
}
6 pollingstation_browse (result #1) http://data.kpu.go.id/open/v1/api.php?cmd=pollingstation_browse&wilayah_id=53241 API akan mengembalikan respon berupa rekap jumlah TPS untuk masing-masing wilayah jika wilayah_id yang diberikan adalah wilayah_id untuk wilayah dengan tingkat < 4 (Provinsi/Kabupaten/Kecamatan)
{ "cmd" : "pollingstation_browse",
  "comm" : "ok",
  "data" : [ { "daerah" : "6",
        "jumlah_tps" : "10",
        "parent" : "53241",
        "tingkat" : "2",
        "wilayah" : "BADUNG",
        "wilayah_id" : "53439"
      },
      { "daerah" : "8",
        "jumlah_tps" : "1",
        "parent" : "53241",
        "tingkat" : "2",
        "wilayah" : "KARANGASEM",
        "wilayah_id" : "53727"
      }
    ],
  "records" : 2,
  "wilayah" : "Wilayah > BALI"
}
7 pollingstation_browse (result #2) http://data.kpu.go.id/open/v1/api.php?cmd=pollingstation_browse&wilayah_id=53994 API akan mengembalikan respon berupa daftar TPS untuk wilayah tingkat = 4 (Kelurahan)
{ "cmd" : "pollingstation_browse",
  "comm" : "ok",
  "data" : [ { "jumlah_dpt" : "690",
        "nomor_tps" : "1",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015651",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "479",
        "nomor_tps" : "2",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015652",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "703",
        "nomor_tps" : "3",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015653",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "430",
        "nomor_tps" : "4",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015654",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "552",
        "nomor_tps" : "5",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015655",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "729",
        "nomor_tps" : "6",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015656",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "448",
        "nomor_tps" : "7",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015657",
        "wilayah_id" : "53994"
      },
      { "jumlah_dpt" : "456",
        "nomor_tps" : "8",
        "parent" : "53984",
        "tipe" : "umum",
        "tps_id" : "2015658",
        "wilayah_id" : "53994"
      }
    ],
  "records" : 8,
  "wilayah" : "Wilayah > BALI > KOTA DENPASAR > DENPASAR TIMUR > SUMERTA KAUH"
}
8 pollingstation_read http://data.kpu.go.id/open/v1/api.php?cmd=pollingstation_read&tps_id=2015651
{ "cmd" : "pollingstation_read",
  "comm" : "ok",
  "data" : { "jumlah_dpt" : "690",
      "nomor_tps" : "1",
      "tipe" : "umum",
      "tps_id" : "2015651",
      "wilayah_id" : "53994"
    },
  "wilayah" : "Wilayah > BALI > KOTA DENPASAR > DENPASAR TIMUR > SUMERTA KAUH"
}
9 result http://data.kpu.go.id/open/v1/api.php?cmd=result&wilayah_id=53973&form_id=3650
{ "cmd" : "result",
  "comm" : "ok",
  "data" : { "d1a1j" : "109048",
      "d1a1l" : "54057",
      "d1a1p" : "54991",
      "d1a2j" : "45",
      "d1a2l" : "25",
      "d1a2p" : "20",
      "d1a3j" : "36",
      "d1a3l" : "20",
      "d1a3p" : "16",
      "d1a4j" : "661",
      "d1a4l" : "338",
      "d1a4p" : "323",
      "d1a5j" : "109790",
      "d1a5l" : "54440",
      "d1a5p" : "55350",
      "d1b1j" : "58498",
      "d1b1l" : "29510",
      "d1b1p" : "28988",
      "d1b2j" : "24",
      "d1b2l" : "14",
      "d1b2p" : "10",
      "d1b3j" : "36",
      "d1b3l" : "20",
      "d1b3p" : "16",
      "d1b4j" : "661",
      "d1b4l" : "338",
      "d1b4p" : "323",
      "d1b5j" : "59219",
      "d1b5l" : "29882",
      "d1b5p" : "29337",
      "d21" : "111912",
      "d22" : "24",
      "d23" : "52669",
      "d24" : "59219",
      "d31" : "58220",
      "d32" : "999",
      "d33" : "59219",
      "d41" : "64",
      "d42" : "25",
      "form_id" : "3650",
      "p1" : "45766",
      "p2" : "3644",
      "p3" : "8810",
      "p4" : "0",
      "p5" : "0",
      "p6" : "0",
      "p7" : "0",
      "p8" : "0",
      "wilayah_id" : "53973"
    },
  "wilayah" : "Wilayah > BALI > KOTA DENPASAR > DENPASAR SELATAN"
}