Announcements

Help Wizard

Step 1

NEXT STEP

/recommendations invalid request, status 400

Solved!

/recommendations invalid request, status 400

Plan

Premium

Country 

Poland

Operating System

Linux pop-os

 

My Question or Issue

I am using /recommendations route. In most cases it works pretty well. But sometimes when i provide more data it responds with invalid request and status 400. It doesn't work correctly in my app and in developer console too.

 

This request below returns error with message: "invalid request", status: 400.

https://api.spotify.com/v1/recommendations?limit=10&market=PL&seed_artists=4NHQUGzhtTLFvgF5SZesLK%2C...

 

In the above example i have two two seed_artists, seed_tracks and seed_genres each. I noticed that when i remove one seed e.g. from seed_genres then request works.

https://api.spotify.com/v1/recommendations?limit=10&market=PL&seed_artists=4NHQUGzhtTLFvgF5SZesLK%2C...

 

And it's not related to specific seed, I can even remove one artist from seed_artist. This again works correctly, and responds with result.

https://api.spotify.com/v1/recommendations?limit=10&market=PL&seed_artists=4NHQUGzhtTLFvgF5SZesLK&se...

Same story is with seed_tracks.

Am I doing something wrong or is it a bug? I appreciate all help.

Reply

Accepted Solutions
Marked as solution

The total number of seed artists, seed tracks, and seed genres must add up to 5 or less.

View solution in original post

3 Replies
Marked as solution

The total number of seed artists, seed tracks, and seed genres must add up to 5 or less.

Oh I see. I didn't understand this correctly. I thought that i can provide 5 seeds each so up to 15 in total. Anyway thanks much for help.

Thanks for the help!
Any plans to increase seed track limit in the api?

Suggested posts