Air Quality & Pollen Information
Real-time air quality indices, pollutant concentrations, pollen forecasts, historical data, and map visualizations for any location worldwide. Supports up to 10 locations per request with both coordinate and address-based input.
Actions
get_current_conditions
Get current Air Quality Index (AQI), pollutant concentrations, and health recommendations.
Required fields:
action:"get_current_conditions"locations: Array of 1-10 location objects (each withlatitude/longitudeORaddress)
Optional fields:
include_items: Filter specific pollutants —"co","no2","o3","so2","pm25","pm10". Omit to receive all pollutants.universal_aqi: Use universal AQI scale (boolean, defaulttrue)extra_computations: Array of additional data to include —"HEALTH_RECOMMENDATIONS","DOMINANT_POLLUTANT_CONCENTRATION","POLLUTANT_ADDITIONAL_INFO"
Example:
{
"action": "get_current_conditions",
"locations": [{"address": "San Francisco, CA"}],
"universal_aqi": true,
"extra_computations": ["HEALTH_RECOMMENDATIONS"]
}
Example (multiple locations, mixed input):
{
"action": "get_current_conditions",
"locations": [
{"latitude": 40.7128, "longitude": -74.0060, "name": "NYC"},
{"address": "Los Angeles, CA"},
{"address": "London, UK", "name": "London City Center"}
],
"include_items": ["pm25", "no2", "o3"]
}
get_forecast
Get pollen forecast data for up to 5 days. Includes tree, grass, and weed pollen types with seasonal status and health recommendations.
Required fields:
action:"get_forecast"locations: Array of 1-10 location objects
Optional fields:
include_items: Filter specific pollen types —"tree pollen","grass pollen","weed pollen". Omit to receive all three. Note: pollutant items (co, no2, etc.) are not available for forecasts.forecast_days: Number of days (1-5, default5)
Example:
{
"action": "get_forecast",
"locations": [{"address": "Portland, OR"}],
"include_items": ["tree pollen", "grass pollen"],
"forecast_days": 3
}
get_history
Get historical air quality data with hourly AQI values and pollutant concentrations, up to 30 days back.
Required fields:
action:"get_history"locations: Array of 1-10 location objects
Optional fields:
hours_history: Number of hours to retrieve (1-720, default24)include_items: Filter specific pollutants —"co","no2","o3","so2","pm25","pm10". Omit to receive all.universal_aqi: Use universal AQI scale (boolean, defaulttrue)
Example:
{
"action": "get_history",
"locations": [{"latitude": 35.6762, "longitude": 139.6503, "name": "Tokyo"}],
"hours_history": 48,
"universal_aqi": true
}
create_map
Generate a map image with air quality or pollen data overlays. The map is stored in cloud storage for 7 days and a download URL is returned.
Required fields:
action:"create_map"locations: Array of 1-10 location objects
Optional fields:
map_config: Object with map settings:width: Width in pixels (100-2048, default640)height: Height in pixels (100-2048, default640)zoom: Zoom level (1-20, default10)map_type: Base map —"roadmap","satellite","terrain","hybrid"(default"roadmap")overlay_type: Data layer —"aqi","aqi_red_green","pm25","pollen_tree","pollen_grass","pollen_weed"include_legend: Show color scale legend (boolean, defaulttrue)
Example:
{
"action": "create_map",
"locations": [{"address": "Paris, France"}],
"map_config": {
"width": 800,
"height": 600,
"zoom": 12,
"map_type": "roadmap",
"overlay_type": "aqi",
"include_legend": true
}
}
Location Input
Each location in the locations array accepts one of two formats:
- Coordinates:
{"latitude": 40.7128, "longitude": -74.0060} - Address:
{"address": "San Francisco, CA"}— accepts street addresses, city/state, or city/country
Add an optional name field to any location for a custom display label: {"address": "Paris, France", "name": "Eiffel Tower Area"}
You can mix coordinates and addresses in the same request.
Common Workflows
-
Check if outdoor exercise is safe: Use
get_current_conditionswithextra_computations: ["HEALTH_RECOMMENDATIONS"]to get AQI and health advice for sensitive groups. -
Plan for allergy season: Use
get_forecastwithinclude_items: ["tree pollen", "grass pollen", "weed pollen"]to see pollen levels for the coming days. -
Compare air quality across cities: Use
get_current_conditionswith multiple locations andinclude_items: ["pm25", "o3"]to compare key pollutants side by side. -
Visualize pollution patterns: Use
create_mapwithoverlay_type: "pm25"or"aqi"to generate a heatmap of air quality for a region. -
Analyze trends over time: Use
get_historywithhours_history: 168(7 days) to review hourly AQI changes and identify pollution patterns.
AQI Categories
| Range | Category | Meaning |
|---|---|---|
| 0-50 | Good | Air quality is satisfactory |
| 51-100 | Moderate | Acceptable for most people |
| 101-150 | Unhealthy for Sensitive Groups | Sensitive individuals may experience effects |
| 151-200 | Unhealthy | Everyone may begin to experience effects |
| 201-300 | Very Unhealthy | Health warnings of emergency conditions |
| 301+ | Hazardous | Emergency conditions for entire population |
Important Notes
- Addresses are automatically geocoded. If geocoding fails for one location, other locations in the batch still process successfully.
- Pollutant forecasts are not available; the
get_forecastaction provides pollen forecasts only. Useget_current_conditionsfor current pollutant levels. - Historical data (
get_history) covers air quality pollutants only, not pollen. - Generated maps are stored for 7 days before expiring.
- Some regions may have limited air quality or pollen data availability.
- Each location result includes its own error field — always check for partial failures in multi-location requests.







