IQAir API
Overview
IQAir API provides real-time air quality index (AQI) data and weather conditions for cities and stations worldwide, powered by the IQAir sensor network. You need a free API key to access it, which can be obtained from the IQAir developer portal. It is great for building health-aware applications that notify users about air pollution levels in their area.
Beginner Tip
Register for a free API key at iqair.com/dashboard/api to access up to 10,000 calls per month on the free tier. Start with the nearest-city endpoint by passing lat/lon coordinates to get instant AQI data without needing to know station names.
Available Data
Example Response
{
"location": "Tokyo",
"temperature": {
"current": 22,
"feels_like": 24,
"min": 18,
"max": 26
},
"condition": "Partly Cloudy",
"humidity": 65,
"wind": {
"speed": 12,
"direction": "NE"
},
"forecast": [
{
"date": "2025-01-16",
"high": 25,
"low": 17,
"condition": "Sunny"
}
]
} Field Reference
status Response status; "success" indicates a valid result was returned data.city Name of the city for which air quality data is returned data.current.pollution.aqius US AQI value (0-500); higher values indicate worse air quality (0-50 is Good, 151+ is Unhealthy) data.current.pollution.mainus Main pollutant driving the AQI, e.g. "p2" for PM2.5 or "o3" for ozone data.current.weather.tp Current temperature in Celsius at the measurement location data.current.weather.hu Relative humidity percentage at the measurement location Implementation Example
const url = "https://www.iqair.com/air-pollution-data-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
Related Tags
Recipes Using IQAir
Build something with this API. Each recipe includes step-by-step instructions and code outlines.
Similar APIs
View All →BreezoMeter Pollen
BreezoMeter Pollen API (now part of Google Maps Platform) provides daily pollen forecast data including pollen type, index values, and risk levels for a specific geographic location.
Carbon Interface
Carbon Interface API calculates estimated CO2 emissions for common activities such as electricity usage, flights, vehicle travel, and shipping.
Climatiq
Climatiq is an API for calculating carbon emissions and environmental footprint across a wide range of activities including travel, energy use, and shipping.
Cloverly
Cloverly provides programmatic access to api calculates the impact of common carbon-intensive activities in real time via REST API.
OpenAQ
⭐ Beginner's PickOpenAQ is an open-source platform providing access to air quality data aggregated from thousands of government and research-grade monitoring stations worldwide.