Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Constantly getting ~24-hour Rate-Limited during development

Constantly getting ~24-hour Rate-Limited during development

Hey!

I got a development app setup and am using it's id/secret in my local environment.
During local development I am regularly rebuilding my DB which will produce the exact same API Calls - my default development data is static (albeit growing).

After roughly 10-15 rebuilds a day, I am getting a "Too many requests" error without a Retry-After header, which usually results in me having to wait a whole day until I can go on developing anything related to spotify's Web API.

Using another IP helps, but I'd love to not be forced to do any VPN stuff because my IP is rate limited during development.

Is there any way to not hit this limit? Why is there no documentation on this?

Reply
5 Replies

What exactly do you mean by "why is there no documentation on this"? Did you read the Rate Limiting documentation at https://developer.spotify.com/documentation/web-api/concepts/rate-limits ?

To avoid this you should setup a local caching proxy server (like squid, or roll your own) and avoid hitting Spotify servers needlessly.

 

It sounds like you need to use

Theres a hidden rate limit that lasts for over 30 seconds not mentioned in the documentation, which is what the poster was referring to. 

That lasts 24 hours?! I've never ever hit that in my (public) extension of 3+ years. But I'm doing my best to avoid hitting the documented limits so maybe it's a perk of that.

I'm talking about Server<>Server here. That's probably the difference.

I got 24 hours between checking for new releases in something like a cron job (bit too complicated to explain) so caching mechanisms don't make sense as I need the fresh data and can actually guarantee a maximum of one request per artist ID on GET /artist/<id> every 24 hours.

I can't think why server to server makes a difference but I'll trust you on that.

 

FYI, if you really are using that endpoint (which presumably you're not because that won't get you any info regarding latest releases), you can batch your requests using https://developer.spotify.com/documentation/web-api/reference/get-multiple-artists and make your quota go a lot further.

Suggested posts