BMKG
Library to get weather forecast and earthquake data history from BMKG
Install / Use
/learn @kamshory/BMKGREADME
BMKG API
BMKG API is an API to get realtime weather forecast and earthquake history from BMKG | Badan Meteorologi, Klimatologi, dan Geofisika.
Features
- earthquake
- weather forecast
Output
Each APIs return output as JSON format
Earthquake
require('lib/bmkg.php');
$bmkg = new BMKG();
$data = $bmkg->earthquake();
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
echo json_encode($data, JSON_PRETTY_PRINT);
Weather
$province_id = substr(trim(strip_tags(@$_GET['province_id'])), 0, 2);
require('lib/bmkg.php');
$bmkg = new BMKG();
$data = $bmkg->weather($province_id);
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
echo json_encode($data, JSON_PRETTY_PRINT);
Province ID is a string contain ID of the province and listed bellow:
- 01 = Aceh
- 02 = Bali
- 03 = Bangka Belitung
- 04 = Banten
- 05 = Bengkulu
- 06 = DI Yogyakarta
- 07 = DKI Jakarta
- 08 = Gorontalo
- 09 = Jambi
- 10 = Jawa Barat
- 11 = Jawa Tengah
- 12 = Jawa Timur
- 13 = Kalimantan Barat
- 14 = Kalimantan Selatan
- 15 = Kalimantan Tengah
- 16 = Kalimantan Timur
- 17 = Kalimantan Utara
- 18 = Kepulauan Riau
- 19 = Lampung
- 20 = Maluku
- 21 = Maluku Utara
- 22 = Nusa Tenggara Barat
- 23 = Nusa Tenggara Timur
- 24 = Papua
- 25 = Papua Barat
- 26 = Riau
- 27 = Sulawesi Barat
- 28 = Sulawesi Selatan
- 29 = Sulawesi Tengah
- 30 = Sulawesi Tenggara
- 31 = Sulawesi Utara
- 32 = Sumatera Barat
- 33 = Sumatera Selatan
- 34 = Sumatera Utara
- 35 = Indonesia
If province ID is provided, API will show data of cities in selected province.
If province ID is not provided, API will show data of big cities in Indonesia.
Related Skills
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
