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.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Stations 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.

ParameterDescription
cityqueryAs CPCB names it: Delhi, Mumbai, Bengaluru, Chennai ...
statequerySuch as Tamil Nadu.
stationqueryPart of a station's name.
nearquerylatitude,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.