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

Most upvoted comments

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 own client_id in the URL, so you won’t need to fork and modify the code.

To set up the app you need to:

  1. Visit https://developer.spotify.com/my-applications/.
  2. Click ‘Create an App’ and enter some details (anything will do).
  3. Add this URL to ‘Redirect URIs’: https://rawgit.com/watsonbox/exportify/master/exportify.html.

Then you can use the client_id from that app as follows:

https://rawgit.com/watsonbox/exportify/master/exportify.html?app_client_id=[your client_id]

Update 30/11/20

Please replace https://rawgit.com/watsonbox/exportify/master/exportify.html with https://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.

@jshebetich You’re right, I introduced a change which broke this. Fixed now plus a test to verify behavior. 7db76bf -@watsonbox

I’m still getting INVALID_CLIENT: Invalid redirect URI

I moved to https://github.com/Alex131089/spotify-backup personally (forked from https://github.com/marpala/spotify-backup with more data retreived).