<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting rate-limited with Spotify Web API despite using hydration manager + caching in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034960#M18364</link>
    <description>&lt;P&gt;You're welcome! I'm here to help if you need anything &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.spotify.com/t5/user/viewprofilepage/user-id/2908129"&gt;@callmejeffrey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jul 2025 22:35:44 GMT</pubDate>
    <dc:creator>ribezaz</dc:creator>
    <dc:date>2025-07-02T22:35:44Z</dc:date>
    <item>
      <title>Getting rate-limited with Spotify Web API despite using hydration manager + caching</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034479#M18359</link>
      <description>&lt;DIV&gt;Hey all — I’m building a native iOS app that connects to the Spotify Web API to display audiobook metadata for books users already have saved in their library. We’ve implemented a hydration manager to avoid redundant API calls, but we’re still encountering rate limiting on /me/audiobooks and /audiobooks/{id} after relatively light usage (~5–10 calls per session).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Our setup includes:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;• Refresh token flow for user auth&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;• Local caching of audiobook metadata by ID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;• Sequential (not parallel) hydration requests&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;• A fallback flow that disables Spotify if rate limits are hit&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Still, we’re getting hit with 429 Too Many Requests responses even after hours of no activity. We’d love to understand:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. Are there published or known rate limit quotas for audiobooks endpoints?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. Are certain endpoints or usage patterns more sensitive than others?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3. Is there a recommended strategy for batching, throttling, or prioritizing metadata fetches?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any tips from the community or Spotify folks would be greatly appreciated — even anecdotal patterns or rate-safe workflows.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Jul 2025 16:51:32 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034479#M18359</guid>
      <dc:creator>callmejeffrey</dc:creator>
      <dc:date>2025-07-02T16:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rate-limited with Spotify Web API despite using hydration manager + caching</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034587#M18361</link>
      <description>&lt;P&gt;Welcome to the Spotify Community, it's great to have you here! &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sharing your question in such detail — it's great to see such a well-structured use of the Web API, especially in a project focused on audiobooks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding your report, I took a look at the Spotify Web API documentation again to suggest some ideas:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Rate Limit Quotas — audiobooks endpoints&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Spotify does not currently publish specific quotas per endpoint in the public documentation. However, based on community experience, endpoints related to the user's library (/me/*) and those involving protected media, such as audiobooks, tend to be more sensitive and respond with 429 Too Many Requests at relatively low rates (even 5-10 calls can be enough in short intervals).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. Sensitive patterns or observed behaviors&lt;/STRONG&gt;&lt;BR /&gt;Endpoints such as /me/audiobooks and /audiobooks/{id} seem to use combined limits per user/token and IP.&lt;/P&gt;
&lt;P&gt;Even spaced calls can generate 429s if the API identifies “pattern scraping” or “excessive hydration” behavior.&lt;/P&gt;
&lt;P&gt;After a 429, it is highly recommended to respect the Retry-After header and wait before trying again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. Recommended strategies&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here are some suggestions to minimize the risk of hitting rate limits:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Implement debounce + priority by actual need: only hydrate audiobooks that are visible to the user or whose metadata is incomplete in the cache.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Store last query timestamps by ID — and avoid requerying before a minimum time (e.g. 1h).&lt;/P&gt;
&lt;P&gt;Progressive batching: instead of fetching all the user’s books at once, preload them partially and defer the rest until active interaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fallback with optimistic caching: if the data is not available at the moment, render a “placeholder” version with minimal information until the call is possible again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Extra tip&lt;/STRONG&gt;&lt;BR /&gt;You can monitor and log the X-RateLimit-* headers (if they are present in the HTTP response), although not all endpoints provide them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want, I can help you review your hydration manager logic or build an adaptive backoff scheme with examples in Swift/Objective-C (I don't know which one you are using haha).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep me updated,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;ribezaz &lt;span class="lia-unicode-emoji" title=":green_heart:"&gt;💚&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 18:14:51 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034587#M18361</guid>
      <dc:creator>ribezaz</dc:creator>
      <dc:date>2025-07-02T18:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rate-limited with Spotify Web API despite using hydration manager + caching</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034677#M18362</link>
      <description>&lt;P&gt;Thanks so much for all of this info. I'll begin implementing these suggestions and will follow up if we're still running into issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;—Jeffrey&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 19:14:08 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034677#M18362</guid>
      <dc:creator>callmejeffrey</dc:creator>
      <dc:date>2025-07-02T19:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rate-limited with Spotify Web API despite using hydration manager + caching</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034960#M18364</link>
      <description>&lt;P&gt;You're welcome! I'm here to help if you need anything &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.spotify.com/t5/user/viewprofilepage/user-id/2908129"&gt;@callmejeffrey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 22:35:44 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Getting-rate-limited-with-Spotify-Web-API-despite-using/m-p/7034960#M18364</guid>
      <dc:creator>ribezaz</dc:creator>
      <dc:date>2025-07-02T22:35:44Z</dc:date>
    </item>
  </channel>
</rss>

