

The ID is again the last part of the URI. To retrieve this we can again use the Spotify URI, by browsing to our profile and clicking ‘Share -> Copy Spotify URI’. Spotify also lets users download high-resolution codes that can be shared in messaging apps and on social media. The endpoint for this request is /playlists, that requires to specify the user_id (in this case, our ID). Unlike before, we will now make a POST request to the APIs, including our new playlist’s details in the request’s body. To do this, we’ll use the Playlists endpoint.įirst, let’s create a new playlist named ‘Indie bands like Franz Ferdinand but using Python’.

What we would like is, of course, to automatically build a playlist containing these recommendations. This is cool, but for now we only printed out title and artist of our recommendation. Again, the ID of a track can be obtained via its Spotify URI.Īnd here’s the corresponding output: 1) "Rawnald Gregory Erickson the Second" by STRFKR 2) "Oh Devil" by Electric Guest 3) "Where I'm From" by Digable Planets 4) "Wraith Pinned to the Mist and Other Games" by of Montreal 5) "Summer Days" by Rhye 6) "FACE" by BROCKHAMPTON 7) "Heartbreaker" by Metronomy 8) "Psychic City - Classixx Remix" by YACHT 9) "Daft Punk Is Playing at My House" by LCD Soundsystem 10) "The Salmon Dance" by The Chemical BrothersĮlectro-dancy bands like LCD Soundsystem, The Chemical Brothers and Metronomy are now in, nice!
