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

too many requests .... but made only 5 in a day..

too many requests .... but made only 5 in a day..

Hi

 Just getting started with the API, i spent yesterday having great progress, everything worked smoothly. I probably called the API lets say <100 times over the space of 8 hours. Went to bed, woke up, ran my script and immediately had "rate limited". I have tried this in python, node and curl and always the same. 

 

curl -i  "https://api.spotify.com/v1/artists/4Z8W4fKeB5YxbusRsdQVPb" \

     -H "Authorization: Bearer XXX "

HTTP/2 429

cache-control: private, max-age=0

retry-after: 16853

access-control-allow-origin: *

access-control-allow-headers: Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token

access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE, PATCH

access-control-allow-credentials: true

access-control-max-age: 604800

content-length: 17

strict-transport-security: max-age=31536000

x-content-type-options: nosniff

date: Tue, 24 Sep 2024 10:34:02 GMT

server: envoy

via: HTTP/2 edgeproxy, 1.1 google

alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

 

Too many requests

 

So i understand rate limits etc. But i dont understand how this is the case 12hours later after my last API call (which went fine with no issues), after a day where I only did max 100 calls in that day... I immediately get 429. I don't want to raise a quota raise request as (1) I can't as i dont meet the criteria and (2) I really dont think thats the issue, I should be well within the limits at such a low rate.

 

I made a new app to get a new client/secret but that had the same effect.

 

Anyone seen this before? Anyone have any guidance?

 

Much appreciated!

/lee              

 

 

 

 

Plan

Free/Premium

Country

 

Device

(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)

Operating System

(iOS 10, Android Oreo, Windows 10,etc.)

 

My Question or Issue

 

Reply
2 Replies

Hi Lee,

 

I see you are using the /artists endpoint, but only requesting the data from only one artist.

With the Get Several Artists endpoint, you can request the data from up to 50 artists at once. This will reduce the amount of requests significantly, and you will trigger the rate limit less often this way.

 

Let me know if this helps, and if you have other questions.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

hi thanks - aha yeah that was just an example, i mostly use /tracks - and the way it works is a text box where you type in a search term, that goes to search, finds a track and gets the track from the track end point and plays it... Even so i then listen to the track (3+ minutes) before getting another one... So can't understand how thats hitting a rate limit?

 

Suggested posts