# BMKG Marine



The official maritime forecast: the port directory, each port's weather, waves, currents, and tides, and the wave outlook for every Indonesian waters area.



## BMKG Marine Port Directory

Every port BMKG publishes a maritime forecast for — 294 ports with their ids, coordinates, and class.

- Method: `GET`
- Path: `/v1/marine/ports`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `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 ports. |

**Example request**

```bash
curl https://api.diraz.ae/v1/marine/ports \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "ports": [
      { "port_id": "0088", "name": "Sintete", "type": "utama", "latitude": 1.198331, "longitude": 109.054462 },
      { "port_id": "0092", "name": "Kendawangan", "type": "utama", "latitude": -2.531535, "longitude": 110.21588 },
      { "port_id": "0237", "name": "Nunukan", "type": "utama", "latitude": 4.145037, "longitude": 117.665883 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-15T23:46:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-16T23:46:00.000Z"
  }
}
```

## BMKG Marine Port Forecast

The maritime forecast for one port: weather, wind, currents, and waves per 12-hour block, with the tide extremes and their times.

- Method: `GET`
- Path: `/v1/marine/ports/{port_id}`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `port_id` | path segment | required | Four-digit BMKG port code from the directory, e.g. `0088` for Sintete. |
| `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 blocks. |

**Example request**

```bash
curl https://api.diraz.ae/v1/marine/ports/%7Bport_id%7D \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "port": { "port_id": "0088", "name": "Sintete", "type": "utama", "latitude": 1.198331, "longitude": 109.054462 },
    "forecast": [
      {
        "issued_at": "2026-08-15T23:46:00Z",
        "valid_from": "2026-08-15T12:00:00Z",
        "valid_to": "2026-08-16T00:00:00Z",
        "weather": "Berawan",
        "weather_desc": "Untuk area Sintete diperkirakan berawan, dengan kecepatan angin pada umumnya 5 - 9 knot bertiup dari arah timur",
        "warning": null,
        "wind_from": "Timur",
        "wind_to": "Utara",
        "wind_speed_min_knot": 5,
        "wind_speed_max_knot": 9,
        "current_from": "Timur Laut",
        "current_to": "Tenggara",
        "current_speed_min": 0.05,
        "current_speed_max": 0.33,
        "wave_category": "Tenang",
        "wave_height_min_m": 0.1,
        "wave_height_max_m": 0.5,
        "visibility_m": 6017,
        "humidity_min_percent": 90,
        "humidity_max_percent": 99,
        "temperature_min_c": 25,
        "temperature_max_c": 29,
        "low_tide_m": -0.75,
        "low_tide_at": "2026-08-15T17:00:00Z",
        "high_tide_m": 0.81,
        "high_tide_at": "2026-08-15T22:00:00Z"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-15T23:46:00Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-16T00:16:00Z"
  }
}
```

## BMKG Wave Outlook

The wave-height outlook for all 232 Indonesian waters areas, today through three days out.

- Method: `GET`
- Path: `/v1/marine/waves`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `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 areas. |

**Example request**

```bash
curl https://api.diraz.ae/v1/marine/waves \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "areas": [
      { "area_code": "U.01", "area_name": "Selat Sunda bagian utara", "issued_at": "2026-08-18T23:35:00Z", "today": "Rendah", "tomorrow": "Rendah", "h2": "Rendah", "h3": "Rendah" },
      { "area_code": "U.04", "area_name": "Samudera Hindia selatan Banten", "issued_at": "2026-08-18T23:35:00Z", "today": "Tinggi", "tomorrow": "Tinggi", "h2": "Tinggi", "h3": "Tinggi" }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-18T23:35:00Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-19T00:05:00Z"
  }
}
```