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; the CAMS global archive begins in August 2022, and earlier dates return rows of nulls. 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. Pollen is modeled for Europe only, and only in pollen season — elsewhere the pollen values come back null, and the notice names them. Set current_variables for pollutant and AQI values at this instant — returned as a current object plus a current_units map, and enough on its own without hourly_variables; the block’s interval field is its aggregation interval in seconds (3600 on this endpoint). A wide window — a large past_days or date range plus many variables — produces thousands of records; these spill to a DataCanvas when canvas is enabled, returning canvas_id and table_name with truncated: true — inspect the staged columns with openmeteo_dataframe_describe, then query the full set with openmeteo_dataframe_query. With canvas disabled they return a bounded preview instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"latitude": "<latitude>",
"longitude": "<longitude>"
},
"name": "openmeteo_get_air_quality"
}
}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: pass the returned token to openmeteo_dataframe_describe to list the staged table and its columns, then to openmeteo_dataframe_query to run SQL against it. 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"). The CAMS global archive begins in August 2022; earlier dates return rows of nulls, and us_aqi starts a day later than the pollutant series (european_aqi starts with it). 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 of current_variables or hourly_variables is required. | |
| current_variables | No | Air quality variables to return for the current instant (e.g., ["pm2_5", "pm10", "european_aqi", "us_aqi"]). Uses Open-Meteo's current-conditions data, so it answers "what is the AQI now?" without requesting an hourly series and picking a row; the returned interval is the block's aggregation interval, 3600 seconds on this endpoint. Satisfies the variable requirement on its own. |
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 with the UTC offset that instant observes in timezone, e.g. "2024-03-10T03:00-07:00"; "+00:00" for GMT) + 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 | Everything this response needs to say beyond the data, composed into one advisory: columns the endpoint returned with the unit "undefined" (a name it parsed but does not serve); current values that are null under a real unit (no coverage at this location and time, such as pollen outside Europe); recognized variables whose requested window or location falls outside CAMS coverage, with the timestamps that do carry values; that every time is given at utc_offset_seconds when this server cannot resolve the echoed time zone, or when its time-zone data gives that zone another offset at the moment Open-Meteo answered; and, when the result spilled, either the canvas and table holding the full row set plus the two dataframe tools that read it, or — with DataCanvas disabled — why there is no canvas_id and how to reach the rows the preview omits. | |
| current | No | Pollutant and index values at a single instant: one key per requested current variable alongside time and interval. Units are in the current_units map. Absent when current_variables was not requested. | |
| 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. Pass to openmeteo_dataframe_describe to list the staged table and its columns, then to openmeteo_dataframe_query to run SQL against it. | |
| 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 — use as the FROM target in openmeteo_dataframe_query SQL; openmeteo_dataframe_describe lists its columns. 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. | |
| current_units | No | Key → unit string for the current block, covering time and interval as well as each requested variable (e.g., {"interval": "seconds", "pm2_5": "μg/m³"}). Absent when no current_variables were requested. | |
| utc_offset_seconds | No | UTC offset in seconds that Open-Meteo applied when it answered (the zone's offset at request time). It bounds the requested window; every timestamp carries the offset of its own instant in its suffix, unless the notice says every time is given at this offset. |