Python3 script that transfers all Spotify playlists to Youtube-Music using spotipy and ytmusicapi



  1. Install spotipy and ytmusicapi using pip install -r requirements.txt


  1. Generate a new app at
  2. Fill the redirect_uri from into the new app’s settings
  3. Fill in your client_id and client_secret from your Spotify app into file


  1. Open a new tab
  2. Open the developer tools (Ctrl-Shift-I) and select the “Network” tab
  3. Go to and ensure you are logged in
  4. Find an authenticated POST request.
  5. Paste copied cookies in headers_auth.json. Should look something like this example image

Run Command

  1. After setting up both YouTubeMusic and Spotify. Transfer all your spotify playlists to youtubemusic with python3


View Github