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

**URL:** <https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550>\
**Category:** API\
**Created:** [May 18, 2023, 12:43pm UTC](https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550 "2023-05-18T12:43:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![megonzalez](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@megonzalez](https://community.purpleair.com/u/megonzalez)\
**Post date:** [May 18, 2023, 12:43pm UTC](https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550/1 "2023-05-18T12:43:09Z")

</div>

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:

 ![pa](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/3/335372eedf68e82eceee239f0a0989cd8e60d827.png)

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

 ![pa data](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/1/1e7775f97b14d204f265ea070f04e59fadc77d75.png)

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!

---

<div class="post-metadata">

**Author:** ![Ethan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/ethan/32/177_2.png) [@Ethan](https://community.purpleair.com/u/Ethan)\
**Post date:** [May 23, 2023, 7:38pm UTC](https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550/2 "2023-05-23T19:38:09Z")

</div>

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](https://api.purpleair.com/#api-sensors-get-sensors-data)” request with a bounding box to collect these values.

---

<div class="post-metadata">

**Author:** ![megonzalez](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@megonzalez](https://community.purpleair.com/u/megonzalez)\
**Post date:** [June 29, 2023, 2:32pm UTC](https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550/3 "2023-06-29T14:32:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/andrew/32/1211_2.png) [@Andrew](https://community.purpleair.com/u/Andrew)\
**Post date:** [September 18, 2023, 8:03pm UTC](https://community.purpleair.com/t/purpleair-data-download-tool-issue-with-getting-the-latitude-longitude-of-sensors/4550/4 "2023-09-18T20:03:33Z")

</div>

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