Openmeteo Get Historical
openmeteo_get_historicalHistorical weather from the ERA5 reanalysis archive (1940–present). Requires start_date and end_date (ISO 8601 date, e.g., "2024-07-01"). ERA5 has a variable lag of up to ~5 days — for dates within the last week, use openmeteo_get_forecast with past_days instead. Uses the same variable names as the forecast API for direct comparison. Large date ranges (multi-year hourly) produce thousands of records — these spill to DataCanvas for SQL querying when canvas is enabled, and return a bounded preview with truncated: true when it is not. At least one of hourly_variables or daily_variables is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | End date (YYYY-MM-DD, inclusive). Must be on or after start_date. For dates within the last ~5 days, use openmeteo_get_forecast with past_days instead. | |
| latitude | Yes | Latitude in decimal degrees. Use openmeteo_search_locations to resolve a place name to coordinates. | |
| timezone | No | IANA timezone or "auto". Default "auto". | auto |
| canvas_id | No | DataCanvas token for multi-year or multi-variable queries. When a result is too large to return inline — driven by total payload size, so a wide multi-variable pull can spill at any row count — it spills to this canvas for SQL querying. Omit to create a fresh canvas. | |
| longitude | Yes | Longitude in decimal degrees. | |
| start_date | Yes | Start date (YYYY-MM-DD, e.g., "2024-07-01"). ERA5 covers from 1940-01-01 to approximately 5 days ago. | |
| daily_variables | No | Daily summary variables (e.g., ["temperature_2m_max", "temperature_2m_min", "precipitation_sum", "wind_speed_10m_max"]). Daily names only — an hourly name such as cloud_cover or temperature_2m belongs in hourly_variables and is rejected here; for a daily summary of an hourly variable use its published aggregate (cloud_cover_max, cloud_cover_mean, cloud_cover_min). At least one of hourly_variables or daily_variables required. | |
| wind_speed_unit | No | Wind speed unit. Default "kmh". | kmh |
| hourly_variables | No | Hourly ERA5 variables (e.g., ["temperature_2m", "precipitation", "wind_speed_10m", "relative_humidity_2m", "cloud_cover", "soil_moisture_0_to_7cm"]). Hourly names only — a daily aggregate such as temperature_2m_max or precipitation_sum belongs in daily_variables and is rejected here. At least one of hourly_variables or daily_variables required. | |
| temperature_unit | No | Temperature unit. Default "celsius". | celsius |
| precipitation_unit | No | Precipitation unit. Default "mm". | mm |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | Per-day records with "time" (YYYY-MM-DD) + variable keys. Absent when only hourly_variables were requested. When truncated, contains only a preview — query canvas_id for the full dataset when one is present. | |
| error | No | Present when the call failed. Absent on success. | |
| hourly | No | Per-hour records with "time" (ISO 8601) + variable keys. Absent when only daily_variables were requested. When truncated, contains only a preview — query canvas_id for the full dataset when one is present. | |
| notice | No | Warning that a requested variable came back with no data — names each column whose unit is "undefined", which is how the archive reports a name it parsed but does not serve in the requested cadence. | |
| latitude | No | Snapped latitude | |
| timezone | No | Resolved IANA timezone | |
| canvas_id | No | DataCanvas token for the staged full dataset. Present only when truncated is true AND DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb) — absent otherwise, in which case the preview is all this response carries. Query with SQL using this token. | |
| elevation | No | Elevation at grid point (meters) | |
| longitude | No | Snapped longitude | |
| truncated | No | True when the response was too large to return inline, so hourly and daily carry a bounded preview rather than the full set. With DataCanvas enabled the complete data is staged at canvas_id — every hourly and daily row, including any column the preview omits. With it disabled there is no canvas_id, and the omitted rows are reached only by narrowing the request. | |
| date_range | No | Date range of returned data | |
| table_name | No | DuckDB table name for the staged data — pass to openmeteo_dataframe_query. Present only alongside canvas_id. | |
| daily_units | No | Variable → unit string for daily data. Absent when no daily_variables were requested. | |
| hourly_units | No | Variable → unit string for hourly data (e.g., {"temperature_2m": "°C", "precipitation": "mm"}). Absent when no hourly_variables were requested. | |
| record_count | No | Total number of records (hourly + daily rows) — the full upstream total when truncated is true, not the combined length of the hourly and daily previews. |