API Reference

Postal Codes

Directory of 83,000+ postal codes across Indonesia complete with regional hierarchy from province to village. Static data sourced from the official dataset.

Product Brief

What this API gives you

Directory of 83,000+ postal codes across Indonesia complete with regional hierarchy from province to village. Static data sourced from the official dataset.

Coverage
4

ready-to-use endpoints in this product, with JSON responses and consistent error handling.

Access
API key

Can be tested on the free tier, then used in production through one API Indonesia key.

Sample resource
https://use.apiindonesia.id/api/v1/kodepos

Returns paginated postal codes with explicit BPS and Kemendagri administrative codes.

When should you use it?

The Postal Code API supports products that need to connect postal codes with Indonesian region hierarchy. It fits checkout, shipping labels, address validation, area search, and customer segmentation.

Address forms must auto-fill postal codes after users choose a region.

Support teams need to find a region when customers only provide a postal code.

Logistics products need to match postal codes with province, city, district, and village.

Postal-code relationships are not always one-to-one. Design the UI so users can still choose the right option.

Example product scenarios

This section separates the product page from the docs. The docs explain how to call endpoints; this page explains why the endpoints make sense for your feature.

  • E-commerce & logistics: auto-fill postal codes when a customer selects a shipping address.
  • Fintech: validate that a postal code matches the stated domicile address during KYC.
  • Address-lookup apps: search a region by postal code or vice versa.

Example Usage

Request
curl "https://use.apiindonesia.id/api/v1/kodepos?kabupaten_id=3273" \\
  -H "x-api-key: aip_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response · 200 OK
{
  "data": [
    {
      "id": "kp_3273011001",
      "village_code": "32.73.01.1001",
      "village_name": "ISOLA",
      "district_code": "32.73.01",
      "district_name": "SUKASARI",
      "regency_code": "32.73",
      "regency_name": "KOTA BANDUNG",
      "province_code": "32",
      "province_name": "JAWA BARAT",
      "postal_code": "40154",
      "kode_pos": "40154",
      "bps_village_code": "3273010001",
      "kemendagri_village_code": "32.73.01.1001",
      "source_version": "2026.06",
      "crosswalk_source_version": "BPS Semester 1 2025 / Kemendagri 2025",
      "is_active": 1
    }
  ],
  "meta": {
    "total": 151,
    "page": 1,
    "per_page": 20,
    "total_pages": 8
  }
}

Related Articles

[ 05 of 07 ]·Pricing
Simple Pricing

Choose a plan
by volume

Start free. Upgrade to Pro or Business, or buy pay as you go credits when you need a one-time top-up. Payments are processed through Sumopod.

Yearly saves 2 months

Prefer marketplace billing?Subscribe via RapidAPI

Do you want to skip subscriptions? Top up credits once from the dashboard and use them until they run out.

Open dashboard

Free

For trying the API and early integration.

IDR 0/month
1,000 free requests/month
Start for free
  • Access to every endpoint
  • 10 req/sec rate limit
  • API key created instantly
  • Best-effort email support

Pro

Most popular

For projects that are starting to get real usage.

IDR 49,000/month
50,000 credits
Subscribe
  • Every public data endpoint
  • 20 req/sec rate limit
  • 1 credit per successful request
  • Priority email support

Business

For production apps with higher traffic.

IDR 149,000/month
250,000 credits
Subscribe
  • Small-to-mid production credits
  • 60 req/sec rate limit
  • Priority support
  • Room for custom limits

Custom

For high volume, SLA, or company contracts.

From / month
IDR 500,000
Limit by agreement
Discuss needs
  • Custom volume and rate limit
  • SLA and company invoice
  • Priority support
  • Technical onboarding
[ 08 of 08 ]·FAQ
Frequently Asked

Answers Before
You Get Started

Quick answers to common questions about getting started, the free tier, API key security, data sources, and Sumopod billing.

API Indonesia is a REST API service for Indonesian public data: administrative regions down to village and postal code level, public holidays, prayer times, schools, universities, hospitals, and realtime earthquake data from BMKG — all through a single API key.
Fully self-service: sign up, create an API key in the dashboard, and start calling endpoints with the x-api-key header. No manual verification, no sales calls — you can make your first request within minutes.
Yes. API keys are stored as SHA-256 hashes so they are never persisted in their original form, and all traffic runs exclusively over HTTPS. If a key is ever exposed, you can rotate or revoke it at any time straight from the dashboard.
The free tier includes 1,000 successful requests per month with a rate limit of 10 requests per second, plus access to every API product. After that, you can upgrade to Pro or Business, or top up pay as you go credits from the dashboard.
Only successful requests consume credits. Failed requests, validation errors, or server-side issues never reduce your balance, so you only pay for data you actually receive.
Upgrade straight from the dashboard with payment through Sumopod. Pro at IDR 49,000 gives 50,000 credits and 20 requests per second; Business at IDR 149,000 gives 250,000 credits and 60 requests per second. If you do not want a subscription, you can also buy pay as you go credits. Yearly billing saves 2 months.
All data comes from official sources: Permendagri for regions, SK Menpan for public holidays, Kemenag for prayer times, Dapodik Kemdikbud and Dikti for education, SIRS Kemenkes for hospitals, and BMKG for earthquakes (required attribution: "Data sourced from BMKG"). Data is refreshed as the official sources publish updates; earthquake data is available in realtime.
Yes. API Indonesia runs on Cloudflare's edge network with 99.9% uptime and sub-100ms response latency. This distributed infrastructure keeps the API fast and reliable for production workloads — from fintech KYC to high-traffic e-commerce checkouts.
Get Started

Start Integrating
Today

Sign up for free, grab an API key, and call your first endpoint right away — no credit card, no tedious approval process.

Dot wave visualization