Spotify API - Tracks Genre

Spotify API - Tracks Genre

I've been trying to get some tracks' genres. I already know the genres are available under a track's album, but when I try to get the genres of the album, I only get an empty array in JSON (example below).

 

{'album_type': 'album', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/6aCbXH85qN6xo54C7atSMx'}, 'href': 'https://api.spotify.com/v1/artists/6aCbXH85qN6xo54C7atSMx', 'id': '6aCbXH85qN6xo54C7atSMx', 'name': 'Black Alien', 'type': 'artist', 'uri': 'spotify:artist:6aCbXH85qN6xo54C7atSMx'}], 'available_markets': ['AD', 'AE', 'AG', 'AL', 'AM', 'AO', 'AR', 'AT', 'AU', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BN', 'BO', 'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CD', 'CG', 'CH', 'CI', 'CL', 'CM', 'CO', 'CR', 'CV', 'CW', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'ES', 'FI', 'FJ', 'FM', 'FR', 'GA', 'GB', 'GD', 'GE', 'GH', 'GM', 'GN', 'GQ', 'GR', 'GT', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN', 'IQ', 'IS', 'IT', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KR', 'KW', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MG', 'MH', 'MK', 'ML', 'MN', 'MO', 'MR', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NE', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NZ', 'OM', 'PA', 'PE', 'PG', 'PH', 'PK', 'PL', 'PS', 'PT', 'PW', 'PY', 'QA', 'RO', 'RS', 'RW', 'SA', 'SB', 'SC', 'SE', 'SG', 'SI', 'SK', 'SL', 'SM', 'SN', 'SR', 'ST', 'SV', 'SZ', 'TD', 'TG', 'TH', 'TJ', 'TL', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'US', 'UY', 'UZ', 'VC', 'VE', 'VN', 'VU', 'WS', 'XK', 'ZA', 'ZM', 'ZW'], 'copyrights': [{'text': '2019 Extrapunk Extrafunk', 'type': 'C'}, {'text': '2019 Extrapunk Extrafunk', 'type': 'P'}], 'external_ids': {'upc': '8429006378821'}, 'external_urls': {'spotify': 'https://open.spotify.com/album/0d9km1VogLi6sN6S95ilyT'}, 'genres': [], 'href': 'https://api.spotify.com/v1/albums/0d9km1VogLi6sN6S95ilyT', 'id': '0d9km1VogLi6sN6S95ilyT', 'images': [{'height': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273de82ffcfe8f5dca0ef611e9c', 'width': 640}, {'height': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02de82ffcfe8f5dca0ef611e9c', 'width': 300}, {'height': 64, 'url': 'https://i.scdn.co/image\(...)

 

I've found that someone had the same issue back in 2016, and posted it here:

https://community.spotify.com/t5/Other-Podcasts-Partners-etc/Spotify-API-Tracks-Genre/td-p/1289804

but apparently the reply which would have solved this has been deleted.

 

Thanks in advance! 🙂

Reply
0 Replies

Suggested posts