API Pricing

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

This is late, so I’m hoping you saw the email update earlier this year. As of April, there is a new endpoint (/organization) that returns metadata for your Organization, including remaining points. That way, you can check without having to log in on the Develop portal. It is a free API call, so query it as you need.