[GH-ISSUE #293] Include album artist in the response when retrieving history #227

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

Originally created by @Aktimoose on GitHub (Sep 13, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/293

When retrieving the last track in history, it doesn't return the album artist.

With the code

history = ytmusic.get_history()
print(history[0])

It returned

{'videoId': '2M_dR5nyRtw', 'title': 'Quiet', 'artists': [{'name': 'C418', 'id': None}], 'album': {'name': 'I Was a Teenage Exocolonist (Original Soundtrack)', 'id': 'MPREb_2eA4zi7KMNQ'}, 'likeStatus': 'INDIFFERENT', 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/OebYJmQIw2VvyjOm7EhTkEUNIh2Ajlu_P7ClfkdHQPJZedVQj73rxo5zeZygTc7fiQzJBh5ECsc9_2g=w60-h60-l90-rj', 'width': 60, 'height': 60}, {'url': 'https://lh3.googleusercontent.com/OebYJmQIw2VvyjOm7EhTkEUNIh2Ajlu_P7ClfkdHQPJZedVQj73rxo5zeZygTc7fiQzJBh5ECsc9_2g=w120-h120-l90-rj', 'width': 120, 'height': 120}], 'isAvailable': True, 'isExplicit': False, 'duration': '5:51', 'duration_seconds': 351, 'feedbackToken': 'CgoKCkknbSBhIGNyZWVweSBnb2JsaW4hCgoKCgpJJ20gYSBjcmVlcHkgZ29ibGluIQoKCgoKSSdtIGEgY3JlZXB5IGdvYmxpbi', 'played': 'Today'}

In this example, the album artist should be "Various Artists".

Originally created by @Aktimoose on GitHub (Sep 13, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/293 When retrieving the last track in history, it doesn't return the album artist. With the code ``` history = ytmusic.get_history() print(history[0]) ``` It returned `{'videoId': '2M_dR5nyRtw', 'title': 'Quiet', 'artists': [{'name': 'C418', 'id': None}], 'album': {'name': 'I Was a Teenage Exocolonist (Original Soundtrack)', 'id': 'MPREb_2eA4zi7KMNQ'}, 'likeStatus': 'INDIFFERENT', 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/OebYJmQIw2VvyjOm7EhTkEUNIh2Ajlu_P7ClfkdHQPJZedVQj73rxo5zeZygTc7fiQzJBh5ECsc9_2g=w60-h60-l90-rj', 'width': 60, 'height': 60}, {'url': 'https://lh3.googleusercontent.com/OebYJmQIw2VvyjOm7EhTkEUNIh2Ajlu_P7ClfkdHQPJZedVQj73rxo5zeZygTc7fiQzJBh5ECsc9_2g=w120-h120-l90-rj', 'width': 120, 'height': 120}], 'isAvailable': True, 'isExplicit': False, 'duration': '5:51', 'duration_seconds': 351, 'feedbackToken': 'CgoKCkknbSBhIGNyZWVweSBnb2JsaW4hCgoKCgpJJ20gYSBjcmVlcHkgZ29ibGluIQoKCgoKSSdtIGEgY3JlZXB5IGdvYmxpbi', 'played': 'Today'}` In this example, the album artist should be "Various Artists".
kerem 2026-02-27 22:08:42 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Sep 16, 2022):

The dict you posted contains an artist "C418", is that not correct?

<!-- gh-comment-id:1249412377 --> @sigma67 commented on GitHub (Sep 16, 2022): The dict you posted contains an artist "C418", is that not correct?
Author
Owner

@Aktimoose commented on GitHub (Sep 16, 2022):

The dict you posted contains an artist "C418", is that not correct?

That is the track artist, not the album artist. For some tracks they are different fields.

<!-- gh-comment-id:1249413376 --> @Aktimoose commented on GitHub (Sep 16, 2022): > The dict you posted contains an artist "C418", is that not correct? That is the track artist, not the album artist. For some tracks they are different fields.
Author
Owner

@sigma67 commented on GitHub (Sep 16, 2022):

They may be different fields, yes. But the album artist is not actually shown on the history page, as far as I am aware.

https://music.youtube.com/history

In most cases, ytmusicapi can only retrieve data shown on the web, as the API responses are quite tailored to what's shown on the site.

<!-- gh-comment-id:1249445517 --> @sigma67 commented on GitHub (Sep 16, 2022): They may be different fields, yes. But the album artist is not actually shown on the history page, as far as I am aware. https://music.youtube.com/history In most cases, ytmusicapi can only retrieve data shown on the web, as the API responses are quite tailored to what's shown on the site.
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#227
No description provided.