1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Spotify API get tracks information from playlist with over 100 tracks using Python

Discussão em 'Python' iniciado por Stack, Setembro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I use plain Python to access the Spotify API. What I want, is to get specific information (song name, artist, album etc.) from the playlists of my account. I have managed to do that, but for playlists with less than 100 songs. Spotify API has a limit of 100 songs to its get requests.

    Searching for possible solutions, I found that making a get request at the BASE_URL/playlists/playlist_id/tracks URL, I can use an offset parameter, so that the get request will respond with songs from the offset and on. For example, if I use offset = 100, that will result in a URL BASE_URL/playlists/playlist_id/tracks?offset=100 which should bring 100 songs starting from the 100th. This is also what the documentation of the API says. Doing that itetaratively, I can get all songs.

    Although, doing that request, I get a response with the same first 100 songs. It is like that the offset parameter is ignored.

    Any ideas?

    Continue reading...

Compartilhe esta Página