What it does
OpenAQ API provides programmatic access to air-quality data collected from many upstream sources. Its v3 resources cover locations, sensors, parameters, and measurements, including hourly and daily aggregations. Developers can filter by geography and time, but they must register for an API key and account, respect per-key request limits, and check the license and attribution requirements for the source data they use.
From station metadata to a trend
A useful first task is to look up a monitoring location, note its sensor identifiers, then request measurements for one sensor over a bounded date range. OpenAQ's quick start demonstrates a location lookup for station ID 8118 in New Delhi. Measurement resources can return the values reported by a sensor or aggregated periods such as hours and days. Use smaller date windows when an aggregation over a large range may be slow, and follow the documented pagination controls when a response spans multiple pages.
The API requires an account and a registered key. A client sends the key in the X-API-Key header; it is a credential, not a public project identifier. The general tier is free and allows 60 requests per minute and 2,000 per hour per key. Higher limits are available by contacting OpenAQ, with custom pricing rather than a published amount. Rate-limit headers help a client track use, and a 429 response means it should wait for the reset rather than keep retrying.
Build a server-side integration
OpenAQ blocks browser-originated cross-origin requests, so a frontend should not call the API directly. Put the request behind your own backend and return only the needed data to a page or mobile client. This also gives you a place to cache repeated location and parameter lookups.
The records come from upstream data providers, so license and attribution conditions can vary. Review the license associated with the data you intend to reuse, credit OpenAQ and the source when required, and avoid running requests indefinitely when the data is no longer needed. The API can help analyze reported measurements; it does not validate sensor calibration or guarantee that every location continues to publish data.
Strengths
- Exposes station, sensor, parameter, and measurement resources in a documented v3 API.
- Supports geographic filters, date windows, pagination, and pre-aggregated measurement periods.
- The free tier provides documented per-key request quotas and response headers for tracking use.
Watch out for
- A registered account and API key are required, and free-tier throughput is capped per key.
- Browser JavaScript cannot call the API cross-origin directly; a backend proxy is needed.
- Data licenses and availability depend on upstream providers and can differ by source.
Best for
- Air-quality dashboards that compare measurements across monitoring locations.
- Research pipelines that need sensor-level or aggregated pollutant time series.
- Backend services that can authenticate, cache responses, and honor per-key rate limits.
Sources
- Quick start | OpenAQ Docs (Oct 26, 2026)
- API Key | OpenAQ Docs (Oct 26, 2026)
- Rate limits | OpenAQ Docs (Oct 26, 2026)
- Measurements | OpenAQ Docs (Oct 26, 2026)
- Frequently Asked Questions | OpenAQ Docs (Oct 26, 2026)
- Terms of use | OpenAQ Docs (Oct 26, 2026)
