by zoltar · 6y ago · 0 comments
TOKEN=$(curl --basic --user $ID:$SECRET -X POST -d grant_type=client_credentials https://accounts.spotify.com/api/token | jq -r .access_token)
curl -H "Authorization: Bearer $TOKEN" https://api.spotify.com/v1/playlists/$PLAYLIST/tracks | tee playlist-$PLAYLIST.json | jq -rc '.items[].track | "\(.artists[0].name) -- \(.name)"' | sort[1] https://developer.spotify.com/documentation/web-api/referenc...
It should be possible to script that out too.
I already did just to test it out, the results include a 'next' link that you can use :)
I'm a user / minor contributor. It could use some polishing, but it gets the job done (JSON or TSV output). I wonder if it could sidestep Spotify restrictions by not providing an explicit interface for uploading playlists to competing services -- just providing the download portion?