Zotify is a great tool for downloading music that is unavailable elsewhere, however the documentation leaves much to be desired. This is a streamlined and smoothed approach to get you up and running in less than 5 minutes. I created a script to automate this entire manula process described below for Windows machines, but it has not been stress tested. It "worked on my machine", use at your own risk. So that's my disclaimer! :D
Zotify is a powerful and customizable music and podcast downloader that allows users to download high-quality audio directly from Spotify. It supports downloading tracks, albums, playlists, and podcasts with features like real-time downloading and synced lyrics. But the documentation has much to be desired. Follow this guide to make your experience much smoother and streamlined.
Before installing Zotify, ensure your system meets the following requirements:
- Python : Version 3.9 or greater.GitHub
- FFmpeg : A complete, cross-platform solution to record, convert, and stream audio and video.
- Git : Version control system to clone repositories.
Ensure these dependencies are installed and accessible in your system’s PATH.
Zotify can be installed using pip. Open your terminal or command prompt and execute:
python -m pip install git+https://zotify.xyz/zotify/zotify.gitThis command installs Zotify and its necessary Python packages.
Zotify requires a credentials.json file for authentication with Spotify. To generate this file, follow these steps:
The librespot-auth tool, used to generate the credentials, is written in Rust. Install Rust using the appropriate method for your operating system:
- Windows : Open PowerShell and run:
choco install rust- macOS : Open Terminal and run:
brew install rust- Linux : Open Terminal and run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shEnsure Rust is added to your system’s PATH after installation.
Some systems may require LLVM for compiling Rust projects. Download and install LLVM from the official releases page:
- LLVM Releases: Download LLVM releases
- Clone and Build
librespot-authUse Git to clone thelibrespot-authrepository and build the project:
git clone https://github.com/dspearson/librespot-auth.git
cd librespot-auth
cargo build --releaseThis process compiles the librespot-auth tool, which will be used to generate the Spotify credentials.
d. Generate credentials.json
- Ensure the Spotify client application is closed.
- Navigate to the
librespot-authbuild directory:
cd target/release/- Run the
librespot-authexecutable:
- Windows :
.\librespot-auth.exe- macOS/Linux :
./librespot-auth- The tool will prompt you to select a device named “Speaker”. Open the Spotify client, click the “Connect to a device” icon (usually located next to the volume bar), and select “Speaker” from the list.
- Upon selection,
librespot-authwill generate acredentials.jsonfile in the same directory. - Modify
credentials.jsonBefore using the credentials with Zotify, modify thecredentials.jsonfile as follows:
- Replace
"auth_type": 1with"type": "AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS". - Rename
"auth_data"to"credentials".
This modification aligns the credentials format with Zotify’s requirements.
3. Place credentials.json in the Zotify Directory
Zotify expects the credentials.json file in a specific directory, which varies by operating system:
- Windows :
%APPDATA%\Zotify\ - macOS :
~/Library/Application Support/Zotify/ - Linux :
~/.config/Zotify/
Create the appropriate directory if it doesn’t exist and place the modified credentials.json file there.
With Zotify installed and configured, you can now download music and podcasts directly from Spotify. Use the following command structure:
zotify --download-quality very_high --download-real-time=True <Spotify_URL><Spotify_URL>: Replace with the URL of the Spotify track, album, playlist, or podcast you wish to download.
Options:
-download-quality: Sets the quality of the download. Usevery_highfor the highest quality (up to 320kbps for premium accounts).-download-real-time: When set toTrue, downloads the track in real-time, reducing the risk of account bans. Note that this process takes as long as the track’s duration.
Example:
zotify --download-quality very_high --download-real-time=True https://open.spotify.com/track/4aSGokf2n9W6aQiOwoit7A?si=7f1d844035964aee
::contentReference[oaicite:84]{index=84}This command downloads the specified track in the highest quality available, playing it in real-time to minimize account risks.