Openmeteo Get Forecast
openmeteo_get_forecastWeather forecast for coordinates: hourly and/or daily variables for up to 16 days ahead, with optional past_days (up to 92) for recent history. Use past_days instead of openmeteo_get_historical for dates within the last 1–5 days, since ERA5 has a variable lag. Returns per-timestamp records — each hourly entry contains a "time" field (ISO 8601) plus one key per requested variable; each daily entry contains a "time" field (YYYY-MM-DD) plus requested variables. Common hourly variables: temperature_2m, precipitation, wind_speed_10m, relative_humidity_2m, cloud_cover, uv_index, apparent_temperature, precipitation_probability, weather_code, surface_pressure, visibility, wind_direction_10m, wind_gusts_10m, dew_point_2m. Common daily variables: temperature_2m_max, temperature_2m_min, precipitation_sum, wind_speed_10m_max, sunrise, sunset, uv_index_max, precipitation_hours, weather_code. A wide window — a large past_days plus many hourly variables — produces 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 |
|---|---|---|---|
| latitude | Yes | Latitude in decimal degrees (e.g., 47.6062 for Seattle). Use openmeteo_search_locations to resolve a place name to coordinates. | |
| timezone | No | IANA timezone (e.g., "America/Los_Angeles") or "auto" to use the location's local timezone. Default "auto". The timezone from openmeteo_search_locations is ideal to pass here. | auto |
| canvas_id | No | DataCanvas token for wide past_days 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 (e.g., -122.3321 for Seattle). | |
| past_days | No | Include this many days of past data before today (0–92). Use for recent history — ERA5 archive has a variable ~5-day lag. Default 0. | |
| forecast_days | No | Number of forecast days (1–16). Default 7. | |
| daily_variables | No | Daily summary variables (e.g., ["temperature_2m_max", "temperature_2m_min", "precipitation_sum", "wind_speed_10m_max", "sunrise", "sunset", "uv_index_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 is required. | |
| wind_speed_unit | No | Wind speed unit: "kmh" (km/h), "mph", "ms" (m/s), or "kn" (knots). Default "kmh". | kmh |
| hourly_variables | No | Hourly variables to fetch (e.g., ["temperature_2m", "precipitation", "wind_speed_10m", "relative_humidity_2m", "cloud_cover", "uv_index", "apparent_temperature"]). 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 is required. | |
| temperature_unit | No | Temperature unit. Default "celsius". | celsius |
| precipitation_unit | No | Precipitation unit: "mm" or "inch". Default "mm". | mm |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | Per-day records. Each object has a "time" field (YYYY-MM-DD) plus one key per requested variable with its value. Units are in the daily_units map. 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. Each object has a "time" field (ISO 8601) plus one key per requested variable with its value. Units are in the hourly_units map. 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 endpoint reports a name it parsed but does not serve in the requested cadence. | |
| latitude | No | Snapped latitude (Open-Meteo snaps to nearest grid point) | |
| 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 | Terrain 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. | |
| table_name | No | DuckDB table name for the staged data — pass to openmeteo_dataframe_query. Present only alongside canvas_id. | |
| daily_units | No | Map of variable name → unit string for daily data. Absent when no daily_variables were requested. | |
| hourly_units | No | Map of variable name → 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. | |
| utc_offset_seconds | No | UTC offset in seconds for this timezone at query time |