Closed alissapajer closed 4 years ago
Also, I wanted to add that the 7 rate limit errors are spread throughout the results, meaning that there are successful requests immediately after rate limited ones.
FWIW I'm not getting rate limited when doing
./script.sh & ./script.sh & ./script.sh & ./script.sh & ./script.sh
but when I repeat 10 instead of 5 times (i.e. with 100 reqs) I do get rate limited.
So is the actual limit per second rather than per minute?
Fixed. The rate limits are now being enforced exactly as described on the website:
Thanks for the quick fix @dkrylovsb !
According to the documentation, I should be able to make 240 requests per minute with an API key. But, I hit a rate limit after just a few requests.
How to reproduce:
Save that as
script.sh
and then runThis makes a total of 50 requests in a few seconds. In the output file
d.txt
I see the following message 7 times:Additionally, there are 43 successful request responses. I would expect 50 successful responses.
I am not able to reproduce this if I run 50 sequential requests, like so
So, it appears that too many requests within a small time window are causing the rate limit error.
For the bigger picture context, my application is querying this endpoint repeatedly, incrementing the
skip
variable by100
until thetotal
is reached. In the case of this query, thetotal
is13032
, so it would take 131 requests. I am seeing a rate limit in my application, and I was able to construct the above reproduction usingcurl
.