Air Quality API
Nearest-station PM2.5, ozone and US AQI readings for any coordinates. Latest air-quality readings — PM2.5, PM10, ozone, NO2, SO2, CO and more — from the…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Nearest-station PM2.5, ozone and US AQI readings for any coordinates.
Latest air-quality readings — PM2.5, PM10, ozone, NO2, SO2, CO and more — from the nearest government and research-grade monitoring station to any coordinates, with a computed US EPA AQI (value, category, dominant pollutant), per-pollutant timestamps and staleness flags, a nearby-station directory, station detail and a pollutant catalogue. Open data via OpenAQ under each station's own government licence (public domain, CC BY, ODC-BY, UK OGL and similar; non-commercial stations excluded), edge-cached for 15 minutes.
Endpoints 5
- GETData Sources
/v1/sourcesData Sources endpoint of the Air Quality API. Costs 10 tokens per call. - GETNearby Stations
/v1/stations?lat=40.71&lon=-74.0Nearby Stations endpoint of the Air Quality API. Costs 10 tokens per call. - GETNearest Readings
/v1/air-quality?lat=40.71&lon=-74.0Nearest Readings endpoint of the Air Quality API. Costs 10 tokens per call. - GETPollutant Parameters
/v1/parametersPollutant Parameters endpoint of the Air Quality API. Costs 10 tokens per call. - GETStation Detail
/v1/stations/:idStation Detail endpoint of the Air Quality API. Costs 10 tokens per call.
API details
- Base URL
https://api-air-quality.dataandapis.com- Authentication
- An API key in the X-Api-Key header
- Operations
- 5 operations on 5 pathsGET 5
- Response formats
application/json- Description format
- OpenAPI 3.1.0, API version
1.0.0 - Links
- Documentation · OpenAPI document · Terms of service · Support
- Listed from
- Dataandapis's published OpenAPI description
How to test the Air Quality API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Air Quality API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-Api-Key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Data Sources” (GET /v1/sources), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Air Quality API?
Nearest-station PM2.5, ozone and US AQI readings for any coordinates. Latest air-quality readings — PM2.5, PM10, ozone, NO2, SO2, CO and more — from the… It is listed under Developer tools and has 5 endpoints.
Who publishes the Air Quality API?
It is listed from Dataandapis's public API description (an OpenAPI document), not published by Dataandapis on Swastik Codes. Anyone who controls dataandapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Air Quality API?
Requests go to https://api-air-quality.dataandapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Air Quality API?
With an API key in the X-Api-Key header.
How many endpoints does the Air Quality API have?
5 operations on 5 paths (5 GET).
Is forking the Air Quality API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.