I am not a very good programmer. I do not understand Spotify's API quite yet. Because of this shortfall, I simply used Spotify's Web API. If you want to mix up your current playlist or convert Spotify's amazing "Discover Weekly" playlist, here are some general steps. The playlist user for the Discover Weekly is "spotify."

You can grab any URI from the Spotify API or from the web browser itself.

  1. Get a List of Current User's Playlists
  2. Get a Playlist's Tracks, items.track.uri
  3. Put in Notepad++, find all in current document ----> "uri" or Excel and filter by contains "spotify"
  4. Put in Excel, separate by colon, add one column of ---->=RANDBETWEEN(0,$numberOfSongs)
  5. Sort by the new column(s)
  6. New column, first row----> =a2 =NewColumnFirstRow&","&A3
  7. Create a Playlist
  8. Add Tracks to a Playlist with the last row from the new column

Additional Code to "randomize" playlist manually

I have found that the shuffle on Spotify is not the best. So, I did this bit for three column sort and random.

Spotify search string:

  • items.track.album.artists, items.track(name,uri)

Regex find & replace in notepad++:

  • "name" | "uri" : "spotify:track:
  • Line .* "
  • ".*

Excel Stuff:

  • =IF(B1<2,B1+1,1) =IF(B1=1,A1&","&A2,"") =FIND("name",A2,1) -->highlight greater than zero
  • ID 1+1
  • =randbetween(1,1000)
  • =randbetween(1,3) -->Column sort

Using CURL and JQ

Create a CURL request from the WebAPI

 cat spotify.txt | jq '.items[0].track.name,.items[0].track.uri,.items[0].track.album.artists[0].name'
  • "Light Up The Sky"\
  • "spotify:track:54OYNqBE7OiyETV0dE9Fsl"
  • "Yellowcard"