Sensor Indexes and Read Keys

This article is related to the PurpleAir API. If you are unfamiliar with it, check out About the PurpleAir API to get started.

What are Sensor Indexes and Read Keys?

The sensor index is an identifying number unique to each sensor. It is 4-6 characters long and is used in making API calls to download data.

The sensor read key is only needed for retrieving data reported while a sensor was privately registered. It’s an alphanumeric string 16 characters long.

Archiving a sensor creates a new index and read key. The new index and read key will only return data after the archival. The old index and read key can still be used, but will only return data before the archival.


How do I Find a Sensor’s Index or Read Key?

Using the Registration Confirmation Email

After you register your sensor, a confirmation email is sent. This contains both the sensor’s index and its read key.

To find these, look at the bottom of the email for a section labeled “Useful Links.” Within this section, there is a link labeled “Download Data," which will look like this: https://www.purpleair.com/sensorlist?show=209743&key=NY8JP6D1SB73V78G

The sensor’s index is after “show=”, meaning that it would be 209743 in this example.

The sensor’s read key is after “key=” meaning that it would be “NY8JP6D1SB73V78G” in this example.

Using the registration confirmation email is the only way to find a sensor’s read key.

Using the PurpleAir Map

Find a sensor on the PurpleAir map and click or tap its Map Marker. Then view the URL in your browser. It will look something like this:

https://map.purpleair.com/1/mAQI/a10/p604800/cC0?select=204315#8.49/40.7459/-111.6745

The sensor index is located after the text “select=”. For this example, the sensor index is 204315.

If the map marker for a specific sensor doesn’t appear, try following the steps in our Map Troubleshooting Guide.


Learn More

About the PurpleAir API
The PurpleAir Data Download Tool
Making API Calls in Other Programming Languages