Weather and earthquake data for Indonesia
A REST API and MCP server for BMKG open data: earthquakes, three-day forecasts for every village, severe weather warnings and region lookup. Every endpoint works without an API key. The source code is open under the MIT license.
curl https://bmkg-api.dhanypedia.com/v1/earthquake/latest Legend
- Earthquake epicentre, sized by magnitude (M 3, 5, 7)
- Latest earthquake
- Area under a weather warning
- Seismogram trace: one burst per earthquake
Scale holds at the equator
Latest earthquake
Loading data
Active weather warnings
Loading data
This map is drawn from four requests:
Endpoints
Every endpoint is a GET under /v1. Any row opens in the explorer.
| Endpoint | Returns | Cached for | Try |
|---|---|---|---|
| Earthquakes | |||
| /v1/earthquake/latest | The latest earthquake | 60 s | |
| /v1/earthquake/recent | Last 15 earthquakes of magnitude 5.0 or more | 5 min | |
| /v1/earthquake/felt | Last 15 earthquakes that were felt | 5 min | |
| /v1/earthquake/nearby | Recent earthquakes around a point | 5 min | |
| Weather | |||
| /v1/weather/{adm4_code} | 3-day forecast for one village | 15 min | |
| /v1/weather/{adm4_code}/current | Current weather for one village | 15 min | |
| Warnings | |||
| /v1/nowcast | Provinces with an active warning | 2 min | |
| /v1/nowcast/warnings | All active warnings with their areas | 2 min | |
| /v1/nowcast/{alert_code} | One warning with its affected areas | 2 min | |
| /v1/nowcast/check | Warnings that mention a place | 2 min | |
| Regions | |||
| /v1/wilayah/search | Find regions by name | 24 h | |
| /v1/wilayah/provinces | All provinces | 24 h | |
| /v1/wilayah/districts | Regencies and cities of a province | 24 h | |
| /v1/wilayah/subdistricts | Districts of a regency or city | 24 h | |
| /v1/wilayah/villages | Villages of a district | 24 h | |
API explorer
Requests go to the real API. Each result is shown as a preview, as raw JSON, with its cache headers, and as code to copy.
Run the request to see the response.
MCP server
The same data is available as 13 read-only tools for Claude, Cursor, VS Code and other MCP clients. The server is hosted, so a client needs one URL.
One command. Also available as a plugin: claude plugin marketplace add dhanyyudi/bmkg-api, then claude plugin install bmkg@bmkg-api.
claude mcp add --transport http bmkg https://mcp-bmkg.dhanypedia.com/mcpQuestions an assistant can then answer:
- Gempa terbaru di Indonesia?
- Cuaca 3 hari ke depan di Jakarta Selatan?
- Ada peringatan cuaca di Yogyakarta?