Openmeteo Get Air Quality
openmeteo_get_air_qualityModeled CAMS (Copernicus Atmosphere Monitoring Service) air quality: PM2.5, PM10, nitrogen dioxide, sulphur dioxide, ozone, carbon monoxide, dust, pollen, and European/US AQI indices. This is modeled grid data, not measured station readings — for measured data, use openaq-mcp-server. Forecast horizon up to 7 days, with optional past_days (up to 92) for recent history — or start_date and end_date together for an archive range, which returns real CAMS values back to at least 2022-10-01. One window per call: a date range is mutually exclusive with forecast_days and past_days, and needs both ends — a lone start_date or end_date is rejected. Common variables: pm2_5, pm10, carbon_monoxide, nitrogen_dioxide, sulphur_dioxide, ozone, dust, european_aqi, us_aqi, alder_pollen, birch_pollen, grass_pollen, mugwort_pollen, olive_pollen, ragweed_pollen. A wide window — a large past_days or date range plus many 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | End date for the archive range (YYYY-MM-DD, inclusive). Must be on or after start_date. Requires start_date — the pair must be sent together, and neither combines with forecast_days or past_days. | |
| latitude | Yes | Latitude in decimal degrees. Use openmeteo_search_locations to resolve a place name. | |
| timezone | No | IANA timezone or "auto". Default "auto". | auto |
| canvas_id | No | DataCanvas token for wide past_days, archive-range, 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. | |
| past_days | No | Include this many days of past data before today (0–92). Use for recent history instead of a start_date/end_date range. Default 0. Must stay 0 when start_date/end_date are used. | |
| start_date | No | Start date for the archive range (YYYY-MM-DD, e.g., "2024-07-01"). Real CAMS values go back to at least 2022-10-01; earlier dates return rows of nulls. Requires end_date — the pair must be sent together, and neither combines with forecast_days or past_days. | |
| forecast_days | No | Forecast horizon in days (1–7). Omit for the upstream default of 5. Mutually exclusive with start_date/end_date — omit it entirely when pulling an archive range. | |
| hourly_variables | No | Hourly air quality variables (e.g., ["pm2_5", "pm10", "ozone", "nitrogen_dioxide", "european_aqi", "us_aqi"]). At least one required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| hourly | No | Per-hour records with "time" (ISO 8601) + one key per requested variable. Units: pm2_5/pm10/dust in μg/m³, carbon_monoxide in μg/m³, nitrogen_dioxide/sulphur_dioxide/ozone in μg/m³, european_aqi/us_aqi as index values. 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. | |
| 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. | |
| longitude | No | Snapped longitude | |
| truncated | No | True when the response was too large to return inline, so hourly carries a bounded preview rather than the full set. With DataCanvas enabled the complete data is staged at canvas_id. 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. | |
| data_source | No | Data source identifier — this is modeled CAMS data, forecast or archive, not measured station data. | |
| hourly_units | No | Variable → unit string for hourly data (e.g., {"pm2_5": "μg/m³", "european_aqi": "EAQI"}). | |
| record_count | No | Total number of hourly records — the full upstream total when truncated is true, not the length of the hourly preview. |