exportify: Overcoming "API rate limit exceeded"
Trying to export all my 315 playlists I quickly run into the message:
{
"error": {
"status": 429,
"message": "API rate limit exceeded"
}
}
Reading up on the limits I see:
Rate limiting is applied on an application basis (based on client id), regardless of how many users are using it.
https://developer.spotify.com/web-api/user-guide/#rate-limiting
So I guess one easy way of overcoming the limit would be to fork (and host it at some other address I guess) and register it as my own application with spotify.
Do you think that is all there is to it? Looking at the code I see that exportify is doing it in batches of 20 lists at a time (I think). Would some waiting between each request help?
Another thing would probably be to implement some “wait and retry”-scheme for when these responses are recieved.
This is just a few loose ideas. I am adding the issue here to start the discussion since I saw some other user having the same problem somewhere. Exportify seems really great otherwise! Nice that you have taken the time to code this up.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 3
- Comments: 34 (8 by maintainers)
Commits related to this issue
- Add support for custom app client_id [#6] — committed to watsonbox/exportify by watsonbox 9 years ago
- Add API rate limiting error message [#6/#7] — committed to watsonbox/exportify by watsonbox 9 years ago
- Fix bug breaking use of app_client_id parameter [#6] — committed to watsonbox/exportify by watsonbox 9 years ago
Yes I think you’re right that the easiest way to resolve this for now would be to use your own app
client_id. To help with this, I’ve made a change which allows you to use your ownclient_idin the URL, so you won’t need to fork and modify the code.To set up the app you need to:
https://rawgit.com/watsonbox/exportify/master/exportify.html.Then you can use the
client_idfrom that app as follows:Update 30/11/20
Please replace
https://rawgit.com/watsonbox/exportify/master/exportify.htmlwithhttps://watsonbox.github.io/exportify/in the above instructions since the app is now hosted on Github Pages.Dirty workaround adding a 500ms delay between API requests : https://gist.github.com/Alex131089/01611e017d874af51cb52ceefecc2d5d Using a dirty sleep function found on internet & may hang the browser (but still working & fetching actually), as I don’t know how to do this properly in JS / JQuery (async/event function call makes it a bit hard to introduce delay when you’re not used to). Managed to get my 192 playlists with that.
I’m still getting
INVALID_CLIENT: Invalid redirect URII moved to https://github.com/Alex131089/spotify-backup personally (forked from https://github.com/marpala/spotify-backup with more data retreived).