API Reference

Earthquakes

The Earthquake API serves BMKG earthquake data synced automatically every hour: the 15 latest quakes, the 15 latest felt quakes with MMI intensity per area, and a history of up to 100 events per date range. Each record has magnitude, depth, coordinates, region and tsunami-potential status.

Main endpoint
GET https://use.apiindonesia.id/api/v1/gempa/terkini
Endpoints
3
Authentication
x-api-key header (create one free in the dashboard)
Price
2 credits (Rp2) per successful request; failed requests are free
Format
JSON (REST), with cURL, JavaScript and Python examples
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 tried with the 3,000 credit signup bonus, 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: YOUR_API_KEY"
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

Pricing 2 credits (Rp2) per successful request; failed requests are free. One-time 3,000 credit signup bonus, no credit card, no monthly allowance.

Earthquakes API questions

How often is earthquake data updated?

Data comes from BMKG and is synced automatically every hour by a cron job.

What is the difference between latest and felt earthquakes?

/gempa/terkini returns the 15 latest earthquakes. /gempa/dirasakan returns the 15 latest quakes reported as felt, with MMI intensity per area in the felt_areas field.

Can I get earthquake history for a date range?

Yes. GET /api/v1/gempa/history?start=YYYY-MM-DD&end=YYYY-MM-DD returns up to 100 events, newest first.

Get Started

Start Integrating
Today

Sign up for free and get a 3,000 credit bonus (Rp3,000) once your email is verified, grab an API key, and call your first endpoint right away. No credit card, no tedious approval process.

Dot wave visualization