bmkg-weather

Get real-time Indonesian weather forecasts and earthquake data from BMKG (Badan Meteorologi, Klimatologi, dan Geofisika) — Indonesia's official meteorological agency. Use this skill whenever the user asks about weather in Indonesia, Indonesian cities, rainfall, temperature, wind, humidity, earthquake alerts, or early warning in any Indonesian location. Trigger on phrases like "cuaca", "prakiraan cuaca", "hujan", "gempa", "BMKG", "cuaca Jakarta", "cuaca hari ini", "weather Indonesia", or any Indonesian city/region weather query. No API key required — completely free official government data.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bmkg-weather" with this command: npx skills add thommyid/bmkg-weather

BMKG Weather Skill

Fetch real-time Indonesian weather forecasts and earthquake data from BMKG's open API. No API key needed. Rate limit: 60 requests/minute per IP.

Attribution required: Always mention "Sumber: BMKG" in responses.


API Endpoints

1. Prakiraan Cuaca (Weather Forecast)

GET https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4={kode_wilayah}
  • Forecast: 3 hari ke depan, per 3 jam (8 data/hari)
  • Update: 2x sehari
  • Format: JSON

2. Peringatan Dini / Nowcast

GET https://data.bmkg.go.id/peringatan-dini-cuaca/
  • Early warning hingga level kecamatan
  • Format: XML (CAP)

3. Data Gempa Bumi

GET https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json
GET https://data.bmkg.go.id/DataMKG/TEWS/gempaterkini.json

Cara Penggunaan

Step 1: Tentukan kode wilayah (adm4)

Format kode: PP.KK.CC.DDDD

  • PP = Kode provinsi (2 digit)
  • KK = Kode kota/kabupaten (2 digit)
  • CC = Kode kecamatan (2 digit)
  • DDDD = Kode kelurahan/desa (4 digit)

Cara lookup kode wilayah (gunakan script):

python scripts/cari_wilayah.py "Padang"
python scripts/cari_wilayah.py "Bogor"

Script otomatis cari kode dan test validitasnya ke API BMKG.

Jika tidak ditemukan, cari manual di https://cuaca.bmkg.go.id Atau lihat: references/kode-wilayah.md

Step 2: Fetch data cuaca

# Contoh: Jakarta Pusat - Kemayoran
curl "https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4=31.71.03.1001"

# Contoh: Surabaya - Wonokromo
curl "https://api.bmkg.go.id/publik/prakiraan-cuaca?adm4=35.78.31.1007"

Step 3: Parse response JSON

Response structure:

{
  "lokasi": {
    "provinsi": "DKI Jakarta",
    "kotkab": "Kota Adm. Jakarta Pusat",
    "kecamatan": "Kemayoran",
    "desa": "Kemayoran",
    "lon": 106.845,
    "lat": -6.164,
    "timezone": "Asia/Jakarta"
  },
  "data": [{
    "cuaca": [
      [ /* hari 1, array per 3 jam */ ],
      [ /* hari 2 */ ],
      [ /* hari 3 */ ]
    ]
  }]
}

Step 4: Format response ke user

Untuk setiap entry cuaca, field yang tersedia:

FieldDeskripsiSatuan
local_datetimeWaktu lokalYYYY-MM-DD HH:mm:ss
tSuhu udara°C
huKelembapan%
weather_descKondisi cuaca (ID)-
weather_desc_enKondisi cuaca (EN)-
wsKecepatan anginkm/jam
wdArah angin dari-
tccTutupan awan%
vs_textJarak pandangkm
tpCurah hujanmm
imageURL ikon cuacaSVG

Data Gempa Bumi

# Gempa terbaru (1 gempa)
curl "https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json"

# 15 gempa terkini
curl "https://data.bmkg.go.id/DataMKG/TEWS/gempaterkini.json"

# 15 gempa dirasakan
curl "https://data.bmkg.go.id/DataMKG/TEWS/gempadirasakan.json"

Response fields gempa:

  • Tanggal, Jam — waktu kejadian
  • Magnitude — kekuatan gempa
  • Kedalaman — kedalaman dalam km
  • Wilayah — lokasi episenter
  • Potensi — potensi tsunami atau tidak
  • Koordinat — lat,lon

Contoh Output ke User

🌤️ Prakiraan Cuaca Jakarta Pusat - Kemayoran
📅 Senin, 26 April 2026 | 14:00 WIB

🌡️ Suhu: 31°C
💧 Kelembapan: 69%
🌬️ Angin: 9.6 km/jam dari Timur
☁️ Tutupan awan: 7%
👁️ Jarak pandang: >10 km
🌦️ Kondisi: Cerah

---
Sumber: BMKG (data.bmkg.go.id)

Kode Wilayah Kota Besar

KotaKode adm4 Contoh
Jakarta Pusat (Kemayoran)31.71.03.1001
Jakarta Selatan (Kebayoran)31.74.08.1001
Surabaya35.78.01.1001
Bandung32.73.01.1001
Medan12.71.01.1001
Makassar73.71.01.1001
Semarang33.74.01.1001
Yogyakarta34.71.01.1001
Denpasar51.71.01.1001
Palembang16.71.01.1001
Pekanbaru14.71.01.1001
Balikpapan64.72.01.1001
Manado71.71.01.1001
Jayapura91.71.01.1001

Untuk kode wilayah lengkap, lihat: references/kode-wilayah.md


Catatan Penting

  1. Wajib cantumkan BMKG sebagai sumber data di setiap response
  2. Kode wilayah menggunakan Kepmendagri No. 100.1.1-6117 Tahun 2022
  3. Jika kode wilayah tidak diketahui, gunakan kode kota terdekat atau minta user clarifikasi
  4. Data diupdate 2x sehari — pagi dan sore
  5. Jika API tidak merespons, informasikan ke user dan sarankan cek langsung di https://cuaca.bmkg.go.id

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

三色人格陪伴

恋人、损友、死敌三种陪伴模式。记忆完全隔离不串档,一秒切换情绪状态,承包你所有治愈、解压与情绪拉扯需求。

Registry SourceRecently Updated
General

Zero Api Key Web Search

OpenClaw skill for source-backed web search, page reading, and evidence-aware claim checking. No API keys required by default; optional providers can be enab...

Registry SourceRecently Updated
General

Novel Writer V3.2 - 小说写作引擎

专业小说写作引擎V3.2,支持短篇(3章)到超长篇(500万字)。内置AI味量化检测、四层质检、伏笔管理、角色状态追踪、断点续传。 自动根据字数裁剪流程:短篇模式(<10章)/ 中篇模式(10-50章)/ 长篇模式(50章+)。 触发场景:写小说、小说大纲、小说创作、网文写作、长篇小说、百万字小说、章节规划、 角...

Registry SourceRecently Updated
General

Hk Stock Morning Report

Generate HK stock market morning report (股市晨報) for bank trading desks. Triggers: "生成晨报","股市晨报","今日股市","港股晨報" 推送:微信個人 + 飛書群 | 數據:騰訊財經+stcn.com+格隆匯+實時搜索

Registry SourceRecently Updated