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. This email will contain a section that looks like the following:
Registration Summary
Device-Id: a4:83:85:74:3:77
Sensor Index: 246700
Read Key: P9I4GO9H3IBSO0KU
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