Spdl
Command line tool to download songs from Spotify
Install / Use
/learn @pranjalagg/SpdlREADME
SPDL
Description
This project is a tool that allows users to effortlessly download tracks and playlists fetched from Spotify, complete with metadata and album art.
[!IMPORTANT] Due to the new updates to the API, a token is needed every once in a while. Thus, every time prompted, you'll have to provide the token. Get the token using the below steps:
Go to https://spotidownloader.com/ and open the "Network" tab in the browser devtools (right click > Inspect > navigate to the Network tab or use the key combination:
Ctrl + Shift + I)If you see a lot of things in the Network tab, press
Ctrl + Lto clear all of thoseWhile the Network tab is open, paste any URL of a track from Spotify and press the download button. You will see some activity in the Network tab.
Now, click the download button beside the track name on the UI. You will again see some activity in the Network tab.
(Optional) Filter to only show
fetchrequests (from the "Type" column)Click on the
<img width="831" alt="image" src="https://github.com/user-attachments/assets/fe258188-36d1-4cfe-9d29-740d9b362b98" />fetchrequest that came after clicking the download button in Step 4.Copy only the token part ( ...?token=0.SA6dCVY... ) [Yellow portion of text only in the screenshot below]
<img width="797" alt="image" src="https://github.com/user-attachments/assets/37b9b327-e959-4e90-a411-4c591bb28cbd" /><sub>spdl is currently under development, so please expect frequent changes to the way it works.</sub>
Requirements and Installation
System Requirements:
- Python:
version 3.8or above - Pip package manager (Use
pip --versionto check if you have it, otherwise instructions to install pip can be found here)
Installation:
- Lauch your terminal instance and navigate to the
spdldirectory - Execute
pip install -r requirements.txtto install the dependencies
Usage
To download a track or playlist, run the main file using the following command:
python main.py -link <link to your track or playlist>
Optionally the download directory can be specified using the -outpath flag. If no outpath is provided, downloads default to the current directory.
Example:
python main.py -link "https://open.spotify.com/track/6UVEJw6Ikma86JNK55KPkc?si=78dd2cdb137c4214" -outpath "F:/Songs/"
Note 1: You can paste more than one link one after the other separated by space to download multiple tracks at once Note 2: For playlists, by default the program saves the tracks in a folder with the name of the playlist
Different Use Cases
- Download a single track or playlist:
python main.py -link "https://open.spotify.com/track/6UVEJw6Ikma86JNK55KPkc?si=78dd2cdb137c4214" - Download a single track or playlist at a specified location:
python main.py -link "https://open.spotify.com/track/6UVEJw6Ikma86JNK55KPkc?si=78dd2cdb137c4214" -outpath "F:/Songs" - Download multiple tracks / multiple playlists / or a combination:
python main.py -link "https://open.spotify.com/track/6UVEJw6Ikma86JNK55KPkc?si=78dd2cdb137c4214" "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M?si=9fab95ad8ab349a7" - Download multiple tracks / multiple playlists / or a combination to a specified location:
python main.py -link "https://open.spotify.com/track/6UVEJw6Ikma86JNK55KPkc?si=78dd2cdb137c4214" "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M?si=9fab95ad8ab349a7" -outpath "F:/Songs - Download playlist(s) track in a single folder (default is to make playlist folder(s)):
python main.py -link "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M?si=9fab95ad8ab349a7" -outpath "F:/Songs" -folder False - Download / Sync Spotify playlists with local playlists when sync.json is not present or is in present directory:
python main.py -sync - Download / Sync Spotify playlists with local playlists when sync.json is in a specified directory:
python main.py -sync "F:/Songs/sync.json"
sync.json Structure
The first time you try to run the sync command, the program will ask you for the playlist info and the sync.json will be created automatically. If you wish to manually create a sync.json file or modify the existing one, use the following structure:
[
{
"name": "<Playlist Name 1>",
"link": "<Playlist Link>",
"create_folder": true,
"download_location": "F:/Songs"
},
{
"name": "<Playlist Name 2>",
"link": "<Playlist Link>",
"create_folder": true,
"download_location": "F:/Songs"
}
]
Feedback
I would greatly appreciate your feedback after using the tool. Your insights helps it improve!
Feature Request/Contributions
I would not be able to take in feature requests at this point, but I would love to accept contributions/pull requests if anyone is willing to work on any issue.
Related Skills
node-connect
332.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
81.7kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
81.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
332.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
