Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Hey all!
I'm making requests to the GET /tracks, and whereas the documentation here states that genres will be returned within the artists field, I'm seeing that's not the case in my responses. Is this no longer supported within the API?
Hey rdoshi, please how were you able to solve this issue
I'm having the same problem. Do you have any clue if this is a recent problem or if the API has always been like this?
Same issue. My integration works perfectly, except no genres are returned when 'genres' is supplied as a field under artist and album. And there is no empty array returned for genres either which would be expected as indicated by the docs. It seems like a bug in either the docs or api. Any updates from spotify? Happy to collaborate to help repro.
( this is via the /playlists/{playlistid} end point, haven't tested /tracks explicitly)
Same...
I am blocked by the same issue. Any update on this?
The Get Artist, Get Several Artists, and Get Top [Artists] still return genres.
Now using Get Artist isn't returning genre data either!
Not all artists are assigned to genres yet. There is a certain threshold before they get genres.
I'm still get undefined for artist genres even for someone like Taylor Swift.
Using the spotify api ts sdk for clarification
@sidisawesome16, I think there is a bug in your code, or there was a temporary malfunction of the Spotify server.
The following code works for me (as a non TypeScript/JavaScript/NodeJS programmer):
import { SpotifyApi } from '@spotify/web-api-ts-sdk';
const sdk = SpotifyApi.withClientCredentials("Your_Client_ID", "Your_Client_Secret");
// Replace the artistId with the ID of the artist you want to retrieve genres for.
const artistId = '0OdUWJ0sBjDrqHygGUXeCF';
sdk.artists.get(artistId).then(
function(data) {
console.log('Artist genres', data.genres);
},
function(err) {
console.error(err);
}
);
(I used npx tsc example.ts and node script.js to run the script.)
@**bleep** spotify api docs says that genre should be returned with the artist field on a saved track. However, they do not actually return this in the api.
What you are doing here is asking for an artist directly. This does return the artist but it is not the same as what @sidisawesome16 and me also are trying to do. The way your doing it basically requires another request.
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…