The historical endpoints in the PurpleAir API have recently become restricted due to extremely heavy use. To use the historical API, you will need to be granted access.
To gain access, contact us at contact@purpleair.com with your API keys and a description of your API usage. This includes the frequency at which you will request data.
The Real-time API may solve your problem
If you are creating a sensor database, we prefer you use the real-time API to query a group of sensors every minute or so. This is more cost-effective and less server-intensive for PurpleAir.
An additional benefit of this approach is that you’re able to create a group of sensors and download data for all sensors in the group. This feature is not yet available with the History API; you will need to download the data one sensor at a time.
More information can be found in our API use guidelines.