<?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: playlist rate limiting in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6152567#M14256</link>
    <description>&lt;P&gt;it's still hanging... but am I right to assume just the one call shouldn't cause a rate limiting issue? there are about 900 playlists.&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jun 2024 21:52:42 GMT</pubDate>
    <dc:creator>nightrainlily</dc:creator>
    <dc:date>2024-06-23T21:52:42Z</dc:date>
    <item>
      <title>playlist rate limiting</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6148984#M14242</link>
      <description>&lt;P&gt;my app calls the API to get playlists (&amp;lt;1000) and then calls it again to get the tracks and some track features from those playlists, which ends up being around 10000 tracks. is there a better way to do this to avoid rate limiting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;playlist_data = []

for result in results:
    for playlist in result['items']:
        time.sleep(1)
        playlist_data.append({
            'name' : playlist['name'],
            'track_ids' : sp.playlist_tracks(playlist['id'], fields='items(track(id))'),
            'track_names' : sp.playlist_tracks(playlist['id'], fields='items(track(name))'),
            'id' : playlist['id'],
            # 'image' : playlist['images'][0].get('url')
        })

playlists = pd.DataFrame(playlist_data)
# playlists.head().style.format({'image': lambda x : f'&lt;IMG src="{x}" border="0" width="100px" /&gt;'})
playlists.head()&lt;/PRE&gt;&lt;P&gt;later I also need to call audio_features for each track, which I'm worried will also cause a rate limiting error. is there a better way to do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 20:15:49 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6148984#M14242</guid>
      <dc:creator>nightrainlily</dc:creator>
      <dc:date>2024-06-21T20:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: playlist rate limiting</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6149905#M14246</link>
      <description>&lt;P&gt;I recommend cutting your request in half by using &lt;EM&gt;sp.playlist_tracks(playlist['id'], fields='items(track(id,name))')&lt;/EM&gt; instead of requesting them separately.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2024 10:39:26 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6149905#M14246</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2024-06-22T10:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: playlist rate limiting</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6152567#M14256</link>
      <description>&lt;P&gt;it's still hanging... but am I right to assume just the one call shouldn't cause a rate limiting issue? there are about 900 playlists.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2024 21:52:42 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/playlist-rate-limiting/m-p/6152567#M14256</guid>
      <dc:creator>nightrainlily</dc:creator>
      <dc:date>2024-06-23T21:52:42Z</dc:date>
    </item>
  </channel>
</rss>

