You can make a request http://ws.spotify.com/search/1/album?q=daft%20punk%20random%20access%20memories
http://ws.spotify.com/lookup/1/?uri=spotify:albumreadym2880jivSbbyEGAKfITCa&extras=track to get the tracks on this album.
As for adding them to the playlist programmatically, there is currently no official way to do this. However, here is a hack that you can use by opening the web player in the devtools console. The sample code will create a playlist and add a track. You can combine this with the above steps.
window.frames[0].require("$api/models", function(models) { models.Playlist.create("My cool playlist").done( function(playlist) { playlist.load("tracks").done( function(){ playlist.tracks.add( models.Track.fromURI("spotify:track:3KRAqo71NrfR1UCa34JEsy").done(function(){ }) }) }) })
You can write a browser extension to do this. Or, assuming you have a large list of JSON tracks that you want to add, you can modify the example above to add all the tracks in sequence.
Alternatively, you can try using something like https://github.com/liesen/spotify-api-server until Spotify starts working together and provides the official API.
source share