API Indonesia

面向 AI agents 的印度尼西亚公共数据:地区信息细化至 83,762 个村庄、邮政编码、节假日、祷告时间、BMKG 地震和天气、学校、医院、UMP 工资。需要 API Indonesia 密钥(Authorization: Bearer)。

托管 MCP 服务器

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

可安装到 Claude Code、Codex、Cursor 等客户端

文档

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.