openaqi API
Crowdsourced air quality by location — current conditions, history, and everything needed to contribute your own sensor.
Readings from air quality sensors that members of the public run themselves, aggregated into areas of about 5 km² and published for anyone to use.
Read this before you build on it
This is not official monitoring data. Readings come from consumer-grade
sensors, are unvalidated, and must not be used for health, regulatory or
emergency decisions. Every response carries a meta.notice saying so — carry it
through to whatever you build. Full terms.
Two minutes
curl -H "Authorization: Bearer $OPENAQI_KEY" \
"https://openaqi.net/api/v1/air?lat=37.3352&lon=-121.8811"Keys are free and instant at your account. No card, no application form.
What is here
Quickstart
A working request in curl, JavaScript or Python.
Authentication
Keys, browser use, and origin locking.
Current conditions
GET /v1/air — the endpoint everything else is arranged around.
Contribute readings
Send data from a UniFi Protect air quality sensor.
Metrics
Every metric, its units, and the standard it is graded against.
SDK
Zero-dependency TypeScript client.
The three things that surprise people
Coverage is a mosaic, not a grid. Cells are about 5 km across and a
coordinate can land in one nobody reports from. The API widens to a neighbouring
cell and tells you it did — check data.coverage.exact before attributing a
reading to an exact place.
Quota belongs to your account, not your key. Hold as many keys as you have apps; they all draw on one budget. Minting a key is not a way to get more.
Sensor positions are never published. centre is the centre of a cell.
There is no endpoint that returns where anyone's sensor is, and the readings
table has no coordinate column at all.