Spotify Web API: How to get genres from TrackObject in playlist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the Spotify Web API through Python. I am currently extracting tracks from a playlist. With that in mind, I also wanted to get the genres for each song.
My first question is if there's a way to a genre for a specific song? At the moment, I don't think there is but I could be mistaken.
Assuming there wasn't, I tried to get the genres for a song by keying in to each track. However, I noticed that there is no genre's key for any of the songs. I am using the the Top 100 songs, so I'd assume that these songs would have a genre.
Here's what the 'artist' key returns for a given artist in a given song:
[{'external_urls': {'spotify': ''}, 'href': 'https://api.spotify.com/v1/artists/2LIk90788K0zvyj2JJVwkJ', 'id': '2LIk90788K0zvyj2JJVwkJ', 'name': 'Jack Harlow', 'type': 'artist', 'uri': 'spotify:artist:2LIk90788K0zvyj2JJVwkJ'}]
This is the documentation I was looking at:
https://developer.spotify.com/documentation/web-api/reference/get-playlists-tracks
- Labels:
-
Question
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page