Go APIdataonline.bmkg.go.id ↗
Retrieve Indonesian meteorological station metadata and data availability for rainfall, temperature, sunshine, wind, and humidity from the BMKG Data Online portal.
What is the Go API?
The BMKG Data Online API exposes 5 endpoints covering Indonesian weather station metadata and historical data availability across all 34 provinces. Use get_stations to list stations by province with WMO numbers, coordinates, and names, then call get_data_availability to query per-station availability grids and monthly availability percentages for parameters including rainfall, temperature extremes, sunshine duration, wind direction, and humidity.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/a6470584-e907-40ae-a91f-59fe81046398/get_station_types' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace dataonline-bmkg-go-id-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: BMKG Data Online SDK — Indonesian weather station metadata and data availability."""
from parse_apis.bmkg_data_online_api import BMKG, MetParameter, InvalidParameter
client = BMKG()
# List available station types.
for st in client.stationtypes.list(limit=5):
print(st.type, st.name)
# List all provinces and print the first few.
for province in client.provinces.list(limit=5):
print(province.id, province.name)
# Drill into one province's stations.
bali = client.province(id="17")
for station in bali.stations.list(limit=3):
print(station.station_number, station.station_name, station.latitude, station.longitude)
# Check rainfall data availability for the first station.
station = bali.stations.list(limit=1).first()
if station:
avail = station.data_availability(parameter=MetParameter.RAINFALL, province_id="17")
print(avail.title, avail.year_now)
for month in avail.chart[:3]:
print(month.year, month.month, month.ketersediaan_data, month.count_data)
# List regencies within Bali.
for regency in bali.regencies.list(limit=3):
print(regency.id, regency.name, regency.idrefprovince)
# Typed error handling: invalid parameter value.
try:
manual_station = client.station(station_number="97230")
manual_station.data_availability(parameter=MetParameter.SUNSHINE, province_id="17")
except InvalidParameter as exc:
print(f"Invalid parameter: {exc}")
print("exercised: stationtypes.list / provinces.list / stations.list / data_availability / regencies.list")
Retrieve the list of station types (Jenis Stasiun) available for filtering weather stations. Returns the station type codes and their display names as published in the BMKG portal filter dropdown.
No input parameters required.
{
"type": "object",
"fields": {
"items": "array of station type objects each with id (integer), name (string display label), and type (string code)"
},
"sample": {
"data": {
"items": [
{
"id": 1,
"name": "UPT",
"type": "mkg"
}
]
},
"status": "success"
}
}About the Go API
Station Discovery
Start with get_provinces to retrieve the full list of Indonesian provinces, each with an id and name. Pass a province_id to get_kabupaten_kota to drill down to regency and city level — each entry includes id, idrefprovince, and name. Use get_station_types at any point to get the classification labels (e.g. synoptic, climatological) available for filtering stations by their operational category.
Station Listings
get_stations accepts a province_id and returns an array of station objects. Each station carries a station_number (the WMO number used as the identifier in downstream queries), station_name, station_id, latitude, and longit (longitude). This station_number value is what you pass as station_id to the data availability endpoint.
Data Availability Queries
get_data_availability is the core query endpoint. It requires a station_id (WMO number), province_id, and parameter. Supported parameter values are rainfall, temp_avg, temp_max, temp_min, sunshine, and wind_d. The year input is optional — omitting it returns availability across all recorded years for that station and parameter. The response includes a data array of availability rows, a chart array with monthly ketersediaan_d (availability percentage) values per year and month, and station metadata fields alongside the status string.
The Go API is a managed, monitored endpoint for dataonline.bmkg.go.id — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dataonline.bmkg.go.id changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dataonline.bmkg.go.id API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Map all active BMKG synoptic stations per province using station_number, latitude, and longitude from get_stations.
- Identify years with high rainfall data completeness at a given station using chart ketersediaan_d values from get_data_availability.
- Build a province-to-regency navigation tree by chaining get_provinces and get_kabupaten_kota.
- Assess historical temperature data gaps at a specific WMO station before committing to a climate analysis pipeline.
- Enumerate available station types via get_station_types to filter for climatological versus synoptic observations.
- Compare multi-year sunshine duration availability across stations in the same province for solar energy feasibility studies.
- Detect periods of missing wind direction data at a coastal station by querying get_data_availability with parameter wind_d.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does BMKG provide an official developer API for this data?+
What does get_data_availability actually return, and how are availability figures expressed?+
data array of availability rows for the requested station and parameter, plus a chart array where each entry contains year, month, and ketersediaan_d — the monthly data availability as a percentage. Station metadata is also included in the response alongside the status field. Omitting the year parameter returns all available years for that station-parameter combination.Does the API return the actual meteorological measurements, such as daily rainfall totals or temperature readings?+
Can I retrieve stations across all provinces in a single call?+
get_stations endpoint requires a province_id and returns stations for one province at a time. It does not support a nationwide query in a single call. You can fork this API on Parse and revise it to add a batch or all-provinces endpoint that loops over the province list.