公
Wilayah Indonesia API
5 endpointsGovernment & Open DataIDsocial:read4 real examples
Returns Indonesian provinces, regencies, districts and villages with their administrative codes.
View as Markdown| GET | /wilayah/provinces | All Indonesian provinces with their codes. |
| GET | /wilayah/regencies | The regencies and cities of one province. |
| GET | /wilayah/districts | The districts (kecamatan) of one regency or city. |
| GET | /wilayah/villages | The villages (kelurahan or desa) of one district. |
| GET | /wilayah/region | One region by its administrative code, such as 3171010, with the regions above it: its province, regency, district and village names. |
provinces
GET
/v1/wilayah/provincesAll Indonesian provinces with their codes.
scope social:read1 unitcached 24 hpaginated
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
id | string |
name | string |
parentId | string |
curl "https://api.hoshime.com/v1/wilayah/provinces" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/wilayah/provinces", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/wilayah/provinces", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "11", "name": "ACEH", "parentId": "" }, { "id": "12", "name": "SUMATERA UTARA", "parentId": "" } ], "meta": { "cached": false, "endpoint": "provinces", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "wilayah", "requestId": "req_2Xb9kQ…", "units": 1 } }
regencies
GET
/v1/wilayah/regenciesThe regencies and cities of one province.
scope social:read1 unitcached 24 hpaginated
Parameters
provincestring required | Province code, such as 31 for DKI Jakarta. e.g. 31 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
id | string |
name | string |
parentId | string |
curl "https://api.hoshime.com/v1/wilayah/regencies?province=31" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/wilayah/regencies?province=31", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/wilayah/regencies?province=31", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "3101", "name": "KABUPATEN KEPULAUAN SERIBU", "parentId": "31" }, { "id": "3171", "name": "KOTA JAKARTA SELATAN", "parentId": "31" } ], "meta": { "cached": false, "endpoint": "regencies", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "wilayah", "requestId": "req_2Xb9kQ…", "units": 1 } }
districts
GET
/v1/wilayah/districtsThe districts (kecamatan) of one regency or city.
scope social:read1 unitcached 24 hpaginated
Parameters
regencystring required | Regency or city code, such as 3171 for South Jakarta. e.g. 3171 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
id | string |
name | string |
parentId | string |
curl "https://api.hoshime.com/v1/wilayah/districts?regency=3171" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/wilayah/districts?regency=3171", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/wilayah/districts?regency=3171", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "3171010", "name": "JAGAKARSA", "parentId": "3171" }, { "id": "3171020", "name": "PASAR MINGGU", "parentId": "3171" } ], "meta": { "cached": false, "endpoint": "districts", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "wilayah", "requestId": "req_2Xb9kQ…", "units": 1 } }
villages
GET
/v1/wilayah/villagesThe villages (kelurahan or desa) of one district.
scope social:read1 unitcached 24 hpaginated
Parameters
districtstring required | District code, such as 3171010 for Jagakarsa. e.g. 3171010 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
id | string |
name | string |
parentId | string |
curl "https://api.hoshime.com/v1/wilayah/villages?district=3171010" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/wilayah/villages?district=3171010", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/wilayah/villages?district=3171010", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "3171010001", "name": "CIPEDAK", "parentId": "3171010" }, { "id": "3171010002", "name": "SRENGSENG SAWAH", "parentId": "3171010" } ], "meta": { "cached": false, "endpoint": "villages", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "wilayah", "requestId": "req_2Xb9kQ…", "units": 1 } }
region
GET
/v1/wilayah/regionOne region by its administrative code, such as 3171010, with the regions above it: its province, regency, district and village names.
scope social:read1 unitcached 24 hpaginated
Parameters
codestring required | Administrative code: 2 digits for a province, 4 for a regency or city, 7 for a district, 10 for a village. e.g. 3171010 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
3 fields
id | string |
name | string |
parentId | string |
curl "https://api.hoshime.com/v1/wilayah/region?code=3171010" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/wilayah/region?code=3171010", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/wilayah/region?code=3171010", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "abc123", "name": "…", "parentId": "abc123" } ], "meta": { "cached": false, "endpoint": "region", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "wilayah", "requestId": "req_2Xb9kQ…", "units": 1 } }