[GH-ISSUE #360] search: top result category not working #286

Closed
opened 2026-02-27 22:09:00 +03:00 by kerem · 8 comments
Owner

Originally created by @Elmar1991 on GitHub (Mar 11, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/360

Hello, some data that has been changed in music youtube is not working correctly.

Originally created by @Elmar1991 on GitHub (Mar 11, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/360 Hello, some data that has been changed in music youtube is not working correctly.
kerem 2026-02-27 22:09:00 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kattums commented on GitHub (Mar 11, 2023):

Hey, I'm having a similar problem where it looks like something has changed with the YouTube Music API.

I was previously using YTMusic.search() passing a track_id as my query, which would return an array containing the results objects (I use search() rather than get_song() because it returns additional information that get_song() doesn't have). Now, calling YTMusic.search(track_id) returns an empty array. I discovered that appending a filter param fixes this behaviour. YTMusic.search(track_id, filter='songs') returns the same results I had previously.

Maybe this is of help to you.

<!-- gh-comment-id:1465044265 --> @kattums commented on GitHub (Mar 11, 2023): Hey, I'm having a similar problem where it looks like something has changed with the YouTube Music API. I was previously using `YTMusic.search()` passing a `track_id` as my query, which would return an array containing the results objects (I use `search()` rather than `get_song()` because it returns additional information that `get_song()` doesn't have). Now, calling `YTMusic.search(track_id)` returns an empty array. I discovered that appending a filter param fixes this behaviour. `YTMusic.search(track_id, filter='songs')` returns the same results I had previously. Maybe this is of help to you.
Author
Owner

@Elmar1991 commented on GitHub (Mar 12, 2023):

Hey, I'm having a similar problem where it looks like something has changed with the YouTube Music API.

I was previously using YTMusic.search() passing a track_id as my query, which would return an array containing the results objects (I use search() rather than get_song() because it returns additional information that get_song() doesn't have). Now, calling YTMusic.search(track_id) returns an empty array. I discovered that appending a filter param fixes this behaviour. YTMusic.search(track_id, filter='songs') returns the same results I had previously.

Maybe this is of help to you.

thank you for the answer but it's not related to what you said. What I'm saying is that it's still a problem with parsing, please help with this..@sigma67

<!-- gh-comment-id:1465139873 --> @Elmar1991 commented on GitHub (Mar 12, 2023): > Hey, I'm having a similar problem where it looks like something has changed with the YouTube Music API. > > I was previously using `YTMusic.search()` passing a `track_id` as my query, which would return an array containing the results objects (I use `search()` rather than `get_song()` because it returns additional information that `get_song()` doesn't have). Now, calling `YTMusic.search(track_id)` returns an empty array. I discovered that appending a filter param fixes this behaviour. `YTMusic.search(track_id, filter='songs')` returns the same results I had previously. > > Maybe this is of help to you. thank you for the answer but it's not related to what you said. What I'm saying is that it's still a problem with parsing, please help with this..@sigma67
Author
Owner

@sigma67 commented on GitHub (Mar 12, 2023):

Everything works fine here. Please add more details and a code sample if you need help with something.

<!-- gh-comment-id:1465165129 --> @sigma67 commented on GitHub (Mar 12, 2023): Everything works fine here. Please add more details and a code sample if you need help with something.
Author
Owner

@Elmar1991 commented on GitHub (Mar 12, 2023):

``

Everything works fine here. Please add more details and a code sample if you need help with something.

from ytmusicapi import YTMusic

ytmusic = YTMusic()
search = ytmusic.search('Taylor+Swift+Blank+Space', filter='songs')
print(search);

When filter = 'songs' it appears in videos between songs as a result

There were some changes on the https://music.youtube.com site 1 day ago, please take this into consideration.

<!-- gh-comment-id:1465173115 --> @Elmar1991 commented on GitHub (Mar 12, 2023): `` > Everything works fine here. Please add more details and a code sample if you need help with something. from ytmusicapi import YTMusic ytmusic = YTMusic() search = ytmusic.search('Taylor+Swift+Blank+Space', filter='songs') print(search); When `filter = 'songs'` it appears in videos between songs as a result There were some changes on the https://music.youtube.com site 1 day ago, please take this into consideration.
Author
Owner

@Elmar1991 commented on GitHub (Mar 12, 2023):

i tested it and i write here what is not working correctly,
1.) Top result not working.
2.) When searching, the correct results do not come when there is a limit of more than 20. @sigma67

<!-- gh-comment-id:1465310429 --> @Elmar1991 commented on GitHub (Mar 12, 2023): i tested it and i write here what is not working correctly, 1.) Top result not working. 2.) When searching, the correct results do not come when there is a limit of more than 20. @sigma67
Author
Owner

@sigma67 commented on GitHub (Mar 16, 2023):

There have been multiple issues on search without filters, but I haven't seen them on my end yet. You can only get more than 20 results if using filters.

Top result format seems to have changed, so that may indeed be a bug.

<!-- gh-comment-id:1471771839 --> @sigma67 commented on GitHub (Mar 16, 2023): There have been multiple issues on `search` without filters, but I haven't seen them on my end yet. You can only get more than 20 results if using filters. Top result format seems to have changed, so that may indeed be a bug.
Author
Owner

@sigma67 commented on GitHub (Mar 22, 2023):

@Elmar1991 please test fixes on master

<!-- gh-comment-id:1480290926 --> @sigma67 commented on GitHub (Mar 22, 2023): @Elmar1991 please test fixes on master
Author
Owner

@Elmar1991 commented on GitHub (Mar 27, 2023):

yes it works thank you. @sigma67

<!-- gh-comment-id:1485045696 --> @Elmar1991 commented on GitHub (Mar 27, 2023): yes it works thank you. @sigma67
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#286
No description provided.