Skip to content

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/provincesAll Indonesian provinces with their codes.
GET/wilayah/regenciesThe regencies and cities of one province.
GET/wilayah/districtsThe districts (kecamatan) of one regency or city.
GET/wilayah/villagesThe villages (kelurahan or desa) of one district.
GET/wilayah/regionOne region by its administrative code, such as 3171010, with the regions above it: its province, regency, district and village names.

provinces

GET/v1/wilayah/provinces

All Indonesian provinces with their codes.

scope social:read1 unitcached 24 hpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
parentIdstring
curl "https://api.hoshime.com/v1/wilayah/provinces" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/regencies

The regencies and cities of one province.

scope social:read1 unitcached 24 hpaginated

Parameters

province
string
required
Province code, such as 31 for DKI Jakarta.
e.g. 31
tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
parentIdstring
curl "https://api.hoshime.com/v1/wilayah/regencies?province=31" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/districts

The districts (kecamatan) of one regency or city.

scope social:read1 unitcached 24 hpaginated

Parameters

regency
string
required
Regency or city code, such as 3171 for South Jakarta.
e.g. 3171
tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
parentIdstring
curl "https://api.hoshime.com/v1/wilayah/districts?regency=3171" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/villages

The villages (kelurahan or desa) of one district.

scope social:read1 unitcached 24 hpaginated

Parameters

district
string
required
District code, such as 3171010 for Jagakarsa.
e.g. 3171010
tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
parentIdstring
curl "https://api.hoshime.com/v1/wilayah/villages?district=3171010" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/region

One 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

code
string
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
tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
parentIdstring
curl "https://api.hoshime.com/v1/wilayah/region?code=3171010" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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
  }
}
esc
↑↓ move↵ open