Announcements

Help Wizard

Step 1

NEXT STEP

generate a complete list of playlists containing text string

Solved!

generate a complete list of playlists containing text string

Hi! For Black History Month I wanted to generate a list of playlists on Spotify that contain the string "Black History Month" - this search query works great

 

 

 

https://api.spotify.com/v1/search?query=black+history+month&type=playlist&market=US&locale=en-US%2Cen%3Bq%3D0.9&offset=0&limit=30

 

 

 

What is the methodology for what 30 results are getting returned? Is it alphabetical, most played?

However, I'd like a comprehensive list, so I tried taking off the "limit" parameter entirely, and it generates 20 results in that case haha!

Trying a larger number like 100 generates this error:

 

 

 

 "error": {
    "status": 400,
    "message": "Invalid limit"

 

 

 

Is it possible to get a comprehensive list? This isn't for an ongoing app purpose, it's for developing a visualization of what is on people's Black History Month playlists. 

 

If it's not possible to get a comprehensive list, is there a way I can maybe get playlists with the string "Black History Month" by most followed or played?

 

Reply

Accepted Solutions
Marked as solution

I'm assuming you've read this. It states that the default limit is set to 20, and 100 is invalid because: Range: 0 - 50
Use offset to implement pagination.

I believe the results are sorted the same way as they are in the spotify app itself, which I believe is by relevance, so by name and popularity.

View solution in original post

2 Replies
Marked as solution

I'm assuming you've read this. It states that the default limit is set to 20, and 100 is invalid because: Range: 0 - 50
Use offset to implement pagination.

I believe the results are sorted the same way as they are in the spotify app itself, which I believe is by relevance, so by name and popularity.

Hello, thanks so much! 

Wanted to report back with how I ended up using the API, I settled on 40 playlists haha 🙂 https://blog.kumu.io/endless-data-possibilities-utilizing-apis-for-data-import-into-kumu-869c9e32872...

Screenshot 2024-02-27 at 13.16.48.png

Suggested posts