AQS Data API documentation version 1.1
https://aqs.epa.gov/api
Introduction
Welcome to the AQS (Air Quality System) API. AQS contains the data that the US EPA has collected via the national ambient air monitoring program. It also includes the associated aggregate values calculated by EPA (8-hour, daily, annual, etc.). The intended users of the Data Mart are air quality data analysts in the regulatory, academic, and health research communities who are familiar with AQS data. This document only describes the API and not the nuances of the air quality data.
About Notify Services
You will see that each service is available in two forms. The basic service and the Notify service. The basic service is a synchronous service that requires the connection to remain open to complete. This is intended for users of the GUI. The Notify service is an asynchronous service that allows the connection to be ended and the data retrieved later. It is the nominal form to use if accessing the API and not the GUI and can be used in conjunction with the status and retrieve services. _The data from each service is exactly the same, the only difference is the delivery mechanism.
How to use this document
Each service is listed below. First the class of service and then the name of the service (in our case, these are identical). Click on the name of the service to get a brief description of the data it provides and an example URL. Clikc on the "get" button to see the list of all variables that can be used to query the data (on the "Rrequest" tab). Click the "Response" tab to see the description of possible responses and a description the contents of the returned data.
Registration
Registration is required to use this API. To register please visit https://aqs.epa.gov/signup.
Change Log
Verion 1.1
- Profile service added.
- Minor editorial changes.
/rawData
Returns raw data that match your query criteria. This is a synchronous query that returns data to your screen, so you must stay connected to the web page while the query runs.
Example. To select ozone data for Durham County, NC, for May 01, 2011, using a synchronous query and returning data in DMCSV format
(This URL will not work unless you replace the asterisks with your credentials)
/rawDataNotify
Returns raw data that match your query criteria. This is an asynchronous query that returns a Transaction ID number. The query is run on our servers and when it is complete, an email will be sent you with a link to your data (tied to the Transaction ID). After submitting this query, you may close your browser or end your session.
Example. To select ozone data for Durham County, NC, for May 01, 2011, using an asynchronous query and returning data in DMCSV format
(This URL will not work unless you replace the asterisks with your credentials)
/profile
The purpose of this service is to give users a "profile" of the available data in the system before they construct other queries to retrieve the data.
Returns a list of monitors that match your selection criteria and a profile of the data available from those monitors. Any monitor that matches your selection criteria will be returned. Particular attention should be paid to the time window. If the monitor operated between the years of the begin date and end date (only full years are considered), the monitor will be included in the returned list. However, information about the entire operational history of the monitor will be included in the returned file.
This is a synchronous query that returns data to your screen, so you must stay connected to the web page while the query runs.
Example. To select ozone monitors for Durham County, NC that operated between 2010 and 2015, using a synchronous query and returning data in CSV format
(This URL will not work unless you replace the asterisks with your credentials)
/profileNotify
Returns a list of monitors that match your selection criteria and a profile of the data available from those monitors. Any monitor that matches your selection criteria will be returned. Particular attention should be paid to the time window. If the monitor operated between the years of the begin date and end date (only full years are considered), the monitor will be included in the returned list. However, information about the entire operational history of the monitor will be included in the returned file.
This is an asynchronous query that returns a Transaction ID number. The query is run on our servers and when it is complete, an email will be sent you with a link to your data (tied to the Transaction ID). After submitting this query, you may close your browser or end your session.
Example. To select ozone monitors for Durham County, NC that operated between 2010 and 2015, using a synchronous query and returning data in CSV format
(This URL will not work unless you replace the asterisks with your credentials)
/status
Returns the status of a previously submitted job.
Example. To get the status of Transaction ID = 123456789
/retrieve
Returns the data created with a previsously submitted request.
Example. To get the data created with Transaction ID = 123456789
/list
Returns a list of valid values for a variable. Requesting a list takes three parts. The list name, the qualifier (what to filter the list on), and the resource - only one of which is currently available. To get a list of parameters (the list name) that belong to the Criteria parameter class (the qualifier) https://aqs.epa.gov/api/list?name=param&pc=CRITERIA
/serviceAvailable
Returns a response if our services are working. Example https://aqs.epa.gov/api/serviceAvailable