[GH-ISSUE #734] continuations are no longer returned (max 100 items) #477

Closed
opened 2026-02-27 23:01:00 +03:00 by kerem · 10 comments
Owner

Originally created by @yojimbo94 on GitHub (Jan 31, 2025).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/734

When requesting my liked songs, i get only 100 tracks, despite having limit set to higher than 100.
In the response, trackCount is correct (1063 in my case).


def get_yt_liked_songs(ytmusic: YTMusic):
    l = 500
    liked_songs = ytmusic.get_liked_songs(limit=l)
    assert l < liked_songs['trackCount']
    assert len(liked_songs['tracks'])  > l # exception

Originally created by @yojimbo94 on GitHub (Jan 31, 2025). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/734 When requesting my liked songs, i get only 100 tracks, despite having limit set to higher than 100. In the response, `trackCount` is correct (1063 in my case). ~~~~~~~~~~~~~python def get_yt_liked_songs(ytmusic: YTMusic): l = 500 liked_songs = ytmusic.get_liked_songs(limit=l) assert l < liked_songs['trackCount'] assert len(liked_songs['tracks']) > l # exception ~~~~~~~~~~~~~
kerem 2026-02-27 23:01:00 +03:00
Author
Owner

@initrunlevel0 commented on GitHub (Feb 1, 2025):

I confirmed the similar bug with playlist, seems API bug from YTM currently (01/02/2025 06:38 UTC). The problem is that I always got len(tracks) = 100 no matter what even when the playlist has more than 100 songs.

<!-- gh-comment-id:2628811490 --> @initrunlevel0 commented on GitHub (Feb 1, 2025): I confirmed the similar bug with playlist, seems API bug from YTM currently (01/02/2025 06:38 UTC). The problem is that I always got len(tracks) = 100 no matter what even when the playlist has more than 100 songs.
Author
Owner

@sigma67 commented on GitHub (Feb 1, 2025):

Which type of authentication are you using? There is a test for exactly this case and it succeeded yesterday, so it's quite unlikely this is an issue with the lib

<!-- gh-comment-id:2628832896 --> @sigma67 commented on GitHub (Feb 1, 2025): Which type of authentication are you using? There is a test for exactly this case and it succeeded yesterday, so it's quite unlikely this is an issue with the lib
Author
Owner

@initrunlevel0 commented on GitHub (Feb 1, 2025):

I dont uses any particular authentication, trying to get a list from a Public Playlist

from ytmusicapi import YTMusic
klien = YTMusic()
a = klien.get_playlist("PLQym-sGkzU7PtsnhB392EClgAb2TE-Cx7")
a["trackCount"] # 118
len(a["tracks"]) # 100

tried using limit=50, 100, 200. nothing works, tracks always output 100 items.

EDIT: I also tried using oauth, no effects

<!-- gh-comment-id:2628877803 --> @initrunlevel0 commented on GitHub (Feb 1, 2025): I dont uses any particular authentication, trying to get a list from a Public Playlist ``` from ytmusicapi import YTMusic klien = YTMusic() a = klien.get_playlist("PLQym-sGkzU7PtsnhB392EClgAb2TE-Cx7") a["trackCount"] # 118 len(a["tracks"]) # 100 ``` tried using limit=50, 100, 200. nothing works, tracks always output 100 items. EDIT: I also tried using oauth, no effects
Author
Owner

@juampiq6 commented on GitHub (Feb 1, 2025):

same issue happening with the limit for search function (always 20, even if i put 1)

<!-- gh-comment-id:2628893683 --> @juampiq6 commented on GitHub (Feb 1, 2025): same issue happening with the limit for search function (always 20, even if i put 1)
Author
Owner

@yojimbo94 commented on GitHub (Feb 1, 2025):

Which type of authentication are you using? There is a test for exactly this case and it succeeded yesterday, so it's quite unlikely this is an issue with the lib

I was still using the browser auth workaround from when the auth was broken.
I set up new oauth credentials, following the documentation : https://ytmusicapi.readthedocs.io/en/stable/setup/oauth.html

Authentication worked perfectly, but i still have only 100 tracks coming out of the get_liked_songs() query

<!-- gh-comment-id:2628910457 --> @yojimbo94 commented on GitHub (Feb 1, 2025): > Which type of authentication are you using? There is a test for exactly this case and it succeeded yesterday, so it's quite unlikely this is an issue with the lib I was still using the browser auth workaround from when the auth was broken. I set up new oauth credentials, following the documentation : https://ytmusicapi.readthedocs.io/en/stable/setup/oauth.html Authentication worked perfectly, but i still have only 100 tracks coming out of the `get_liked_songs()` query
Author
Owner

@sigma67 commented on GitHub (Feb 1, 2025):

There has been a server-side update that changes how continuations work. Previously the token was returned under sectionList, now it is the last item in the returned list (i.e. item 101 if there are more than 100 results).

Working on a fix

<!-- gh-comment-id:2629016184 --> @sigma67 commented on GitHub (Feb 1, 2025): There has been a server-side update that changes how continuations work. Previously the token was returned under `sectionList`, now it is the last item in the returned list (i.e. item 101 if there are more than 100 results). Working on a fix
Author
Owner

@sigma67 commented on GitHub (Feb 1, 2025):

The linked fix seems to work for me. For albums I'm seeing some strange behavior though

for https://music.youtube.com/playlist?list=OLAK5uy_noLNRtYnrcRVVO9rOyGMx64XyjVSCz1YU I am getting 200 items returned on the Web. With the test I'm getting 500 (more than the advertised 456), with some items repeating (??)

@juampiq6 The issue with the search function does not exist, please read the docs: https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter

<!-- gh-comment-id:2629044922 --> @sigma67 commented on GitHub (Feb 1, 2025): The linked fix seems to work for me. For albums I'm seeing some strange behavior though for https://music.youtube.com/playlist?list=OLAK5uy_noLNRtYnrcRVVO9rOyGMx64XyjVSCz1YU I am getting 200 items returned on the Web. With the test I'm getting 500 (more than the advertised 456), with some items repeating (??) @juampiq6 The issue with the search function does not exist, please read the docs: https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter
Author
Owner

@initrunlevel0 commented on GitHub (Feb 2, 2025):

The linked fix seems to work for me. For albums I'm seeing some strange behavior though

for https://music.youtube.com/playlist?list=OLAK5uy_noLNRtYnrcRVVO9rOyGMx64XyjVSCz1YU I am getting 200 items returned on the Web. With the test I'm getting 500 (more than the advertised 456), with some items repeating (??)

@juampiq6 The issue with the search function does not exist, please read the docs: https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter

With my 118 songs playlist (PLQym-sGkzU7PtsnhB392EClgAb2TE-Cx7)
It just repeated first 100 songs, twices. (len = 200). The remaining 18 songs does not included inside ["tracks"]

<!-- gh-comment-id:2629170438 --> @initrunlevel0 commented on GitHub (Feb 2, 2025): > The linked fix seems to work for me. For albums I'm seeing some strange behavior though > > for https://music.youtube.com/playlist?list=OLAK5uy_noLNRtYnrcRVVO9rOyGMx64XyjVSCz1YU I am getting 200 items returned on the Web. With the test I'm getting 500 (more than the advertised 456), with some items repeating (??) > > [@juampiq6](https://github.com/juampiq6) The issue with the search function does not exist, please read the docs: https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter With my 118 songs playlist (PLQym-sGkzU7PtsnhB392EClgAb2TE-Cx7) It just repeated first 100 songs, twices. (len = 200). The remaining 18 songs does not included inside ["tracks"]
Author
Owner

@walhalla247 commented on GitHub (Feb 2, 2025):

for me too, the first 100 songs will only be duplicated in returned tracks 100...200, 200...300, and so on

<!-- gh-comment-id:2629310582 --> @walhalla247 commented on GitHub (Feb 2, 2025): for me too, the first 100 songs will only be duplicated in returned tracks 100...200, 200...300, and so on
Author
Owner

@sigma67 commented on GitHub (Feb 2, 2025):

Sorry about that, was a long day yesterday. Was a fairly obvious issue in hindsight. Will merge & release a patch

<!-- gh-comment-id:2629435929 --> @sigma67 commented on GitHub (Feb 2, 2025): Sorry about that, was a long day yesterday. Was a fairly obvious issue in hindsight. Will merge & release a patch
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/ytmusicapi#477
No description provided.