Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Getting album not getting genre

Getting album not getting genre

Plan - Premium

Country - USA

Device - Lenovo (2012)

Operating System - Windows 10

My Question or Issue

 

I'm using spotipy to grab album data, but I've now grabbed over 10k albums, and none of them have returned genre data. This seems unusual. Most of the albums are under 50 popularity, but almost all of them are Christmas albums (the subject of my research).

 

All of the other data in the album shows up just fine, so I'm not having a problem in getting the data from my program into the database--it seems to be a lack of tagging in spotify at all.

Reply
5 Replies

I see this as well.  genres is always [ ] empty array, from any endpoint returning a FullAlbum.  Seen with thousands of albums, including very mainstream pop ones.  In fact, I have not been able to see any genres for any album.  3rd party site which claims to pull data from Spotify does show genres on same said albums' songs.  Definitely a bug.

AFAIK, there is no genre data associated with albums. Only artists and tracks have genre information. That's why you can't directly search for albums of the particular genre via API - you need to either search for artists or tracks using genre filter and then pull relevant albums. At least I decided to go this way after several failed attempts to retrieve genres information directly for albums.

Tracks do not have a genre field (https://developer.spotify.com/documentation/web-api/reference/#object-trackobject)

 

Albums do have a genre field, but as others have mentioned, I have yet to see a single album with the field populated (https://developer.spotify.com/documentation/web-api/reference/#object-albumobject)

 

Artists also have a genre field, and from my experience only about 70-75% of artists have the field populated (https://developer.spotify.com/documentation/web-api/reference/#object-artistobject)

How to get genres for a track?

As I stated - there is no genre field for tracks.  You can check for a genre for the album, but I've yet to find an album with genre data populated.  Your best bet is to check for artist genre data.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random