Guides / how-to-connect-nsw-air-quality-api-australia
NSW State gov
How to connect the NSW Air Quality Data API
NSW DCCEEW
NSW DCCEEW publishes station-level air quality readings through a small REST API with a Swagger spec at /swagger/v1/swagger.json. Site and parameter lookups are plain GETs; observations are fetched with a POST to get_Observations carrying a JSON body.
Start with get_SiteDetails and get_ParameterDetails to learn the site and parameter codes, then request observations for a short date range.
Steps
- Find the base URL. Use
https://data.airquality.nsw.gov.au/api/Data/— docs at https://data.airquality.nsw.gov.au/docs/index.html. - Auth. Catalogued as Open — none.
- Try an example request.
curl -s 'https://data.airquality.nsw.gov.au/api/Data/get_SiteDetails' - Licence. Unknown — not stated by the publisher. Read the publisher terms before production use.
- Agent notes. Swagger/OpenAPI at /swagger/v1/swagger.json. Three operations: GET get_SiteDetails (monitoring stations with lat/long and region), GET get_ParameterDetails (pollutants and averaging periods), POST get_Observations (JSON body selecting sites, parameters and dates; hourly PM2.5, PM10, O3, NO2 and more). Returns plain JSON arrays; no pagination mechanism documented — keep date ranges small. Rate limits: unknown. Licence: unknown (not stated in the API docs).
- base
- https://data.airquality.nsw.gov.au/api/Data/
- docs
- https://data.airquality.nsw.gov.au/docs/index.html
- protocol
- REST v1
- auth
- Open
- licence
- Licence unclear
- try
- curl -s 'https://data.airquality.nsw.gov.au/api/Data/get_SiteDetails'
- checked
- 2026-10-15 · 200 OK · 1089 ms