Stream New South Wales air quality and meteorology data using an API
This air quality API enables organisations and individuals to directly stream and integrate air quality and meteorological data into subsequent applications such as mobile apps, websites, decision support tools, third-party data systems, and many other facilities.
By delivering near-real-time data via this API, the department is supporting policy, research and business decision-makers to improve and positively influence environmental and health considerations.
What can the air quality API give you?
The air quality API provides 3 datasets, which can be accessed and streamed as current real-time hourly data, or downloaded as historical data:
- Observational data: access air quality and meteorological observational data collected from the NSW air quality monitoring network. Observational data are updated every hour.
- Station details: download monitoring station details including the site name, longitude, latitude and region name.
- Parameter descriptions: get details about the air pollutants and meteorological parameters we monitor, including averaging periods, exceedances and air quality indexes.
How do I use the air quality API?
API User Guide
Download the Air Quality API User Guide (PDF 1.8MB) to guide you on setting up data streaming into your application. The user guide also provides a data dictionary, and demonstrated examples on using Microsoft Excel Power Query and the programming languages R and Python, though you are not limited to using these.
API Excel Power Query
You may use MS Excel Power Query to download observational data, station details and parameter descriptions. The Air Quality API User Guide outlines the steps involved for this example Excel Power Query (XLSX 1326B).
API data user interface (swagger)
Changes to the NSW Air Quality API
The NSW Department of Planning and Environment has implemented changes to the NSW Air Quality API.
In November 2020, the department implemented changes to air quality reporting by introducing Air Quality Categories (AQC), a system now used to categorise air quality. This system has replaced the Air Quality Index (AQI) classification. The Air Quality API was updated to reflect this change to the data stream.
Specifically, the get_Observations API now has 2 extra columns called Air Quality Category and Determining Pollutant. The Determining Pollutant is the pollutant that determines the Site or Regional Air Quality Category. The Air Quality Categories are Good, Fair, Poor. Very Poor and Extremely Poor. All index values are removed.
How will this impact you?
AQI values are no longer available, and if you rely on AQI data from the API, you may need to prepare for this change within your operational applications.
All data, including historical data collected before AQCs were implemented, are updated. To recover data after the outage on Tuesday 24 August 2021, refer to section 5.1.4 of the Air Quality Application Programming Interface User Guide.
We appreciate your co-operation and apologise for any inconvenience this may have caused. If you have any questions please contact the Air Quality team at nswairAPI@environment.nsw.gov.au
About air quality categories
Find out about air quality categories and how hourly values are categorised into AQCs: Air quality categories
Contact the team
- Feedback or problems with the API: nswairAPI@environment.nsw.gov.au
- More information: firstname.lastname@example.org
Other data portals
See the data licence statement for information about using and attributing these data.