# Wilayah Indonesia API

> Wilayah Indonesia API on Apizie: 5 endpoints (Provinsi, Kabupaten/Kota, Kecamatan, Kelurahan/Desa, …) returned as clean JSON through one API key. 5 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/indonesia:wilayah/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `indonesia:wilayah`
- Category: Indonesia
- Status: live
- Source: https://kemendagri.go.id
- Page: https://zieapi.vercel.app/api/indonesia/wilayah
- OpenAPI: https://zieapi.vercel.app/api/indonesia/wilayah/openapi.json

Daftar provinsi, kabupaten/kota, kecamatan, dan kelurahan/desa beserta kodenya, dari dataset terbuka emsifa/api-wilayah-indonesia.

## Endpoints

### Provinsi
`GET https://zieapi.vercel.app/v1/indonesia:wilayah/provinces`

### Kabupaten/Kota
`GET https://zieapi.vercel.app/v1/indonesia:wilayah/regencies`

| Parameter | Type | Required | Description |
|---|---|---|---|
| provinceCode | string | yes | Kode provinsi (2 digit) |

### Kecamatan
`GET https://zieapi.vercel.app/v1/indonesia:wilayah/districts`

| Parameter | Type | Required | Description |
|---|---|---|---|
| regencyCode | string | yes | Kode kabupaten/kota (4 digit) |

### Kelurahan/Desa
`GET https://zieapi.vercel.app/v1/indonesia:wilayah/villages`

| Parameter | Type | Required | Description |
|---|---|---|---|
| districtCode | string | yes | Kode kecamatan (7 digit) |

### Cari Wilayah
`GET https://zieapi.vercel.app/v1/indonesia:wilayah/search`

| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | yes | Potongan nama wilayah |
| level | string | no | Batasi jenis wilayah |

## Example
```
curl "https://zieapi.vercel.app/v1/indonesia:wilayah/provinces" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the Wilayah Indonesia API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/indonesia:wilayah/provinces with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Wilayah Indonesia API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the Wilayah Indonesia API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key indonesia:wilayah.

### What is the status of the Wilayah Indonesia API?
Live: works with just an Apizie key
