{"id":28218,"library":"spotify2ytmusicv2","title":"Spotify2YTMusicV2","description":"A tool to copy Spotify playlists to YouTube Music (YTMusic). Currently at version 0.2.2, released on 2025-04-20. Release cadence is irregular; still in early development.","status":"active","version":"0.2.2","language":"python","source_language":"en","source_url":"https://github.com/ohjho/spotify2ytmusicv2","tags":["spotify","youtube-music","playlist-transfer","cli"],"install":[{"cmd":"pip install spotify2ytmusicv2","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for Spotify API interaction","package":"spotipy","optional":false},{"reason":"Required for YouTube Music API interaction","package":"ytmusicapi","optional":false}],"imports":[{"wrong":"from spotify2ytmusicv2 import Spotify2YTMusic","symbol":"Spotify2YTMusic","correct":"from spotify2ytmusicv2.backend import Spotify2YTMusic"}],"quickstart":{"code":"from spotify2ytmusicv2 import Spotify2YTMusic\nimport os\n\nclient = Spotify2YTMusic(\n    spotify_client_id=os.environ.get('SPOTIFY_CLIENT_ID', ''),\n    spotify_client_secret=os.environ.get('SPOTIFY_CLIENT_SECRET', ''),\n    ytmusic_headers_raw=os.environ.get('YT_MUSIC_HEADERS', '{}')\n)\nplaylist_id = 'your_spotify_playlist_id'\nclient.copy_playlist(playlist_id, public=True)","lang":"python","description":"Authenticate and copy a Spotify playlist to YouTube Music. Obtain Spotify API credentials from Spotify Developer Dashboard, and YTMusic headers from browser dev tools after logging into music.youtube.com."},"warnings":[{"fix":"Export the headers JSON as a string: export YT_MUSIC_HEADERS='{\"User-Agent\":\"...\",\"Cookie\":\"...\"}'","message":"The YTMusic headers must be passed as a raw JSON string in the environment variable YT_MUSIC_HEADERS. Do not use a dictionary or file; the library expects a string.","severity":"gotcha","affected_versions":"All"},{"fix":"Use `client.copy_playlist(...)` instead of `client.transfer_playlist(...)`.","message":"In version 0.2.0, the method `copy_playlist` was renamed from `transfer_playlist`. Calling `transfer_playlist` will raise an AttributeError.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Extract the ID from the URL (e.g., '3s9t1vD1d0c2a6b8f0e4a' from 'open.spotify.com/playlist/...').","message":"The library expects Spotify playlist ID (not URL). Passing a full Spotify URL will fail silently or raise an error.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'-04':19 '-20':20 '0.2.2':15 '2025':18 'cadenc':22 'cli':36 'copi':5 'current':12 'develop':28 'earli':27 'irregular':24 'music':10,32 'playlist':7,34 'playlist-transf':33 'releas':16,21 'spotifi':6,29 'spotify2ytmusicv2':1 'still':25 'tool':3 'transfer':35 'version':14 'youtub':9,31 'youtube-mus':30 'ytmusic':11","created_at":"2026-05-09T05:54:21.067564+00:00","updated_at":"2026-05-09T05:54:21.067564+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Spotify2YTMusic' from 'spotify2ytmusicv2.backend' (/tmp/tmpyrpjunb1/venv/lib/python3.12/site-packages/spotify2ytmusicv2/backend.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/spotify2ytmusicv2/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}