spotify_to_ytmusic
A simple command line script to clone a Spotify playlist to YouTube Music.
Transfer a single Spotify playlist
Like all the songs in a Spotify playlist
Update a transferred playlist on YouTube Music
Transfer all playlists for a Spotify user
Like all songs from all playlists for a Spotify user
Remove playlists from YouTube Music
Install
Python 3.10 or later - https://www.python.org
pipx - https://pipx.pypa.io
pipx ensurepath
Open a new shell. Install:
pipx install spotify_to_ytmusic
Setup
Generate a new app at https://developer.spotify.com/dashboard
Generate a new app by following instructions at https://ytmusicapi.readthedocs.io/en/stable/setup/oauth.html
Run
spotify_to_ytmusic setup
For backwards compatibility you can also create your own file and pass it using --file settings.ini.
If you want to transfer private playlists from Spotify (i.e. liked songs), choose “yes” for oAuth authentication, otherwise choose “no”. For oAuth authentication you should set https://127.0.0.1 as redirect URI for your app in Spotify’s developer dashboard.
Usage
After you’ve completed setup, you can simply run the script from the command line using:
spotify_to_ytmusic create <spotifylink>
where <spotifylink> is a link like https://open.spotify.com/playlist/0S0cuX8pnvmF7gA47Eu63M
The script will log its progress and output songs that were not found in YouTube Music to noresults_youtube.txt.
Transfer all playlists of a Spotify user
For migration purposes, it is possible to transfer all public playlists of a user by using the Spotify user’s ID (unique username).
spotify_to_ytmusic all <spotifyuserid>
Transfer liked tracks of the Spotify user
You must use oAuth authentication for transferring liked songs.
spotify_to_ytmusic liked
This command will open browser where you should give access to your account (if you haven’t done that before). After authorization you will be redirected to 127.0.0.1, copy link you were redirected to (looks like 127.0.0.1/?code=…) and paste to command line.
Command line options
There are some additional command line options for setting the playlist name and determining whether it’s public or not. To view them, run
spotify_to_ytmusic -h
To view subcommand help, run i.e.
spotify_to_ytmusic setup -h
Available subcommands:
positional arguments:
{setup,create,update,remove,all}
Provide a subcommand
setup Set up credentials
create Create a new playlist on YouTube Music.
update Delete all entries in the provided Google Play Music playlist and update the playlist with entries from the Spotify playlist.
remove Remove playlists with specified regex pattern.
all Transfer all public playlists of the specified user (Spotify User ID).
options:
-h, --help show this help message and exit
Metadata
Release files for spotify-to-ytmusic 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spotify_to_ytmusic-0.8.0.tar.gz | 32.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotify_to_ytmusic-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.4 kB
Release files / spotify_to_ytmusic-0.8.0.tar.gz
| Download URL | spotify_to_ytmusic-0.8.0.tar.gz |
|---|---|
| Size | 32.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba6b883b13fd4eeae68a0bfc87b5e284d01a84f63c17fe9b919ceb44ebb61181
|
|
BLAKE2b-256 checksum How to use checksums |
659864a54ac58e329538568e1fb887079cf6fea0a218228786f827e5405bbb73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2025.
Transparency logRelease files / spotify_to_ytmusic-0.8.0-py3-none-any.whl
| Download URL | spotify_to_ytmusic-0.8.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f388907407a6b2bde2b9d2bd2d66771417af0eeab9e75e51d5422d0dd6effd3a
|
|
BLAKE2b-256 checksum How to use checksums |
5d6c3b13609d3facb40d57e1a30e2a7f3168bd423fb27df32b15f870cbec7920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2025.
Transparency log