Docs / Places and transport
Air quality API
The air quality index at CPCB's monitoring stations across India, updated hourly.
The latest readings of the Central Pollution Control Board's continuous monitoring stations (PM2.5, PM10, NO2, SO2, CO, ozone, NH3), from data.gov.in, refreshed hourly, with the National Air Quality Index and its band (Good to Severe) worked out per CPCB's rule. Find stations by city, state, name, or nearest to a point.
https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as MarkdownStations with their AQI and pollutants
GET/v1/air-quality
Every station that matches, each with its AQI, category, the pollutant that sets it, and each pollutant's sub-index. With near, the five nearest stations and their distance.
| Parameter | Description |
|---|---|
cityquery | As CPCB names it: Delhi, Mumbai, Bengaluru, Chennai ... |
statequery | Such as Tamil Nadu. |
stationquery | Part of a station's name. |
nearquery | latitude,longitude: the five nearest stations. |
curl
curl "https://api.dharun.dev/v1/air-quality?city=Chennai&utm_medium=docs"JavaScript
const response = await fetch("https://api.dharun.dev/v1/air-quality?city=Chennai&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/air-quality?city=Chennai&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Try it here
Change the values and send the request from your browser. Needs JavaScript.
Data source
Real time Air Quality Index from various locations, 92a8041868a4. Retrieved 2026-11-13T23:10:29Z. Licence: Government Open Data License - India. Air quality from CPCB's monitoring stations, published on data.gov.in under the Government Open Data License - India.
Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.