Home > OS >  Trying to use Spotify API to get search for a music playlist and return the results as a json file
Trying to use Spotify API to get search for a music playlist and return the results as a json file

Time:12-27

I am trying to develop a terminal application in Python where I ask Spotify to send me all the results matching the search for a music playlist and return in the form of a JSON. Is there an easy way to do this?

CodePudding user response:

Of course there is. You have to request a token by following the steps in the "Authorization Guide" of the API documentation.

Once you have an access token, you can send a GET request to the /search endpoint of the API

CodePudding user response:

Spotipy might be the best option to query the Spotify API. You can get playlists using playlist_items method (see example).

  • Related