AQICN API
Overview
AQICN (Air Quality Index CN) provides real-time air quality data for over 1,000 cities worldwide, including PM2.5, PM10, ozone, and other pollutant readings. You pass a city name or geographic coordinates along with your API token to get the current AQI and individual pollutant levels. It is great for environmental apps, health dashboards, or travel tools that show air quality conditions.
Beginner Tip
The API returns an AQI number following the US EPA standard scale, where 0-50 is good and anything above 150 is unhealthy; display this alongside the dominant pollutant field to give users meaningful context. You can also use the geo: prefix with latitude and longitude (e.g., geo:48.85;2.35) to look up the nearest station by coordinates.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from AQICN",
"description": "Air Quality Index Data for over 1000 cities",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
data.aqi The overall Air Quality Index value on the US EPA scale (0-500+). data.city.name Name of the city or monitoring station providing the AQI reading. data.dominentpol The dominant pollutant driving the current AQI value, e.g., pm25 or o3. data.iaqi.pm25.v Individual PM2.5 particle concentration value used to compute the AQI. data.time.s Timestamp of the most recent air quality reading in local time. data.forecast.daily Daily AQI forecasts for the next few days keyed by pollutant type. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://aqicn.org/api/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Alternatives to AQICN
Technical alternatives for different use cases.
Includes air quality data with no API key required
Quick prototyping of air quality features
Real-time AQI station-level reporting
Includes air pollution API alongside weather data
Apps that need both weather and air quality in one API
Dedicated air quality monitoring with detailed pollutant data
Similar APIs
View All →AccuWeather
AccuWeather's API provides highly detailed weather forecasts, current conditions, and severe weather alerts for locations around the world.
Aemet
Aemet OpenData is Spain's official meteorological agency API providing weather forecasts, observations, and climate data for Spanish territory including the Canary Islands and Balearics.
APIXU
APIXU (now rebranded as Weatherstack) is a weather data API that provides current conditions, forecasts, and historical weather for locations around the world.
ColorfulClouds
ColorfulClouds (Caiyun Weather) is a Chinese weather API that delivers real-time and forecast weather data with minute-level precipitation predictions.
Euskalmet
Euskalmet is the official meteorological API for the Basque Country in Spain, providing weather observations, forecasts, and climate records for the region.