Fetches real-time air quality data from the World Air Quality Index (WAQI) API. Reports AQI levels, individual pollutants, and health advice.
- "air quality"
- "air pollution"
- "aqi"
- "uv index"
- "is the air safe"
- "pollution levels"
- Real-time AQI for any city worldwide
- Individual pollutant levels (PM2.5, PM10, O3, NO2, CO, SO2)
- Health advice based on AQI ranges
- Option to check multiple cities in one session
Requires a free WAQI API token:
- Register at https://aqicn.org/data-platform/token/
- Use an API_TOKEN placeholder in your code:
api_token = "your_api_token_here""What's the air quality in Beijing?" "Is the air safe to go outside?" "Check pollution in New York"
| AQI | Level | Health Implication |
|---|---|---|
| 0-50 | Good | Enjoy outdoor activities |
| 51-100 | Moderate | Acceptable for most |
| 101-150 | Unhealthy for Sensitive Groups | Reduce prolonged outdoor exertion |
| 151-200 | Unhealthy | Everyone may experience effects |
| 201-300 | Very Unhealthy | Avoid outdoor activities |
| 301+ | Hazardous | Stay indoors |