Skip to main content

Download your Spotify playlists and songs along with album art and metadata

Project description

logo

spotDL

The fastest, easiest, and most accurate command-line music downloader

MIT License Contributors downloads BCH compliance pypi version pypi version pypi downloads Discord GitHub commits since latest release (by date)

What spotDL does:

  1. Downloads music from YouTube as an MP3 file
  2. Applies basic metadata gathered from Spotify such as:
    • Track Name
    • Track Number
    • Album
    • Album Cover
    • Genre
    • and more!

Announcing spotDL v3

We rebuilt spotDL from scratch to be faster, simpler, and better than spotDL v2. Documentation is still a work in progress.

⚠ We have dropped the active development of spotDL v2 due to support and maintainability. No focused efforts will be made to resolve v2 specific issues.

Join the spotDL Discord!!

Installation

You need to download FFmpeg to use this tool. Download and installation instructions can be found at FFmpeg.org

Installing spotDL

  • Recommended Stable Version:

    $ pip install spotdl
    
  • Install directly from master: (Use if experiencing issues)

    $ pip install https://codeload.github.com/spotDL/spotify-downloader/zip/master
    
  • Dev Version: (NOT STABLE)

    $ pip install https://codeload.github.com/spotDL/spotify-downloader/zip/dev
    

On Termux:

curl -L https://github.com/spotDL/spotify-downloader/raw/master/termux/setup_spotdl.sh | sh

YouTube Music must be available in your country for spotDL to work. This is because we use YouTube Music to filter search results. You can check if YouTube Music is available in your country, by visiting YouTube Music.

Usage (Instructions for v3)

  • To download a song, run:

    $ spotdl [trackUrl]
    

    ex. spotdl https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b?si=1stnMF5GSdClnIEARnJiiQ

  • To download an album, run:

    $ spotdl [albumUrl]
    

    ex. spotdl https://open.spotify.com/album/4yP0hdKOZPNshxUOjY0cZj?si=AssgQQrVTJqptFe7X92jNg

  • To download a playlist, run:

    $ spotdl [playlistUrl]
    

    ex. spotdl https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID?si=oGd5ctlyQ0qblj_bL6WWow

  • To search for and download a song, run, with quotation marks:
    Note: This is not accurate and often causes errors.

    $ spotdl '[songQuery]'
    

    ex. spotdl 'The Weeknd - Blinding Lights'

  • To resume a failed/incomplete download, run:

    $ spotdl [pathToTrackingFile]
    

    ex. spotdl 'The Weeknd - Blinding Lights.spotdlTrackingFile'

    .spotdlTrackingFiles are automatically created when a download starts and deleted on completion

You can queue up multiple download tasks by separating the arguments with spaces:

$ spotdl [songQuery1] [albumUrl] [songQuery2] ... (order does not matter)

ex. spotdl 'The Weeknd - Blinding Lights' https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID?si=oGd5ctlyQ0qblj_bL6WWow ...

spotDL downloads up to 4 songs in parallel, so for a faster experience, download albums and playlist, rather than tracks.

pipx Isolated Environment Alternative

For users who are not familiar with pipx, it can be used to run scripts without installing the spotDL package and all the dependencies globally with pip. (Effectively skipping over the Installation step)

First, you will need to install pipx by running:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Next, you can jump directly to running spotDL with:

pipx run spotdl ...

For Developers and Contributors

  1. Clone this repository
    $ git clone https://github.com/spotDL/spotify-downloader.git
    $ cd spotify-downloader
    
  2. Setup venv (Optional)
    • Windows
      $ py -3 -m venv env
      $ .\.venv\Scripts\activate
      
    • Linux/macOS
      $ python3 -m venv .venv
      $ source .venv/bin/activate
      
  3. Install requirements
    $ pip install -e .
    
  • Use as command (no need to re-install after file changes)
    $ spotdl [ARGUMENTS]
    

Thank Yous

  1. @ritiek for creating and maintaining spotDL for 4 years
  2. @rocketinventor for figuring out YouTube Music querying
  3. @MikhailZex for, never mind...

Project details


Release history Release notifications | RSS feed

This version

3.5.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotdl-3.5.1.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotdl-3.5.1-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file spotdl-3.5.1.tar.gz.

File metadata

  • Download URL: spotdl-3.5.1.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for spotdl-3.5.1.tar.gz
Algorithm Hash digest
SHA256 55fc75c13f35fed3ceb6003b879d8ce8cca8c10b3ad2d26966da84eea8ee6620
MD5 f4d44bb4dd40f81f441e48710f57e950
BLAKE2b-256 ea894c423fc5ba90f1c00eac8dff8efee43726015d9a285ad717559e879e2b85

See more details on using hashes here.

File details

Details for the file spotdl-3.5.1-py3-none-any.whl.

File metadata

  • Download URL: spotdl-3.5.1-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for spotdl-3.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c589b69318e56cb420defd36ccf312f92ad769b586f7658c5ecae4cbed5400d
MD5 c2aaba4b8a528ecc796e0c3ecbc728c0
BLAKE2b-256 866f075434ae4ce8144eb18a911f852376f913b2ad707119944a5efd5710a23d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page