# Air Quality API ## What It Does The Air Quality API provides real-time and historical air pollution data for any location on Earth with 500x500 meter resolution. It returns pollutant concentrations (PM2.5, PM10, O3, NO2, SO2, CO), health recommendations, and a universal Air Quality Index (UAQI) from 0-500. Data comes from government monitoring stations, sensors, satellites, and weather models, processed into a standardized format across 100+ countries. ## Music Use Case: Sonic Environment Documentation When creating field recordings or soundwalks, air quality affects both what you hear and what you breathe: **Recording site selection:** - Check air quality before scheduling outdoor recording sessions - Document pollution levels alongside audio recordings (sonic context) - Identify patterns: "Industrial areas recorded on high-pollution days sound different" **Audio map metadata:** - Tag each recording location with UAQI score - Create pollution-aware soundwalk routes (avoid high-pollution areas) - Correlate sonic character with environmental conditions **Example:** Recording the Tijuana Estuary ```json { "location": "Tijuana Estuary mouth", "coordinates": {"lat": 32.5679, "lng": -117.1241}, "recording_date": "2025-11-09", "air_quality_uaqi": 68, "dominant_pollutant": "PM2.5", "health_note": "Moderate - sensitive groups reduce outdoor activity", "sonic_notes": "Traffic noise from I-5, seabird calls, ocean waves" } ``` ## Environmental Research Use Case: Infrastructure Monitoring Water and sewer treatment facilities both affect and are affected by air quality: **Treatment plant monitoring:** - Track emissions from wastewater treatment processes - Correlate odor complaints with measured air quality - Identify pollution sources near water infrastructure - Monitor air quality changes after infrastructure improvements **Example:** WWTP La Morita Analysis ``` Location: 32.4552°N, 116.8604°W (Tijuana) Distance from residential areas: 2.3 km Current UAQI: 45 (Good) Primary pollutants: NO2 from nearby industrial zone Recommendation: Suitable for outdoor work at facility ``` **Water quality correlation:** - Poor air quality often indicates industrial activity that also pollutes water - Use Air Quality API to identify pollution corridors affecting watersheds - Plan water sampling routes to avoid high-exposure areas **Inspection route planning:** - Check air quality along planned routes - Reschedule outdoor work during poor air quality days - Provide health recommendations to field crews ## How to Use It ### Direct API Call (No MCP Tool Available) **Endpoint:** `https://airquality.googleapis.com/v1/currentConditions:lookup` **Request:** ```bash curl -X POST "https://airquality.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "location": { "latitude": 32.5332, "longitude": -117.0192 } }' ``` **Response includes:** - `universalAqi` - 0-500 scale (0-50 = Good, 51-100 = Moderate, etc.) - `dominantPollutant` - Which pollutant is worst (pm25, pm10, ozone, etc.) - `pollutants` - Array with concentration for each pollutant - `healthRecommendations` - Activity guidance for general population and sensitive groups ### Optional Parameters **Specify pollutants:** ```json { "location": {"latitude": 32.5332, "longitude": -117.0192}, "extraComputations": ["POLLUTANT_CONCENTRATION", "DOMINANT_POLLUTANT_CONCENTRATION"], "uaqiColorPalette": "RED_GREEN" } ``` **Historical data:** ```json { "location": {"latitude": 32.5332, "longitude": -117.0192}, "period": { "startTime": "2025-11-01T00:00:00Z", "endTime": "2025-11-09T00:00:00Z" } } ``` ## How It Works **Data sources (in priority order):** 1. Government air quality monitoring stations 2. Low-cost sensor networks (PurpleAir, etc.) 3. Satellite observations (NASA, ESA) 4. Weather model predictions (interpolation) **500x500m resolution:** The API spatially interpolates between monitoring stations. Urban areas with dense sensors get more accurate results than rural areas. **Update frequency:** Every hour for current conditions, with a 1-3 hour lag depending on source. ## When to Use It **Music/Audio projects:** - Planning outdoor recording sessions - Documenting environmental context of field recordings - Creating health-aware soundwalk routes - Researching sonic environments and pollution correlation **Environmental research:** - Water treatment facility monitoring - Industrial pollution source identification - Field crew safety planning - Correlating air and water quality in watersheds **Don't use it for:** - Indoor air quality (measures outdoor only) - Real-time emergency alerts (1-3 hour lag) - Hyperlocal measurements (<500m precision) ## Pro Tips **Combine with Weather API:** Air quality varies with wind direction, temperature inversions, and humidity. Check weather data to understand why UAQI is high. **Time of day matters:** Morning and evening rush hours often show worse air quality in urban areas. Plan recordings for mid-morning or afternoon. **Document your baseline:** Record air quality on your first visit, then track changes over time. Pollution patterns reveal land use and industrial activity. **Cross-reference with Places API:** Search for industrial facilities, highways, or power plants near your recording/monitoring site. Explain air quality readings with geographic context. ## Related APIs - [[Weather API]] - Wind direction affects pollutant dispersion - [[Pollen API]] - Combined view of respiratory irritants - [[Maps Datasets API]] - Overlay air quality measurements on custom maps - [[Places API]] - Find pollution sources (factories, highways) ## Resources - [Air Quality API Documentation](https://developers.google.com/maps/documentation/air-quality) - [UAQI Scale Explanation](https://developers.google.com/maps/documentation/air-quality/understanding-aqi) - Air quality affects sonic environments (traffic, industrial noise correlate with pollution)