First: is it needed/require/sudgested to sleep between API queries within a program loop ?
Second: is there a way to check how many queries of my daily budget I spent ?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by LucaZeta
on November 25, 2018 at 2:17 AM
Answering by myself:
First: 40 requests within 10 seconds are allowed. Since time to answer a request is averange grater than 0.5s no sleep is required. Source.
Second: hear it is
Reply by Travis Bell
on November 25, 2018 at 11:28 AM
For your first question, you got it. I also recently wrote some mock code to demonstrate an example loop that sleeps when it reaches the bucket limit. You can check it out here.
With regards to your second question, yes, the API stats page is a good insight into what's happening but there isn't really a "daily budget" so to speak. We really only enforce things 10 seconds at a time. As per the links above, you can inspect the bucket you are currently in by looking at the
X-RateLimit-Remaining
header.