# Trying to Download Data

**URL:** <https://community.purpleair.com/t/trying-to-download-data/4485>\
**Category:** Data\
**Created:** [May 11, 2023, 7:30pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485 "2023-05-11T19:30:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpryor](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cpryor](https://community.purpleair.com/u/cpryor)\
**Post date:** [May 11, 2023, 7:30pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/1 "2023-05-11T19:30:11Z")

</div>

I am trying to download historical data for multiple sensors for a research project. I am getting the below error. Not sure if I am doing something wrong. Thanks!

Starting requests for sensor 13.  
Making request 1.  
Error Code: 400  
Error: InvalidHistoryFieldValueError  
Description: A provided history field (latitude) was not found.  
_Error Meaning: This error means that at least one of the fields you are using does not work with an average. View the error message for the specific field that is causing the error._  
Due to this error, the process is being aborted…

Process has been aborted!

---

<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 12, 2023, 5:09pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/2 "2023-05-12T17:09:24Z")

</div>

Hi @cpryor,

This error is occurring because the “latitude” field only works with a 2-minute average. You will have to change to a 2-minute average or remove the “latitude” field to query the data.

We do not recommend querying the latitude value frequently as it should not change. More information is available here: [API Use Guidelines](https://community.purpleair.com/t/api-use-guidelines/1589#avoid-querying-metadata-frequently-6).

---

<div class="post-metadata">

**Author:** ![cpryor](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cpryor](https://community.purpleair.com/u/cpryor)\
**Post date:** [May 12, 2023, 5:27pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/3 "2023-05-12T17:27:09Z")

</div>

Is there a way to get a list of monitors with latitude and longitude without querying? Then the querying could just focus on data needed?

Thanks!

Cecile

---

<div class="post-metadata">

**Author:** ![Alaaeldin\_Eltayeb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/alaaeldin_eltayeb/32/1759_2.png) [@Alaaeldin\_Eltayeb](https://community.purpleair.com/u/Alaaeldin_Eltayeb)\
**Post date:** [May 17, 2023, 11:17pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/4 "2023-05-17T23:17:36Z")

</div>

Interested in seeing something similar; if someone helps, that would be so insightful. Push on this to become apparent in this thread – Thanks!

---

<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, 9:46am UTC](https://community.purpleair.com/t/trying-to-download-data/4485/5 "2023-05-18T09:46:31Z")

</div>

I am also interested in getting a list of sensors with the latitude and longitude. If someone knows how to do this, it would be very much appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![cpryor](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cpryor](https://community.purpleair.com/u/cpryor)\
**Post date:** [June 5, 2023, 7:43pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/6 "2023-06-05T19:43:26Z")

</div>

I tried to query the sensors using the Data Download Tool using real-time and then the latitude and longitude fields and it returns no data. What is the correct way to get latitude and longitude for senors?

---

<div class="post-metadata">

**Author:** ![cpryor](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cpryor](https://community.purpleair.com/u/cpryor)\
**Post date:** [June 5, 2023, 7:44pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/7 "2023-06-05T19:44:53Z")

</div>

There is not a 2 minute average option. Just real time (which did not work) and 10 minute is the next option. Still unsure how to retrieve latitude and longitude.

---

<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:** [June 6, 2023, 4:27pm UTC](https://community.purpleair.com/t/trying-to-download-data/4485/8 "2023-06-06T16:27:17Z")

</div>

You cannot currently get latitude and longitude values using the historical API. The 2-minute (real-time) option in the data download tool will download data with a 2-minute average but still uses the historical API.

You will need programming experience to get the latitude and longitude values. You could also try entering your request at [https://api.purpleair.com/](https://api.purpleair.com/).

We are always looking to incorporate more features and improve our services. We will look into implementing a tool to collect latitude and longitude values in the future.
