# BMKG Weather Forecast

Three-day forecast at three-hour steps for any Indonesian village, with temperature, rainfall, wind, and visibility.

- Method: `GET`
- Path: `/v1/weather/bmkg/forecast`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `adm4` | string | required | Village-level administrative code, e.g. `31.71.03.1001` for Kemayoran, Jakarta Pusat. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |
| `limit` | integer | optional | Return only the first N forecast steps. |

**Example request**

```bash
curl https://api.diraz.ae/v1/weather/bmkg/forecast \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "location": {
      "province_code": "31",
      "regency_code": "31.71",
      "district_code": "31.71.03",
      "village_code": "31.71.03.1001",
      "province": "DKI Jakarta",
      "regency": "Kota Adm. Jakarta Pusat",
      "district": "Kemayoran",
      "village": "Kemayoran",
      "latitude": -6.1647214778,
      "longitude": 106.8453837867,
      "timezone": "Asia/Jakarta"
    },
    "forecast": [
      {
        "at": "2026-08-18T18:00:00.000Z",
        "local_time": "2026-08-19 01:00:00",
        "temperature_c": 28,
        "humidity_percent": 73,
        "weather_code": 1,
        "weather": "Cerah",
        "weather_en": "Sunny",
        "cloud_cover_percent": 28,
        "precipitation_mm": 0.1,
        "wind_speed_kmh": 4.9,
        "wind_from": "E",
        "wind_degrees": 119,
        "visibility_m": 12352
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-18T17:05:15.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-18T17:35:15.000Z"
  }
}
```