[GH-ISSUE #596] Add a get_artist_songs just like get_artist_albums #409

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

Originally created by @kevinmarquesp on GitHub (May 30, 2024).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/596

Is your feature request related to a problem? Please describe.
I would be nice to have a get_artist_songs() just like the get_artist_albums(), but without the params because the get_artist() function returns doesn't have a params key in the songs field.

Describe the solution you'd like
For an example of usage that I expect:

from ytmusicapi import YTMusic

ytm = YTMusic()

artist = ytm.get_artist("UCu3D7Xd6Wxt4f1PYokvZVVA")
browse_id = artist["songs"]["browseId"]

songs = ytm.get_artist_songs(browse_id, limit=None)

# Then I expect to get an list of a bunch of song dicts.
print(songs)

Describe alternatives you've considered
I tried to follow the docs, there was said that I could do that with the get_artist_albums() function, but it didn't work because of the params field that the songs doesn't have, unlike the singles, videos and albums. Maybe fixing that issue would be better, but I still prefer a separate function for them all.

Additional context
I was trying to create a CLI application that will allow users to fetch JSON data from the Youtube Music API and integrate it with yt-dlp with jq, or something like that, and the songs subcommand isn't working in anyway.

Originally created by @kevinmarquesp on GitHub (May 30, 2024). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/596 **Is your feature request related to a problem? Please describe.** I would be nice to have a `get_artist_songs()` just like the `get_artist_albums()`, but without the `params` because the `get_artist()` function returns doesn't have a `params` key in the `songs` field. **Describe the solution you'd like** For an example of usage that I expect: ```python from ytmusicapi import YTMusic ytm = YTMusic() artist = ytm.get_artist("UCu3D7Xd6Wxt4f1PYokvZVVA") browse_id = artist["songs"]["browseId"] songs = ytm.get_artist_songs(browse_id, limit=None) # Then I expect to get an list of a bunch of song dicts. print(songs) ``` **Describe alternatives you've considered** I tried to follow the docs, there was said that I could do that with the `get_artist_albums()` function, but it didn't work because of the `params` field that the `songs` doesn't have, unlike the `singles`, `videos` and `albums`. Maybe fixing that issue would be better, but I still prefer a separate function for them all. **Additional context** I was trying to create a CLI application that will allow users to fetch JSON data from the Youtube Music API and integrate it with `yt-dlp` with `jq`, or something like that, and the [`songs` subcommand](https://github.com/kevinmarquesp/ytm_api.py/blob/954ad7319e41d8f76bd0d7da1696591031b803b1/ytm_api.py#L82) isn't working in anyway.
kerem closed this issue 2026-02-27 23:00:39 +03:00
Author
Owner

@sigma67 commented on GitHub (May 30, 2024):

If you read the docs carefully, you'll find that the songs key contains a browseId, which is usable with get_playlist.

https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.get_artist

<!-- gh-comment-id:2139236852 --> @sigma67 commented on GitHub (May 30, 2024): If you read the docs carefully, you'll find that the `songs` key contains a `browseId`, which is usable with `get_playlist`. https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.get_artist
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#409
No description provided.