About the PurpleAir API

The PurpleAir API

The PurpleAir API allows you to obtain air quality data reported by PurpleAir sensors. This is an extensive dataset going back to early 2016.

Users wanting to jump straight into the technical details should utilize our API documentation to make queries.

Aside from using the API, data can also be obtained by:

Using The API

There are multiple ways to use and obtain data from the API. This section goes over how gain access to the API and begin retrieving data.

Points Based System

Before we begin, it’s important to note that the API is a points-based system. For API calls to be successful, you must have the required number of points in your Organization.

All new API users receive 1 million points upon signing up, with further points available for purchase. Sensor owners don’t need to pay for data from their sensors and can view our API Points for Sensor Owners article for more information.

Our article on Making Efficient API Calls provides tips that can help reduce your point usage.

Creating Keys

To use the API, you’ll need to create API keys. These keys uniquely identify your account and must be used to request data from the API.

It’s important not to share these keys, as anyone with them can use your account to obtain data

Obtaining Data

Those familiar with programming can examine our API documentation and query the API directly. Our article on Making API Calls with the PurpleAir API also provides an introduction for users who would like to learn how to do so.

For those without any programming experience, using the Data Download Tool is the easiest way to obtain historical data. Simply enter the details for data you would like, and the Download Tool will query the API for you.

Data Available From the API

Data is returned in JSON format by default

Real-Time Data

The latest data reported on the PurpleAir network can be queried using real-time API endpoints. The Get Sensor Data endpoint allows you to query a single sensor, while the Get Sensors Data endpoint allows you to query multiple sensors in the same call There is no limit to the number of sensors you can query in a Get Sensors Data call.

Historical Data

If you would like historical data, you can use the Get Sensor History endpoint. This endpoint allows you to query a time range of data for a single sensor. A CSV endpoint is also available for historical data.

The amount of data you can retrieve at once is limited based on the averaging period requested. Further information is available in our Looping API Calls for Historical Data article.


If there’s a set of sensors you expect to query frequently, you can create a group to simplify your API calls. Endpoints available for groups mirror those for the real-time and historical APIs. Real-time data can be queried for the entire group at once, while historical data must be requested for a single sensor at a time.

The Data Download Tool can currently only download historical data


Using APIs can be complicated. If you have any questions or would like support, please make a community post or send an email to contact@purpleair.com. We are happy to help.

Learn More

API Pricing
Using the API Dashboard
Making API Calls in Other Programming Languages