[GH-ISSUE #308] Getting the album name of a certain song #239

Closed
opened 2026-02-27 22:08:46 +03:00 by kerem · 1 comment
Owner

Originally created by @juanfrilla on GitHub (Oct 12, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/308

Hello, Is it posible to get the album name from a song if you pass any parameters like the youtube url of the song or the song name that belongs to that album?

I realized that if you filter by album like that search_results = yt.search(query="Song Name", filter="albums")
And in the mayority of the cases the album name is in song_result[0]['title'])

But I don't know if is there a better way to achieve this.

Originally created by @juanfrilla on GitHub (Oct 12, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/308 Hello, Is it posible to get the album name from a song if you pass any parameters like the youtube url of the song or the song name that belongs to that album? I realized that if you filter by album like that `search_results = yt.search(query="Song Name", filter="albums")` And in the mayority of the cases the album name is in `song_result[0]['title'])` But I don't know if is there a better way to achieve this.
kerem 2026-02-27 22:08:46 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Nov 1, 2022):

If you have the videoId you can use get_watch_playlist. The first result will contain all the details of the song.

<!-- gh-comment-id:1298525787 --> @sigma67 commented on GitHub (Nov 1, 2022): If you have the videoId you can use [`get_watch_playlist`](https://ytmusicapi.readthedocs.io/en/stable/reference.html#ytmusicapi.YTMusic.get_watch_playlist). The first result will contain all the details of the song.
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#239
No description provided.