API Pricing

Just wanted to say (as a web dev who also manages servers), good luck and I hope y’all can continue to keep the public web service afloat for folks. I know what it’s like having to maintain servers. FWIW: It’s not just about bandwidth at all, there’s so much more to it, including performance and security just to name a few.

I’m thankful these devices can still hum along and be queried locally via the /json route on the LAN-based HTTP endpoint. Worst case (if purpleair.com itself ever went under) is you’d have to setup something that polls this locally on your network and pushes it out to your own servers somewhere. Obviously not practical for most folks. Would be awesome if we could tweak the software on these devices ourselves to adjust what they ping and, importantly, their data retention (e.g. ability to retain full 10min and up to 1 week locally, even in ephemeral memory) and just push the latest stats to server that just hosts the latest numbers.

Anyway, the reason why I say all this: My use case right now is that since the widget is broken for iPad, which is where I primarily use it (the bug is also visible on new versions of Safari on desktop). I started to investigate this since I was curious about ways I could maybe build my own widget so I could still look at the main 10min and share with family if it gets smoky out.

It’s been a while since PurpleAir mentioned they were working on their ToS. I wonder if there’s any update.

One thing that I keep wondering about is ability to host PA data mirrors. It seems on the surface that the total size of all PA data might be quite manageable, with a few assumptions (rough estimates):

  • 100,000 : sensors
  • 24 * 30 : measurements per day (every 2 minutes)
  • 365 * 5 : 5 years of data
  • 50 : bytes per measurement (that’s quite generous IMO, assuming time series data and compression)

That gives me 100000*24*30*365*5*50 / (10^12) = 6.57 TB - completely manageable order of magnitude.

But from what I see the PA company tries to monetize the data more and more, so perhaps we’ll never see this allowed.

I think there are at least 2 separate things to consider. There’s storing the data and and 6.57 TB might seem manageable now but that will continue to grow. The other issue is providing a service to allow access to the data. That is not cheap as you have to maintain the equipment, OS patches, database/application software updates, etc. so a source of continuous income to pay for the service has to be in the business model otherwise it is not sustainable. Just look at what happened to many of the online services that provided free access, at some point they had to start charging or they shutdown.

I’ve been operating a PWS since 2000 and used to upload my data to a bunch of websites. Looking at some old config files it looks like I used to upload to hamweather.net but I think that may have stopped when they sold out to another company and I never got around to trying to figure out how to upload to them. A couple of others have long since shutdown.

Currently I am uploading to WUnderground and CWOP which forwards to MesoWest which is operated by U of Utah and NWS which of course is run by the Feds so paid by tax payers. Wunderground is now run by The Weather Company and they provide a free API key to providers. Access used to be free as long as you uploaded data but they’ve gone through a few iterations of their API and they now put a limit on the number of calls but looking at their website it looks like I’ve been averaging just under 1200 calls a day for my personal IoT devices (at least 6 or 7 I think).

I’m using a very old program to collect and upload my weather data but it is hard to maintain so I have been looking off and on for a replacement. Some of my IoT devices are driven by a computer at home where I could use the local connection to my PurpleAir device but another set of IoT devices are run in the cloud so I would need to use an API key but I figured I would quickly exhaust the initial free number calls I’ve been given before I got something working much less stable to decide if I’d want to keep paying for it.

If PurpleAir could provide a reasonable number of free API points every month then I would probably use their data in my personal IoT devices rather than relying solely on the Wunderground feed. At this point if the device was in need of repair or replacement it would not be high on the priority list as I have no real vested interest in using it other than the novelty of it.

QQ for you @Andrew_PurpleAir: Would it be possible to augment the system (under the hood) to instead either:

  1. Allow a particular account unlimited access to sensors they have proven they own. NOTE: “Unlimited” in the current context of a singular/canonical point system. This is why I’d also recommend instead…
  2. Allow a monthly (or some other time frame) quota system and instead allow for free “points” each month (or day, week, year, etc)?

The reason why I like those ideas more is because, while I don’t expect I’d ever exhaust my quota with a single sensor, I’d prefer to not have a clock that I could setup and completely forget about that is doomed to eventually reach zero some day. Also, I feel this rolling monthly (or whatever time period) quota might align better with server usage and maintenance costs, particularly as you could then charge on that recurring basis as well for those who go beyond the free tier.

This is pretty industry standard anyway, but I figured I’d throw that idea out there since folks might prefer that, maybe. :sweat_smile:

Edit: p.s. If you reply, please @ me since I otherwise won’t be notified (I know it’s a busy thread).


this is what i was thinking as well.
something where, i can earn points automatically each month as my sensor stays online. If i stop sending data i stop getting points, but as long as my sensor is sending data, i earn those points that i can use to download my data without worrying about hitting that limit at some unpredictable point in the future.


Yes, @patricknelson, the free points allotted to sensor owners are a temporary measure while we work on an automated system. More information about what that system will look like is forthcoming.

1 Like

Asking as a curious potential future owner of a PurpleAir sensor…When I first started reading about the API pricing, I was immediately deterred from considering PurpleAir as an option. I currently use AirThings for indoor (I didn’t know about PurpleAir when I bought it :grimacing:), but now I want something for outdoor.

However, my next google search was to see if Wifi connected PurpleAir sensors have a local API endpoint, and it seems like they do, but it doesn’t seem to be well documented, or maybe not totally complete? I see posts on other sites about some sort of /json local API endpoint?

If there is a local API endpoint, I feel like that’s the answer to a lot of these complaints, right?

I use a program called Home Assistant for my smart home. It’s free/open source and you can run it locally. It has local web/API access, which is great. But if you want remote access…then you need to pay for their service which gives you secure remote access OR you can try to set up your own remote access (VPN, tailscale, reverse proxy, etc).

So my question is…isn’t that similar with what PurpleAir is doing? As long as they provide a local API, then I don’t totally disagree with having to pay for their API service. If I really don’t want to use it, and I absolutely need remote access, I can figure out my own solution.

That said, if PurpleAir is benefiting from my data and not just providing a remote access API and I have the option to opt-in to sharing my data for them to use / sell, then yeah, I think it would be nice to get a kickback in the form of free API points to use against my own sensors (or just build the API to provide access to your own sensors for free, however hey want to implement it).

1 Like

i’m an app dev that uses purple air in my app, so i’m happy to pay, but wow is this a confusing as heck pricing scheme. why are you even making up your own currency called “points”? why can’t you just say each api call costs .001 cents or whatever. why obfuscate it and make it hard for everyone to comprehend? that just seems shady af

Yes, there is a local endpoint that can be used to retrieve the same data that is being passed to the PurpleAir cloud.

However, I should point out that you can retrieve data from your own sensor via the PurpleAir API. We’re working on an automated system for this. For now, you can simply send us an email at contact@purpleair.com, and we will grant free points on your account.

Points represent processing power and bandwidth required to serve the data. This system also makes it easier to offer bulk pricing, which is evident in the fact that larger purchases offer more points per dollar.

A couple of tools that should be helpful in better calculating the costs of a data request can be found in two places: the Develop portal and the Data Download Tool. I hope they will help to simplify things a bit:

  1. On the Develop portal, selecting “TopUp Account” will take you to a pricing calculator where you can check the number of points you’ll receive in real-time by inserting different purchase amounts.
  2. On the download tool, you can set up a data request on the “Download” tab, and it will display a points estimate at the bottom of the window. You can see an even more detailed version of this points breakdown by going to the “Settings” tab and checking the box next to the option “Show Detailed Points Cost.”

We opted for a billing system that reflects charges to our users in the same way that we are charged for serving the data. We felt that this was the most transparent way to do it.

Is there an API call you can make to see how many points you have? If this already exists, is it free to call this API request?

@drdasrandy Currently, there is not, but it is something being discussed. For now, you can check your points via the Develop portal.

If an API call to check this would be helpful in your use case, we’d like to hear about it. Feedback like that helps our API development team know what to prioritize.

is there no way to see what i would have historically been charged? that would give me a better idea of what to expect to pay.

i can answer this from my perspective. there doesn’t appear to be anyway to keep a card on file and just bill me monthly. instead i have to login and “TopUp” my account (that naming, wow) manually and guess(?) how many points i need or am willing to buy.

If i guess wrong or forget or go on vacation or you know life happens, then i might run out of points without knowing and apparently you still get billed if you keep calling the api and you are out of points. So yeah, some API i can call periodically to see how many points left and even my burn rate, so i know i need to login and “TopUp” my account soon is a good idea.

for what it’s worth, i have many api’s i subscribe to to support my apps and i have them all setup to bill the same account i receive money on. this way, my app would work theoretically forever even if i disappeared / died / got rich and f’d off to an island. that doesn’t seem possible here if it has to be periodically “top’dup’d”

and thanks for replying andrew. get this is frustrating and everyone is venting but we know you are just trying to do your job.

1 Like

Hey Andrew - I think it would be helpful to our customer base, most of which are government agencies. When these agencies lack funding to purchase their own monitors, some of them have relied on collecting what data they can from someone that has a PurpleAir running at their home, for example.

A quick way to check your balance would be great. Then people could automatically adjust their API request volume based on their available balance. Or they can get an automated email notifying them that their balance is low.

1 Like

Thank you for your feedback. This is extremely helpful for us.

Currently, you can view your historical usage from the Develop portal. If you navigate to the Projects tab and select the green button that looks like a small graph (called “View Project Usage”), you can see your recent usage and estimate your burn rate. I’ve shared an image of this below.

We have a new version of the Develop portal in the pipeline that will display burn rate. Additionally, auto-purchase is something being discussed. I’ll make sure to pass along your feedback that this is a critical feature for you.

Also, I know this is probably much less important to you, but you mentioned that the wording “TopUp Account” is a bit awkward. Would you find “Top Up,” “Top Up Account,” “Purchase Points,” or “Add Points” to be a bit less awkward? Anything else you can think of that would sound more fitting?

@drdasrandy I hope all this information is helpful for you as well.

Purchase Credits. keep it simple and obvious.

i’ve had an api key since the days you guys just randomly emailed them out if you asked nicely. so it wasn’t attached to any project or even email address for all i know. so no way to see that usage now that i’ve created an organization and a project.

i bought my first 15 M worth of tokens this morning after using your api for free for the past 2 years or so, so i guess that is a win for your revenue. currently evaluating my usage to decide if i will continue to offer this for my customers as it seems to be pretty expensive for the benefits tbh

the purchasing of tokens and then transferring them to a project is clunky. seems that that feature was built to limit usage by project if someone cared to do that, but for most people, that seems like another step that will confuse everyone

1 Like

I’ll pass along that feedback for the naming convention.

You can view usage on your key, which should solve your problem for viewing usage. You follow the same instructions as above, but you do so on the “Keys” tab rather than the “Projects” tab. Be aware that you’ll only see points usage dating back to the latter half of December 2022, as this was when we implemented the points system on the back end.

It sounds like you’re running an app, so I’m curious to know your thoughts. We’ve been discussing an idea internally that would help app developers. The idea is that data contributors (sensor owners) would be able to contribute the free points they earn with their sensors to another account (in this case, your account). This is because a number of PurpleAir users rely on third-party apps to view their data rather than the API.

I’ll also mention that requiring points to be drawn from the Project was meant to protect our users from runaway code blowing through all of their points. However, it’s proved to be more a point of confusion and annoyance than a helpful feature for most of our users, so a future version of the API will allow users to pull points directly from the Organization.

Protection for runaway code is a good idea. Years ago I worked on a multi-user game that allowed players to create smart objects that ran simple programs and yes it was possible for a program to run wild and consume lots of resources. The solution they came up was to give people credits and every line of code executed used some fraction of a credit and certain function might use more. I think a basic user was allocated some number of credits a day which was enough to do some simple programming but if you wanted to do more you could ask for an upgrade. Programs that proved to be useful (and efficient) could be cloned and assigned to another user or group which had it’s own “wallet”. I thought the system worked fine.

Fast forward to today and some of the servers that I use now limit the number of API calls within some period of time and if you exceed the limit you were allocated then your API key was either throttled and/or would no longer work until the next day. As a data contributor you are granted a number of API calls every month. These websites generally allow you to see your API call rate and/or totals and I periodically check to make sure I stay within my limits as a contributor. I believe most of these sites allow you to purchase additional credits.

Perhaps purple-air could do something similar and grant some number of points per day for each device that contributes? An API call to get your stats would be good so a program could adjust the frequency of the calls as needed. It would also be good to get a notification that your device has stopped contributing after some number of hours and when you exceed custom thresholds.

For example with the Flume water monitoring device, I can get notification of possible water leaks at my mom’s house or if she exceeds a daily water limit because she left the garden hose on all day. The weekly threshold was triggered a few months ago when she had company staying for a while and so there were 3x number of people in the house and they were doing laundry while they were there.

1 Like

@lucienve @mschuppenhauer @smart.dusk99876 @jcdoll @notpurple @altarona @Bugs @Evan_Wagstaff @Garth_Webb @K7FZO @n7qnm @Steve_WFD @patricknelson @Marcin @cafelizardo @Chad_Baldwin @Scott_Beam @drdasrandy

Hey all! We made a new post about our upcoming points-earning system for PurpleAir sensor owners. You can find it here: API Points for Sensor Owners