The PurpleAir API uses a points-based billing system. API calls consume points, and if you do not have enough points to make an API call, the API will return an error.
If you are a PurpleAir sensor owner, you can get data from your own sensor for free. See this article for more information: API Points for Sensor Owners
The points pricing table can be found below. The more points you purchase the more value you will get per dollar. The left column shows the price ranges and the right column shows the number of points you’ll receive per dollar.
Purchase Amount | Points Per USD |
---|---|
$10 - $49 | 100,000 per USD |
$50 - $249 | 150,000 per USD |
$250 - $499 | 200,000 per USD |
$500 - $999 | 300,000 per USD |
$1,000 - $4,999 | 500,000 per USD |
$5,000+ | 1,000,000 per USD |
If you spend $52, you will get 7.8 million points. This is because each dollar is worth 150,000 points at that price.
$52 x 150,000 = 7,800,000 points
The points you purchase will be applied to your “Organization.” More information is found here.
These values are subject to change. Please refer to develop.purpleair.com for the most current ranges. Feedback is welcome.
One Million Starting Points
New users start with one million points. The following two sections show examples of how much data one million points can download.
How Points Cost is Calculated
The point cost of a request is calculated with the following equation:
total_cost = endpoint_base_cost + (cost_of_all_fields * number_of_data_rows)
The base cost for each endpoint and the cost of each field can be found on the Developer Dashboard by navigating to “Billing” and selecting the “Pricing” tab.
Base Cost
Each API request has a base cost. This base cost depends on the endpoint being used, but is not more than five points.
Field Cost
Each field also has an associated point cost which is applied for each data point of that field returned in the response.
Each requested field’s cost is summed together in order to obtain a total field cost for your request. For example, requesting temperature
, pm1.0_atm
, and humidity_a
results in a total field cost per data row of 5 points.
temperature
has a cost of 2pm1.0_atm
has a cost of 2humidity_a
has a cost of 1
Some examples are included below using just the temperature
field, which has a field cost of 2.
- Requesting temperature from the Get Sensor Data endpoint will deduct 3 points. 1 for the base cost, and 2 for the field cost of the returned temperature data point.
- 1 + (2 * 1) = 3
- Requesting temperature from the Get Sensors Data endpoint will deduct 2 points for each temperature data point returned. If data for 100 sensors is returned, each reporting temperature, 205 points would be deducted. 5 for the base cost, and 200 for the total field cost.
- 5 + (2 * 100) = 205
- Requesting temperature from the Get Sensor History endpoint and receiving back 100 rows of temperature data will deduct 202 points. 2 point for the base cost, and 200 points for the total field cost.
- 2 + (2 * 100) = 202
- Requesting temperature from the Get Sensor History endpoint, but receiving no data rows in return will deduct 2 points. This is only the base cost, since no data was reported by the sensor during the requested time period.
- 2 + (2 * 0) = 2
A Detailed Real-Time Data Example
This example will get the real-time “pm2.5” field every 10 minutes for a single sensor.
Using the “get_sensor” endpoint costs 1 point. The “pm2.5” field costs 2 points each time it is collected.
Getting the data every 10 minutes will result in 144 requests being made a day (1440 minutes in a day / 10 minute average).
To calculate the number of points spent daily, we need to add the cost of the endpoint to the cost of the fields. That number will then be multiplied by the number of sensors and the number of requests made daily. The final equation would look as follows:
(get_sensor + pm2.5) x 1 sensor x 144 daily requests = number of points spent daily
(1 + 2) x 1 x 144 = 432 points spent daily
To see how quickly this request will use the one million starting points, we divide one million by the number of points spent daily.
1,000,000 / 432 gives you 2,314 days of data, which is the same as 6.3 years of data.
A Detailed Historical Data Example
This example will get the historical data for ten sensors from January 1, 2022, to January 1, 2023. The fields collected will be “pm2.5_atm_a”, “pm2.5_atm_b”, “pm2.5_cf_1_a”, “pm2.5_cf_1_b”, and “temperature.” The example will also collect 60-minute (1-hour) averages.
The “get_sensor_history” endpoint costs 2 points to use. The total cost of the fields is 6 points per row (the “temperature” field costs 2 points because it is an average of two channels, while all of the other fields cost 1 point).
The PurpleAir Data Download Tool can create a cost estimate for historical requests. If you want to know the cost of a specific request, we recommend using this tool.
Detailed pricing can be enabled in the PurpleAir Data Download Tool by checking the checkbox next to “Show Detailed Points Cost” on the “Settings” page.
Using this tool, we can see that this request will make 270 API calls per sensor. The total cost of the requests per sensor will be 540 points (270 API calls * 2 points per request).
The PurpleAir Data Download Tool also shows us that each sensor will return 8,760 rows of data. This means the cost for all the rows per sensor is 52,560 points (8,760 rows * 6 points per row).
Now that we have both totals, we multiply them by the number of sensors. The total cost for all requests is 5,400 points (540 points * 10 sensors), and the total cost for all rows is 525,600 points (52,560 points * 10 sensors). Adding these two numbers together brings us to the total cost for our request: 531,000 points.
Collecting these five fields with a 60-minute average for a full year of data will spend just over half of the free one million starting points. Changing the time period to two years or lowering the average to 30-minute would bring the total to 1,061,800, just above the starting one million points.
Learn More
You can learn how to optimize your API usage.
Learn more about purchasing points and how to navigate the Online Dashboard.