API Ratelimit?

Hi there,
I am playing around with the API a bit and slowly get a hang of it. One thing that happened to me today was this:

API request failed with code 422: {“errors”:{“base”:[“Ratelimit reached! Too many datapoints on 2021-04-06”]}}

I totally understand there being a rate limit but it seems to me that I am unable to find it documented anywhere. I am implementing a “Do more of” task with the API and my first approach was to add a datapoint for each instance of “doing it”. But since it recurs quite a lot each day, this will not work because of the ratelimit.

Could you maybe give us a hint about the limit? Is it 10 datapoints per day? 100? 1000? And is is per goal or per user?

Also, do updates to datapoints count? Otherwise I’d create one DP per day and update it whenever needed.

If updates actually do count, how do you advise us to implement a goal, that needs to get updated many times a day? Do we need to cache the updates and then send them at the end of the day in one batch?

Thanks for the explanation and any tips you can give!

Plotin

1 Like

I think the current limit is 150 datapoints/day/goal. (https://forum.beeminder.com/t/is-there-a-limit-on-daily-api-use-for-a-goal/4737)

Lots of times, if you’re running into that limit, you can edit the day’s datapoints rather than make hundreds of individual points, but maybe there are times that can be tricky or just not make sense. What are you working on?

1 Like

Hi @adamwolf, thanks for the hint!

I have a lot (a LOT) of photos that need sorting. I have created a webapp for doing so, so I can do it from my PC, a mobile, a tablet, basically anywhere I can access a webpage.
Since with webpages it is a little bit tricky knowing when the user stopped interaction (leaves pages, browser crashes, etc.), my first approach was to add a datapoint whenever one image gets sorted, so I don’t need to know when “the right time” was. The backend application uses python to to add the point whenever one operation is completed.

I already changed it so that it does not create a new datapoint for every image, creates only one datapoint per day and then updates its value whenever a picture is sorted. Hopefully, the update API call does not fall into the limit?

Otherwise I’d need to remember the amount of actions in the backend and then “batch-commit” them once per day or so. But then I’d need to know when to commit them so they still count. I read somewhere that the deadline is not midnight my timezone but some strange thing in between, like 6pm or something…or maybe even depending on the TZ of the servers.

Any idea how to build this better for beeminder?

Cheers
Plotin

2 Likes