first step is to make sure to acquire your own token for all API access.
You can get your token from the data-platform token page.
Map tile API
The map tile API can be used to show the real-time Air Quality index on a google, bing or openstreet map.
Read more about the Map tile API description and examples
The widget API can be used to integrate the real-time Air Quality index on any web page.
Read more about the Widget API description.
There is also a non-programmatic API for an easy integration with word-press, which can generate any of the widget below. For more information, go to your city page (eg aqicn.org/city/auckland), scroll-down until you find the "Download the real-time Air Quality Index Widget" and click on the "Wordpress & Blogger" logo.
$ curl -i "http://api.waqi.info/feed/shanghai/?token=demo"
The JSON API can be used for advanced programmatic integration:
- Access to more than 11000 station-level and 1000 city-level data
- Geo-location query (based on latitude/longitude or IP address)
- Individual AQI for all pollutants (PM2.5, PM10, NO2, CO, SO2, Ozone)
- Station name and coordinates
- Originating EPA name and link
- Current weather conditions
- Stations within a map lat/lng bounds
- Search stations by name
- Air Quality forecast (for 3~8 days)
Note that more functionality will be added during the coming weeks:
- Weather forecast (for 8 days)
- World ranking and trend
- Neighbor stations AQI
- Historical Data
- Pollutant raw concentration (for usage with different scales)
- PubSub notification service
We may change, delete, add to, or otherwise amend information contained on this website without notice.
Under no circumstances will the World Air Quality Index project team or its agents be liable in contract, tort or otherwise for any loss, injury or damage arising directly or indirectly from the supply of this data.