API Reference

Earthquakes

Realtime earthquake data sourced from BMKG, refreshed automatically every hour via cron.

Product Brief

What this API gives you

Realtime earthquake data sourced from BMKG, refreshed automatically every hour via cron.

Coverage
3

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/gempa/terkini

Returns the 15 most recent earthquakes, newest first.

When should you use it?

The Earthquake API fits media, disaster-mitigation apps, operations dashboards, and notification systems that need current BMKG earthquake data without scraping public pages.

The product needs a current earthquake feed for widgets, push notifications, or dashboards.

Teams need magnitude, depth, location, and event time in a JSON response.

The app needs periodically refreshed data without running its own cron job.

For safety-critical systems, still follow official BMKG channels and local authority procedures. This API fits product integration, not the only source for emergency decisions.

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.

  • Disaster-mitigation apps: push realtime earthquake alerts to users in affected regions.
  • Media & news sites: auto-populate a live earthquake widget without manual editorial input.
  • Disaster research: analyze earthquake patterns and frequency from historical BMKG data.

Example Usage

Request
curl "https://use.apiindonesia.id/api/v1/gempa/terkini" \
  -H "x-api-key: aip_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response · 200 OK
{
  "data": [
    {
      "id": "eq_20260702_0413",
      "datetime": "2026-07-02 04:13:21",
      "magnitude": 5.4,
      "depth_km": 10,
      "lat": -8.12,
      "lng": 110.34,
      "region": "Pacitan, Jawa Timur",
      "potential": "Tidak berpotensi tsunami",
      "is_felt": 1,
      "felt_areas": "III Yogyakarta, II-III Pacitan",
      "source": "BMKG"
    }
  ]
}

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