1

I know how to query XX from Spotify API. As script below, we simply set keywords = XX

url = 'https://api.spotify.com/v1/search?q='+ keywords +'&type=' + search_type +'&offset='+ off +'&limit=' + lim

j = requests.get(url).json()

But I'm wondering, what if I'd like to query for random songs, what shall I do? Simply query whitespace? Or generate random numbers for song ID?

Thanks!

LookIntoEast
  • 8,048
  • 18
  • 64
  • 92

2 Answers2

0

This is not currently available in the Web API. If you're interested in submitting it as a feature request, you can do so here: http://github.com/spotify/web-api/issues

arirawr
  • 1,255
  • 9
  • 22
0

in case you are willing to using python, we recently released an extension package for the spotipy API client that implements randomized search.

The package is named spotipy-random and can be found on Github and pyPI.