A simple CLI tool to download songs from Spotify playlists to MP3 format using YouTube
This tool combines several APIs to achieve seamless playlist downloading:
- Spotify API - to get playlist contents
- YouTube Search API - to find matching songs
- yt-dlp - to download songs from YouTube in MP3 format
- 🎵 Download entire Spotify playlists as MP3 files
- 🏷️ Automatic MP3 tagging with song metadata
- 🔍 Smart YouTube search matching
- 🎛️ Configurable album tagging
- 🚀 Fast concurrent downloads
- 📋 Mock mode for testing without downloading
git clone https://github.com/ang3lkar/spoti3.git
cd spoti3
npm installCreate a .env file in the project root:
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
YOUTUBE_API_KEY=your_youtube_api_key- Spotify: Visit Spotify Developer Dashboard
- YouTube: Visit Google Cloud Console and enable YouTube Data API v3
# Download playlist to MP3
npm run start <spotify_playlist_url>
npm run start <spotify_album_url>
npm run start <spotify_track_url>
# Example
npm run start https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5MNote: playlists made by Spotify are not always available to download.
spoti3 mp3 [options] <playlistUrl>
Options:
-m, --mock Mock mode - show commands without downloading
-a, --album-tag Set custom album name (defaults to playlist name)
-f, --force Force download all tracks (ignore existing files)
-h, --help Show help information# Mock run to see what would be downloaded
spoti3 mp3 --mock https://open.spotify.com/playlist/...
# Custom album name
spoti3 mp3 --album-tag "My Favorite Songs" https://open.spotify.com/playlist/...
# Force re-download existing files
spoti3 mp3 --force https://open.spotify.com/playlist/..."yt-dlp not found"
# Install yt-dlp
pip install yt-dlp
# or
brew install yt-dlp"ffmpeg not found"
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Windows
# Download from https://ffmpeg.org/download.htmlRate limit errors
- YouTube API has daily quotas (100 songs/day)
- Consider getting a higher quota from Google Cloud Console
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the ISC License - see the LICENSE file for details.
This tool is for educational purposes. Please respect:
- Artist and label copyrights
- Platform terms of service
- Local laws regarding media downloading
- yt-dlp for YouTube downloading
- Spotify Web API for playlist data
- YouTube Data API for video search