# LokalAPI Indonesian Administrative Region Search

> LokalAPI Indonesian Administrative Region Search is a paid API for AI agents from api.lokalapi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Search Indonesian administrative regions (province, regency/city, district, village) by name and return official Kemendagri 2025 codes with full hierarchy

## Facts

- Endpoint: GET https://api.lokalapi.com/v1/wilayah/search?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lokalapi-indonesian-administrative-region-search-0d0cf3e7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IL6Q0E83UXmj6390WIXYp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lokalapi-indonesian-administrative-region-search-0d0cf3e7
```

Example prompt: Search for the official Kemendagri 2025 code and full administrative hierarchy for 'Sinduharjo' — it's a village-level region in Indonesia, limit results to 5.

## When to prefer this

Use this endpoint when you need the official Kemendagri 2025 administrative region code for any Indonesian province, regency/city, district, or village — especially for OSS business registration, government form filling, address validation, or geospatial data enrichment involving Indonesia. Prefer this over general geocoding APIs (like Google Maps) when you specifically need the standardized Indonesian government code rather than just coordinates or postal addresses.

## Known failure modes

- No results found if the region name is misspelled or uses unofficial abbreviations
- Ambiguous results when a common name exists at multiple levels or locations — use the `level` and `parent` parameters to narrow down
- Rate limiting or payment failure if the x402 payment of $0.005 USDC is not properly processed
- Empty result set for very new or very small villages not yet indexed in the 2025 Kemendagri dataset
- Results capped at the specified limit (max 25); use `parent` to narrow scope if too many matches appear

## How this service works

Search official Indonesian administrative regions (province, regency/city, district, village) by name and get the official Kemendagri 2025 code plus full hierarchy. Handles 'Kab.', 'Kota', 'Kec.' prefixes.

## Output

Returns a list of matching Indonesian administrative regions, each with its official Kemendagri 2025 code, full name (including Kab./Kota/Kec. prefix handling), administrative level, and parent hierarchy (e.g. village → district → regency → province chain).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Region name, e.g. 'Sleman', 'Kota Yogyakarta', 'Sinduharjo'"
      },
      "level": {
       "enum": [
        "provinsi",
        "kabupaten_kota",
        "kecamatan",
        "desa_kelurahan"
       ],
       "type": "string"
      },
      "limit": {
       "type": "integer",
       "maximum": 25,
       "minimum": 1
      },
      "parent": {
       "type": "string",
       "description": "Restrict to children of this code, e.g. '34.04'"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lokalapi-indonesian-administrative-region-search-0d0cf3e7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.lokalapi.com](https://www.zero.xyz/host/api.lokalapi.com/llms.txt)
