PurpleAir Data Download Tool - Issue with getting the latitude & longitude of sensors

For my project, I need to get all the latitudes and longitude of all (both current and past) PurpleAIr sensors in South Africa using the PurpleAir Data Download Tool.

I tested doing this with one sensor with the sensor ID number: 75851. Here is how my download page looks:

The spreadsheet that downloads has the latitude and longitude sections are empty:

Does anyone have any suggestions on how to update my process to get the locations (latitude and longitude) of sensor ID number sensor ID number: 75851 and on how to get the same data for all sensors in South Africa?

Thank you!

1 Like

Hi @megonzalez,

The latitude and longitude values of PurpleAir sensors are not currently available through the historical API. You will need to use the real-time API to get that data. You can use the “Get Sensors Data” request with a bounding box to collect these values.

1 Like

Hi @Ethan,

Thank you. This really helped. I am having an issue with this method. I used the real-time API to and bounding box to collect these values. However, I only get sensors that are currently collecting data and not past sensors. Is there anyone to get past sensors using this method?

Thanks,
Marisa

1 Like

You can use the parameter max_age = 0 to get all sensors in the bounding box, regardless of when they were last online.