# Download data in Sep 2020

**URL:** <https://community.purpleair.com/t/download-data-in-sep-2020/897>\
**Category:** API\
**Created:** [June 8, 2022, 9:32pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897 "2022-06-08T21:32:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hongli\_Wang\_NOAA\_Aff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/hongli_wang_noaa_aff/32/573_2.png) [@Hongli\_Wang\_NOAA\_Aff](https://community.purpleair.com/u/Hongli_Wang_NOAA_Aff)\
**Post date:** [June 8, 2022, 9:32pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/1 "2022-06-08T21:32:43Z")

</div>

I want to use the data to verify and improve CMAQ model simulations for Sep 2020. So I want to download data of all stations. I am new and don’t have any experience on the API. It seems that first I need to get the sensor list, and then download the data for each sensor in Sep 2022. Does anyone have done similar work? Any suggestions and help are welcome and appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![Zuber\_Farooqui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/zuber_farooqui/32/610_2.png) [@Zuber\_Farooqui](https://community.purpleair.com/u/Zuber_Farooqui)\
**Post date:** [June 13, 2022, 2:03am UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/2 "2022-06-13T02:03:56Z")

</div>

Hi Hongli,

I might be having data for Sep 2020. Let me know your if you need for entire month or specific days and which area.

Thanks!!

---

<div class="post-metadata">

**Author:** ![Hongli\_Wang\_NOAA\_Aff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/hongli_wang_noaa_aff/32/573_2.png) [@Hongli\_Wang\_NOAA\_Aff](https://community.purpleair.com/u/Hongli_Wang_NOAA_Aff)\
**Post date:** [June 13, 2022, 4:24am UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/3 "2022-06-13T04:24:09Z")

</div>

Hi Zuber,

It is great to hear that. I would like to have the data for the entire month of Sep 2020. My NOAA email is [Hongli.Wang@noaa.gov](mailto:Hongli.Wang@noaa.gov). We can talk more about the data though email too.

Thanks,  
Hongli

---

<div class="post-metadata">

**Author:** ![Aki](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/aki/32/337_2.png) [@Aki](https://community.purpleair.com/u/Aki)\
**Post date:** [June 13, 2022, 2:52pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/4 "2022-06-13T14:52:44Z")

</div>

Hello Hongli,

We have the following article [Making API Calls with the PurpleAir API](https://community.purpleair.com/t/making-api-calls-with-the-purpleair-api/180) if you want to learn about using the PurpleAir API.

Email us at contact:purpleair.com if you would like API keys.

All we require is the first/last name you would like the keys assigned to for us to complete the process.

Kind regards,  
Aki

---

<div class="post-metadata">

**Author:** ![Hongli\_Wang\_NOAA\_Aff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/hongli_wang_noaa_aff/32/573_2.png) [@Hongli\_Wang\_NOAA\_Aff](https://community.purpleair.com/u/Hongli_Wang_NOAA_Aff)\
**Post date:** [June 13, 2022, 3:30pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/5 "2022-06-13T15:30:27Z")

</div>

Hello Aki,

Thanks for your reply.  
Ethan had assigned me a API key. The problem I met is how to specify the dates along with specific area:  
For example, the below command works:  
curl -X GET [https://api.purpleair.com/v1/sensors?fields=pm2.5\_60minute%2Clatitude%2Clongitude](https://api.purpleair.com/v1/sensors?fields=pm2.5_60minute%2Clatitude%2Clongitude) -H "X-API-Key:curl -X GET [https://api.purpleair.com/v1/sensors?fields=pm2.5\_60minute%2Clatitude%2Clongitude](https://api.purpleair.com/v1/sensors?fields=pm2.5_60minute%2Clatitude%2Clongitude) -H “X-API-Key: \*”

But if I and conditions, it doesn’t work:  
curl -X GET [https://api.purpleair.com/v1/sensors?fields=pm2.5\_60minute%2Clatitude%2Clongitude&nwlng=-120&nwlat=50&selng=-100&selat=20&start\_timestamp=“2020-09-11T15:30:00Z”&end\_timestamp=“2020-09-15T15:30:00Z”](https://api.purpleair.com/v1/sensors?fields=pm2.5_60minute%2Clatitude%2Clongitude&nwlng=-120&nwlat=50&selng=-100&selat=20&start_timestamp=%222020-09-11T15:30:00Z%22&end_timestamp=%222020-09-15T15:30:00Z%22) -H “X-API-Key: \*”

Another question, how can I check if the data during Sep 2020 exist with API without the Sensor ID info.

Thanks,  
Hongli

---

<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 13, 2022, 4:05pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/6 "2022-06-13T16:05:56Z")

</div>

At the moment, the start and end timestamps will only work with the [preview historical endpoint](https://community.purpleair.com/t/preview-of-api-that-includes-the-ability-to-get-sensor-history/853). To complete this task, you would need to use a bounding box to collect the sensor IDs of the sensors you want to query and then use the history endpoints to collect the data for each of those sensors.

---

<div class="post-metadata">

**Author:** ![Zuber\_Farooqui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/zuber_farooqui/32/610_2.png) [@Zuber\_Farooqui](https://community.purpleair.com/u/Zuber_Farooqui)\
**Post date:** [June 13, 2022, 4:11pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/7 "2022-06-13T16:11:58Z")

</div>

Ethan,

The bounding box to collect sensors is not working for me for below domain. Any advise?  
lat\_lon = [nwlng, nwlat, selng, selat]  
lat\_lon = [97.001, 35.001, 67.001, 7.001]

Thank you,  
Zuber

---

<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 13, 2022, 8:11pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/8 "2022-06-13T20:11:11Z")

</div>

Looking at your coordinates, you do not have a north-west (nw) corner and a south-east (se) corner; you have a north-east corner and a south-west corner. You should swap the arrangement to be the following:

lat\_lon = [nwlng, nwlat, selng, selat]  
lat\_lon = [67.001, 35.001, 97.001, 7.001]

---

<div class="post-metadata">

**Author:** ![Zuber\_Farooqui](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/zuber_farooqui/32/610_2.png) [@Zuber\_Farooqui](https://community.purpleair.com/u/Zuber_Farooqui)\
**Post date:** [June 13, 2022, 9:21pm UTC](https://community.purpleair.com/t/download-data-in-sep-2020/897/9 "2022-06-13T21:21:13Z")

</div>

Wow, what a blunder I was doing :o  
It worked. Thank you!
