# Open-Meteo



Open-Meteo's open weather engine — the global forecast, air quality, historical series, and the marine forecast, for any coordinates on earth.



## Global Weather Forecast

Any coordinate on Earth — current conditions and a daily forecast up to 16 days out, through Open-Meteo's open weather models.

- Method: `GET`
- Path: `/v1/weather/open-meteo/forecast`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `latitude` | number | required | Decimal degrees, `-90` to `90`; negative is south. |
| `longitude` | number | required | Decimal degrees, `-180` to `180`; negative is west. |
| `days` | integer | optional | How many forecast days to return, `1`-`16`. |
| `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. |

**Example request**

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

**Example response**

```json
{
  "data": {
    "latitude": -6.25,
    "longitude": 106.875,
    "timezone": "Asia/Jakarta",
    "elevation_m": 12,
    "current": {
      "time": "2026-08-20T18:45",
      "temperature_c": 27.6,
      "humidity_pct": 71,
      "weather_code": 53,
      "wind_speed_kmh": 6
    },
    "daily": [
      { "date": "2026-08-20", "weather_code": 53, "temp_max_c": 32.1, "temp_min_c": 26.2, "precipitation_probability_pct": 75 },
      { "date": "2026-08-21", "weather_code": 80, "temp_max_c": 31.8, "temp_min_c": 25.9, "precipitation_probability_pct": 60 },
      { "date": "2026-08-22", "weather_code": 3, "temp_max_c": 33, "temp_min_c": 26.1, "precipitation_probability_pct": 25 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T11:45:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-20T12:00:00.000Z"
  }
}
```

## Air Quality

PM10, PM2.5, and both headline AQIs at any coordinate — through the same open models as the weather forecasts.

- Method: `GET`
- Path: `/v1/weather/air-quality`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `latitude` | number | required | Decimal degrees, `-90` to `90`. |
| `longitude` | number | required | Decimal degrees, `-180` to `180`. |
| `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. |

**Example request**

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

**Example response**

```json
{
  "data": {
    "latitude": 25.2,
    "longitude": 55.3,
    "current": {
      "time": "2026-08-21T18:00",
      "pm10": 42.1,
      "pm2_5": 18.3,
      "us_aqi": 63,
      "european_aqi": 38
    }
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-21T14:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-21T14:20:00.000Z"
  }
}
```

## Weather History

The weather as it actually was, for any coordinate on earth, back to 1940 — the reanalysis record behind every climate claim.

- Method: `GET`
- Path: `/v1/weather/history`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `latitude` | number | required | Decimal degrees. |
| `longitude` | number | required | Decimal degrees. |
| `start_date` | string | required | `YYYY-MM-DD`, from 1940 on. |
| `end_date` | string | required | `YYYY-MM-DD`; keep ranges to 92 days or less. |
| `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. |

**Example request**

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

**Example response**

```json
{
  "data": {
    "latitude": 25.2,
    "longitude": 55.3,
    "daily": [
      { "date": "2026-07-01", "weather_code": 0, "temp_max_c": 43.1, "temp_min_c": 31.2, "precipitation_mm": 0 },
      { "date": "2026-07-02", "weather_code": 1, "temp_max_c": 42.8, "temp_min_c": 31.0, "precipitation_mm": 0 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T04:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-23T04:05:00.000Z"
  }
}
```

## Marine Forecast

Sea state for any coordinate on earth — significant wave height, direction, and period, beside BMKG's Indonesian waters.

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

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `latitude` | number | required | Decimal degrees — a point at sea. |
| `longitude` | number | required | Decimal degrees. |
| `days` | integer | optional | Forecast days, 1-16. |
| `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. |

**Example request**

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

**Example response**

```json
{
  "data": {
    "latitude": 54.5,
    "longitude": 3.5,
    "daily": [
      { "date": "2026-08-21", "wave_height_max_m": 1.4, "wave_direction_dominant_deg": 310, "wave_period_max_s": 5.2 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T04:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-22T04:20:00.000Z"
  }
}
```