[GH-ISSUE #534] The songs search not limit the results #384

Closed
opened 2026-02-27 23:00:30 +03:00 by kerem · 1 comment
Owner

Originally created by @DavidGarzonV on GitHub (Jan 30, 2024).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/534

Describe the bug

When i search songs with a filter query like the code below, and sending the limit, i'm getting always 20 results, instead of 10:

search_song_results = ytmusic.search(
    query=f"{title} {artist}",
    filter="songs",
    scope=None,
    limit=10,
    ignore_spelling=False
)

To Reproduce
Steps to reproduce the behavior:

  1. Create the YTMusic object
  2. Call the method search, sendig all the params
  3. Print the len of the resulting list: print(len(results))
  4. See error when the len is 20 instead the limit value

Additional context

  • In other scenary, if i put the limit on 30, i get 40 results in the list.
Originally created by @DavidGarzonV on GitHub (Jan 30, 2024). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/534 **Describe the bug** When i search songs with a filter query like the code below, and sending the limit, i'm getting always 20 results, instead of 10: ```python search_song_results = ytmusic.search( query=f"{title} {artist}", filter="songs", scope=None, limit=10, ignore_spelling=False ) ``` **To Reproduce** Steps to reproduce the behavior: 1. Create the YTMusic object 2. Call the method search, sendig all the params 3. Print the len of the resulting list: `print(len(results))` 4. See error when the len is 20 instead the limit value **Additional context** - In other scenary, if i put the limit on 30, i get 40 results in the list.
kerem closed this issue 2026-02-27 23:00:31 +03:00
Author
Owner
<!-- gh-comment-id:1917864014 --> @sigma67 commented on GitHub (Jan 30, 2024): https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter
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#384
No description provided.