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

Spotify /recommendations endpoint returning an empty array for tracks

Solved!

Spotify /recommendations endpoint returning an empty array for tracks

My Question or Issue:

 

When making a call to the /reccomendations endpoint, I get a seemingly regular response to the API call, except the tracks array is empty. 

Call code:

Dryd3n_0-1642813986657.png

 

Response:
{
"tracks" : [ ],
"seeds" : [ {
"initialPoolSize" : 0,
"afterFilteringSize" : 0,
"afterRelinkingSize" : 0,
"id" : "meme rap",
"type" : "GENRE",
"href" : null
}, {
"initialPoolSize" : 0,
"afterFilteringSize" : 0,
"afterRelinkingSize" : 0,
"id" : "irish drill",
"type" : "GENRE",
"href" : null
}, {
"initialPoolSize" : 0,
"afterFilteringSize" : 0,
"afterRelinkingSize" : 0,
"id" : "uk hip hop",
"type" : "GENRE",
"href" : null
}, {
"initialPoolSize" : 0,
"afterFilteringSize" : 0,
"afterRelinkingSize" : 0,
"id" : "lo-fi rap",
"type" : "GENRE",
"href" : null
}, {
"initialPoolSize" : 0,
"afterFilteringSize" : 0,
"afterRelinkingSize" : 0,
"id" : "uk drill",
"type" : "GENRE",
"href" : null
} ]
}

 

as you can see the api returns the seeds but the track array is empty...

 

 

Reply

Accepted Solutions
Marked as solution

Hey there, help's here!

Hmm, it seems that the genre seeds you've provided aren't valid (meme rap, irish drill, lo-fi rap, uk drill). You can get all available genre seeds with this endpoint: https://developer.spotify.com/documentation/web-api/reference/#/operations/get-recommendation-genres.

Could you try using a genre seed from that list (e.g. 'techno') and see if the same thing happens?

Keep me posted! 🙂

Have a great day,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

2 Replies
Marked as solution

Hey there, help's here!

Hmm, it seems that the genre seeds you've provided aren't valid (meme rap, irish drill, lo-fi rap, uk drill). You can get all available genre seeds with this endpoint: https://developer.spotify.com/documentation/web-api/reference/#/operations/get-recommendation-genres.

Could you try using a genre seed from that list (e.g. 'techno') and see if the same thing happens?

Keep me posted! 🙂

Have a great day,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Thanks  Hubo, you where correct. I assumed those genre seeds to be valid because I pulled them from the artists endpoint so I just assumed that they would have been valid genre seeds but I guess not. Thanks anyway

Suggested posts