iqair.com APIiqair.com ↗
Access real-time global air quality rankings, city-level AQI details, pollutant breakdowns, forecasts, and geographic map data via the IQAir API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/04ba50aa-6be3-40a9-8d23-947dfaf5a46d/get_world_air_quality' \ -H 'X-API-Key: $PARSE_API_KEY'
Get global air quality overview including top polluted and cleanest cities ranking. Returns arrays of up to 15 cities each with AQI values, locations, and timestamps.
No input parameters required.
{
"type": "object",
"fields": {
"top10CleanestCities": "array of city objects with city, state, country, aqi, rank, url, flagURL, followersCount, updatedAt",
"top10PollutedCities": "array of city objects with city, state, country, aqi, rank, url, flagURL, followersCount, updatedAt"
},
"sample": {
"data": {
"top10CleanestCities": [
{
"id": "dR56Z6KhhFWiRrpK4",
"aqi": 6,
"url": "/bulgaria/sofia/sofia",
"city": "Sofia",
"rank": 1,
"state": "Sofia",
"country": "Bulgaria",
"flagURL": "https://cdn.airvisual.net/flags/bulgaria.jpg",
"updatedAt": "2026-05-14T16:00:00.000Z",
"followersCount": 266517
}
],
"top10PollutedCities": [
{
"id": "ZkqkZNyi27CiiNnaZ",
"aqi": 166,
"url": "/chile/santiago-metropolitan/santiago",
"city": "Santiago",
"rank": 1,
"state": "Santiago Metropolitan",
"country": "Chile",
"flagURL": "https://cdn.airvisual.net/flags/chile.jpg",
"updatedAt": "2026-05-14T16:00:00.000Z",
"followersCount": 169850
}
]
},
"status": "success"
}
}About the iqair.com API
This API exposes 4 endpoints covering IQAir's global air quality dataset, from world-level pollution rankings to granular city data. The get_city_air_quality endpoint returns current AQI, individual pollutant concentrations, weather conditions, pollen data, and health recommendations for any city. The get_map_data endpoint returns geohash-clustered station markers with bounding-box and zoom filtering for map-based applications.
Global Rankings and City Listings
get_world_air_quality returns two arrays — up to 15 entries each — of the current top polluted and cleanest cities worldwide. Each entry includes the city name, state, country, AQI value, rank, follower count, and an updatedAt timestamp. get_live_city_ranking extends this to up to 122 cities sorted by AQI descending, adding a unique id per city and a global updatedAt field. The url field in both endpoints provides the slug components needed to query individual cities.
City-Level Air Quality Details
get_city_air_quality accepts three required slug parameters — city, state, and country — which correspond to the URL-formatted slugs found in the ranking endpoints (e.g. new-york-city, new-york, usa). The response's details object includes coordinates, forecasts, weather, pollen, and station-level data alongside the current AQI. The pollutants array itemizes each measured pollutant with its name, AQI contribution, concentration value, unit, and a description. The recommendations object provides health guidance across four categories: outdoor exercise, window ventilation, mask use, and air purifier use.
Map Visualization Data
get_map_data is designed for cartographic use cases. It accepts an optional bbox parameter as a comma-separated string in minLng,minLat,maxLng,maxLat format and an optional zoom integer from 1 to 20. Omitting bbox returns global coverage. Each marker in the markers array includes a geohash, station count, latitude/longitude coordinates, and an aggregated AQI value, making it suitable for building live air quality map overlays without pre-fetching all city data.
- Build a real-time air quality dashboard showing the world's most and least polluted cities using
get_world_air_quality. - Render a zoomable global air quality map using geohash clusters from
get_map_datawith bounding-box filtering. - Display city-specific AQI and pollutant breakdowns (PM2.5, PM10, etc.) in a travel or health app via
get_city_air_quality. - Surface health recommendations for outdoor exercise or mask use based on current AQI conditions for a given city.
- Track air quality trends by polling
get_live_city_rankingto compare AQI values across 122 cities in a single call. - Correlate pollen and weather data with AQI readings for allergy or respiratory health applications.
- Power city comparison features by fetching multiple cities using slugs extracted from the ranking endpoints.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does IQAir have an official developer API?+
What does `get_city_air_quality` return beyond just the AQI number?+
details object with city coordinates, forecasts, weather conditions, pollen data, and station info. It also returns a pollutants array with per-pollutant AQI, concentration, and unit, plus a recommendations object with four health guidance fields: exercise, windows, masks, and air purifiers.How do I find the correct slug values for `city`, `state`, and `country` parameters?+
url field in both get_world_air_quality and get_live_city_ranking responses contains the path segments used as slugs. Parse those fields to extract the city, state, and country strings needed for get_city_air_quality.Does the API expose historical AQI time-series data for a city?+
Is station-level data (individual monitors) accessible, or only city aggregates?+
get_city_air_quality endpoint includes station data within the details object, but get_map_data returns geohash clusters aggregated across stations rather than individual station records. You can fork the API on Parse and revise it to expose per-station detail endpoints if your use case requires that granularity.