Sources › Indonesia › Wilayah Indonesia › Search

Wilayah Indonesia Search API

Search regions by name across all four levels; returns BPS and Kemendagri codes.

Wilayah IndonesiaGET /searchAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/indonesia:wilayah/search

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 1 day.

Parameters

NameTypeInRequiredDescription
qstringqueryYesRegion name, at least 2 characters. Matches names only, never codes. SQL wildcards work: % for any run of characters, _ for exactly one. Example: bojong%soang

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/indonesia:wilayah/search?q=bojong%25soang" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/indonesia:wilayah/search?q=bojong%25soang", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/indonesia:wilayah/search",
    params={"q":"bojong%soang"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "indonesia:wilayah",
  "data": {
    "count": 2,
    "items": [
      {
        "code": "3204280",
        "name": "BOJONGSOANG",
        "level": "district",
        "kodeDagri": "32.04.08",
        "namaDagri": "BOJONGSOANG"
      },
      {
        "code": "3204280002",
        "name": "BOJONGSOANG",
        "level": "village",
        "kodeDagri": "32.04.08.2002",
        "namaDagri": "BOJONGSOANG"
      }
    ],
    "query": "bojong%soang",
    "provider": "sig-bps",
    "truncated": false
  },
  "timestamp": "2026-09-02T07:32:13Z"
}

Frequently asked questions

How do I call the Wilayah Indonesia Search API?

Send a GET request to https://api.zapi.ink/v1/indonesia:wilayah/search?q=bojong%25soang with your Zapi key in the x-api-key header. Parameters — required: q. The response is JSON in the { project, data, timestamp } envelope.

What does the Wilayah Indonesia Search API return?

Search regions by name across all four levels; returns BPS and Kemendagri codes. The example response has the fields count, items, query, provider, truncated. Each item in items has fields such as code, name, level, kodeDagri, namaDagri.

Is the Wilayah Indonesia Search API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the Wilayah Indonesia Search API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "wilayah" and endpoint "search".

What other Wilayah Indonesia API endpoints are there?

It has 2 endpoints. Besides Search: Provinces.