[GH-ISSUE #333] how to get 'songs' and not music video when using get_album() #261

Closed
opened 2026-02-27 22:08:52 +03:00 by kerem · 2 comments
Owner

Originally created by @Mohammad9760 on GitHub (Dec 30, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/333

hey there!
so I can filter the search() to return only 'songs' and not music videos but when I use get_album()['tracks'] the videoId is the link to the music videos if there's a music video for that song.
how do I get the tracks of an album as 'songs', the only way I can think of is to get the track name and artist name and do a search() again with 'songs' filter but that's too tricky and not good for my performance.
thanks!

Originally created by @Mohammad9760 on GitHub (Dec 30, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/333 hey there! so I can filter the search() to return only 'songs' and not music videos but when I use get_album()['tracks'] the videoId is the link to the music videos if there's a music video for that song. how do I get the tracks of an album as 'songs', the only way I can think of is to get the track name and artist name and do a search() again with 'songs' filter but that's too tricky and not good for my performance. thanks!
kerem 2026-02-27 22:08:52 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Dec 30, 2022):

Use an authenticated instance: https://ytmusicapi.readthedocs.io/en/stable/setup.html

Non-authenticated requests usually return mostly music videos.

<!-- gh-comment-id:1367922428 --> @sigma67 commented on GitHub (Dec 30, 2022): Use an authenticated instance: https://ytmusicapi.readthedocs.io/en/stable/setup.html Non-authenticated requests usually return mostly music videos.
Author
Owner

@RaduTek commented on GitHub (Apr 16, 2023):

Here is my workaround for this https://github.com/RaduTek/YTMusicDL/blob/master/ytmusicdl.py#L859

Basically I use yt-dlp to get the playlist with the ID from audioPlaylistId, as on regular YouTube those playlists seem to always list the audio/album version. Then I try and match the song from the YT Music album with the one from the YT playlist by the index number.

It is an annoying workaround you have to do for unauthenticated and free accounts, since audio only mode is a YT Music Premium feature.

<!-- gh-comment-id:1510489821 --> @RaduTek commented on GitHub (Apr 16, 2023): Here is my workaround for this [https://github.com/RaduTek/YTMusicDL/blob/master/ytmusicdl.py#L859](https://github.com/RaduTek/YTMusicDL/blob/master/ytmusicdl.py#L859) Basically I use yt-dlp to get the playlist with the ID from audioPlaylistId, as on regular YouTube those playlists seem to always list the audio/album version. Then I try and match the song from the YT Music album with the one from the YT playlist by the index number. It is an annoying workaround you have to do for unauthenticated **and free** accounts, since audio only mode is a YT Music Premium feature.
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#261
No description provided.