# Indonesia Earthquake Alerts (BMKG) – M5+, Felt, Tsunami (`nusantara-data-tools/bmkg-indonesia-earthquakes`) Actor

Real-time Indonesian earthquakes from BMKG: magnitude, depth, location, tsunami potential, felt MMI. Filter by magnitude, radius or region; "only new" mode for alerts.

- **URL**: https://apify.com/nusantara-data-tools/bmkg-indonesia-earthquakes.md
- **Developed by:** [Nusantara Data Tools](https://apify.com/nusantara-data-tools) (community)
- **Categories:** News, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Indonesia Earthquake Alerts API (BMKG) – Latest, M5+, Felt & Tsunami

**Real-time earthquake data for Indonesia from BMKG**, cleaned and translated to English: magnitude, depth, coordinates, nearest region, **tsunami potential**, felt intensity (MMI) and **shakemap image**. Filter by magnitude, depth, region or **radius around any point** (e.g. 300 km around Bali), and turn on **only-new mode** to build earthquake alerts to Slack, email, Telegram (via webhook), Make, Zapier or n8n.

Built for **villa & hotel operators, travel apps, insurers, logistics, newsrooms, NGOs, researchers and AI agents**.

### Features

- Merges BMKG's three feeds (latest event, last 15 M5.0+, last 15 felt) and de-duplicates them.
- English region text (`"60 km NE of Labuanbajo-NTT"`), numeric magnitude/depth, lat/lon, `maxMmi`.
- `tsunamiPotential` true/false + original Indonesian text.
- Distance filter with `distanceKm` in each row.
- **Only new since last run**: schedule every 5–15 minutes; you only get (and pay for) new quakes.

### Output example

```json
{
  "eventId": "2026-10-20T09:56:38Z_-10.19_123.71",
  "utcTime": "2026-10-20T09:56:38+00:00", "localTimeWib": "20 Okt 2026 16:56:38 WIB",
  "magnitude": 3.4, "depthKm": 4, "lat": -10.19, "lon": 123.71,
  "regionEn": "Epicenter on land, 30km SW of Kab. Kupang",
  "tsunamiPotential": null, "potentialEn": "Felt earthquake – info to be passed on to the public",
  "feltReportsMmi": "III Kab. Kupang, III Kota Kupang", "maxMmi": 3,
  "shakemapUrl": "https://static.bmkg.go.id/20261020165638.mmi.jpg",
  "feeds": ["felt", "latest"], "source": "BMKG (Badan Meteorologi, Klimatologi, dan Geofisika)"
}
```

### Example: alerts for Bali (M4.5+, within 300 km)

```json
{ "minMagnitude": 4.5, "centerLat": -8.65, "centerLon": 115.22, "radiusKm": 300, "onlyNewSinceLastRun": true }
```

### Pricing (pay per event)

- **$1 per 1,000 earthquakes** returned (event `earthquake`)
- Small per-run start fee (Apify `actor-start` event), so a 10-minute schedule costs about $4/month.

### Data source & terms

BMKG open earthquake data (data.bmkg.go.id/gempabumi). BMKG requires you to **credit BMKG as the source** — included in the `source` field. This Actor is not an official warning system; for life-safety decisions follow BMKG / InaTEWS official channels. Not affiliated with BMKG.

*Kata kunci: info gempa terkini BMKG, gempa hari ini, API gempa Indonesia, tsunami warning Indonesia, earthquake Bali Lombok.*

# Actor input Schema

## `feeds` (type: `array`):

latest = most recent event (with shakemap); m5plus = last 15 events M5.0+; felt = last 15 felt events. Results are merged and de-duplicated.

## `minMagnitude` (type: `number`):

e.g. 4.5

## `maxDepthKm` (type: `integer`):

Shallow quakes are usually more damaging. Leave empty for any depth.

## `centerLat` (type: `number`):

Use with radius, e.g. -8.65 for Bali (Denpasar).

## `centerLon` (type: `number`):

e.g. 115.22 for Bali (Denpasar).

## `radiusKm` (type: `integer`):

Only events within this distance of the center point. Adds distanceKm to each row.

## `regionKeywords` (type: `array`):

Match BMKG region / felt text, e.g. 'Bali', 'Lombok', 'Sumatera', 'Kupang'.

## `maxAgeHours` (type: `integer`):

Skip events older than this.

## `onlyTsunamiPotential` (type: `boolean`):

Output only events BMKG flags as 'berpotensi tsunami'.

## `onlyNewSinceLastRun` (type: `boolean`):

Remember returned events (named store 'bmkg-quakes-state'). Schedule every 5–15 min and connect Slack/email/webhook integration for alerts.

## Actor input object example

```json
{
  "feeds": [
    "latest",
    "m5plus",
    "felt"
  ],
  "minMagnitude": 0,
  "onlyTsunamiPotential": false,
  "onlyNewSinceLastRun": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Indonesian earthquakes from BMKG with magnitude, depth, location, tsunami flag and felt intensity.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nusantara-data-tools/bmkg-indonesia-earthquakes").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("nusantara-data-tools/bmkg-indonesia-earthquakes").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call nusantara-data-tools/bmkg-indonesia-earthquakes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nusantara-data-tools/bmkg-indonesia-earthquakes"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/v70nzWLSwlANYob58/builds/56iaXd9Z3F20xZujC/openapi.json
