# 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"
  }
}
```