[GH-ISSUE #203] Track limit in user_playlists? #103

Closed
opened 2026-02-27 23:20:51 +03:00 by kerem · 4 comments
Owner

Originally created by @DylanMeeus on GitHub (Jul 19, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/203

Hello,

It seems like I only get 100 tracks from playlists of a user when using the following line:
self.spotify.user_playlist(self.username, playlist['id'],fields="tracks,next")

The API does not mention setting a limit. Is that something that could limit that request?

(if you want to see the full code, it is here: full code)

EDIT:

It seems like there is a method user_playlist_tracks which should do what I want to. I was following an example from the 'readthedocs' page though. Which misguided me a bit.

Nontheless, it is interesting that it is capped at 100 and that you can not change that. Maybe worth looking into anyway.

Originally created by @DylanMeeus on GitHub (Jul 19, 2017). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/203 Hello, It seems like I only get 100 tracks from playlists of a user when using the following line: `self.spotify.user_playlist(self.username, playlist['id'],fields="tracks,next")` The API does not mention setting a limit. Is that something that could limit that request? (if you want to see the full code, it is here: [full code](https://github.com/DylanMeeus/Spotify_Playlist_Analyser)) EDIT: It seems like there is a method `user_playlist_tracks` which should do what I want to. I was following an example from the 'readthedocs' page though. Which misguided me a bit. Nontheless, it is interesting that it is capped at 100 and that you can not change that. Maybe worth looking into anyway.
kerem 2026-02-27 23:20:51 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@wesleybratt commented on GitHub (Sep 11, 2017):

I know inserting into playlists is capped at 100, I'll try and verify this.

<!-- gh-comment-id:328410479 --> @wesleybratt commented on GitHub (Sep 11, 2017): I know inserting into playlists is capped at 100, I'll try and verify this.
Author
Owner

@wesleybratt commented on GitHub (Sep 11, 2017):

Your totally right, only brings back 100.

<!-- gh-comment-id:328410871 --> @wesleybratt commented on GitHub (Sep 11, 2017): Your totally right, only brings back 100.
Author
Owner

@gwynnebaer commented on GitHub (Sep 18, 2017):

Spotify itself sets the 100 track limit for input/output. It's not easy to find this information, but it's listed here: https://developer.spotify.com/web-api/get-playlists-tracks/ (look for the "limit" field).

To get a full listing of tracks in a playlist, one must loop through the list using the "next" set of tracks. The file in the distribution named "user_playlists_contents.py" has an example of how to do this.

<!-- gh-comment-id:330113767 --> @gwynnebaer commented on GitHub (Sep 18, 2017): Spotify itself sets the 100 track limit for input/output. It's not easy to find this information, but it's listed here: https://developer.spotify.com/web-api/get-playlists-tracks/ (look for the "limit" field). To get a full listing of tracks in a playlist, one must loop through the list using the "next" set of tracks. The file in the distribution named "[user_playlists_contents.py](https://github.com/plamere/spotipy/blob/master/examples/user_playlists_contents.py)" has an example of how to do this.
Author
Owner

@stephanebruckert commented on GitHub (Jan 1, 2020):

Thanks @gwynnebaer

<!-- gh-comment-id:570082254 --> @stephanebruckert commented on GitHub (Jan 1, 2020): Thanks @gwynnebaer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#103
No description provided.