Historical Weather
Overview
The Historical Weather API returns daily weather data for a specific date and location.
Endpoint
GET /historical/{lat},{lon},{timestamp}Parameters
Parameter | Required | Default | Description |
|---|---|---|---|
| Yes | — | Latitude, longitude, and timestamp as path parameter |
| No |
| Unit system: |
| No |
| Language code for text summaries |
The timestamp accepts multiple formats:
- Unix timestamp:
1455537600 - ISO 8601 with Z:
2016-02-15T12:00:00Z - ISO 8601 with offset:
2016-02-15T12:00:00+00:00 - ISO 8601 without timezone (assumes UTC):
2016-02-15T12:00:00
Example Request
GET /historical/47.37,8.55,2025-06-15T12:00:00Z?units=si
Example Response
{
"latitude": 47.37,
"longitude": 8.55,
"timezone": "Europe/Zurich",
"offset": 2,
"daily": {
"summary": "Partly cloudy throughout the day.",
"icon": "01d",
"data": [
{
"time": 1750003200,
"summary": "Partly Cloudy",
"icon": "01d",
"is_day": true,
"temperatureHigh": 24.5,
"temperatureLow": 14.2,
"temperatureAvg": 19.3,
"windSpeed": 8.5,
"windDirection": 210,
"humidity": 0.58,
"pressure": 1015.2,
"visibility": 24.1,
"cloudCover": 0.35,
"precipitation": 0,
"sunriseTime": 1749956400,
"sunsetTime": 1750013400,
"moonPhase": 0.72
}
]
}
}Daily Data Fields
Field | Type | Description |
|---|---|---|
| integer | Unix timestamp (start of day) |
| string | Human-readable weather summary |
| string | Weather condition code with day/night suffix (e.g. |
| boolean | Whether the data point is during daylight hours |
| float | Daytime high temperature |
| float | Overnight low temperature |
| float | Average temperature for the day |
| float | Average wind speed |
| integer | Dominant wind direction (0–360°) |
| float | Average relative humidity (0–1) |
| float | Sea-level pressure (hPa) |
| float | Visibility distance |
| float | Cloud cover fraction (0–1) |
| float | Total precipitation |
| string | Type of precipitation (if applicable) |
| integer | Unix timestamp of sunrise |
| integer | Unix timestamp of sunset |
| float | Lunar phase (0 = new moon, 0.5 = full moon) |
Errors
Status | Description |
|---|---|
| Invalid location format, coordinates out of range, or future timestamp |
| Invalid API key |
| Rate limit exceeded |
| Historical data not loaded |