API Indonesia

Indonesian public data for AI agents: regions down to 83,762 villages, postal codes, holidays, prayer times, BMKG earthquakes and weather, schools, hospitals, UMP wages. Needs an API Indonesia key (Authorization: Bearer).

Hosted MCP Server

npx add-mcp 'https://mcp.apiindonesia.id/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

API Indonesia examples

Code examples for API Indonesia, a REST API and MCP server for Indonesian public data, built by Khaisa Studio (Khairul Muhtadin).

What's in the API

30 API products, including:

  • Wilayah: 38 provinsi, 514 kabupaten/kota, 7,285 kecamatan, 83,762 desa/kelurahan (Kemendagri codes)
  • Kode pos: 83,762 records mapped per desa/kelurahan
  • Hari libur nasional and cuti bersama
  • Jadwal sholat per kabupaten/kota
  • BMKG: gempa terkini, cuaca, peringatan dini
  • Sekolah (93,500+ by NPSN), perguruan tinggi (4,600+), rumah sakit (2,900+)
  • UMP 1997 to 2026 (all 38 provinces for 2026)
  • Kurs, Bank Indonesia exchange rates, Al-Quran, Alkitab, KBBI, plat nomor, halal, BPOM, hijriah, validasi NIK/NPWP/rekening bank, and Rupiah/QRIS utilities

The full endpoint list is in the OpenAPI spec.

Pricing

There is no monthly free tier. New accounts get a one-time 3,000 credit signup bonus (1 credit = Rp1), no credit card needed. A successful data request costs 2 credits (Rp2); failed requests are not charged.

Authentication

Send your key in the x-api-key header:

curl -H "x-api-key: YOUR_API_KEY" https://use.apiindonesia.id/api/v1/wilayah/provinsi

The MCP server takes the same key as a bearer token: Authorization: Bearer YOUR_API_KEY.

Never commit a real key. The examples read it from the API_INDONESIA_KEY environment variable.

Examples

FolderWhat it shows
examples/curlShell requests for wilayah, kode pos, hari libur, jadwal sholat, gempa
examples/javascriptfetch (Node 18+ or browser)
examples/pythonrequests
examples/phpcURL extension, no dependencies
examples/n8nUsing the n8n community node
examples/mcpClaude Desktop and Cursor config for the MCP server

server.json is the same entry published to the official MCP Registry.

License

MIT for the code in this repository. Data returned by the API comes from its original public sources; see https://apiindonesia.id for details.