A fast, lightweight Deezer music downloader written in Rust. Single binary, no runtime dependencies.
- Track download — by URL or Deezer ID
- Playlist download — by URL, ID, or interactive selection from your account
- Favorites download — all your liked/loved tracks
- Artist discography — download every album from an artist, with name search
- Interactive mode — menu-driven TUI when no command is specified
- Quality selection — FLAC, MP3 320kbps, MP3 128kbps with automatic fallback
- Blowfish CBC decryption — handles Deezer's encrypted streams natively
- Skip existing — won't re-download files already on disk
- Progress bars — per-track download progress
- Persistent login — ARL cookie stored in
~/.config/deezer-dl/.arl
git clone https://github.com/youruser/deezer-dl.git
cd deezer-dl
cargo build --releaseThe binary will be at target/release/deezer-dl (approx. 2.5 MB).
- Rust 1.82+ (edition 2024)
- A valid Deezer ARL cookie (see Authentication)
deezer-dl [OPTIONS] [COMMAND]
| Command | Description |
|---|---|
track |
Download a track by URL or ID |
playlist |
Download a playlist by URL or ID |
favorites |
Download your liked/favorite songs |
artist |
Download all songs from an artist |
interactive |
Interactive mode (default when no command) |
logout |
Remove stored login credentials |
| Flag | Description | Default |
|---|---|---|
-o, --output <DIR> |
Output directory | ~/Telechargements/mp3 (interactive) / ./downloads (CLI) |
-q, --quality <QUALITY> |
Audio quality: flac, 320, 128 |
320 |
-h, --help |
Print help | |
-V, --version |
Print version |
# Interactive mode (launches menu)
deezer-dl
# Download a single track
deezer-dl track https://www.deezer.com/en/track/3135556
deezer-dl track 3135556
# Download a playlist
deezer-dl playlist https://www.deezer.com/en/playlist/908622995
# Download all your liked songs in FLAC
deezer-dl -q flac favorites
# Download an artist's full discography
deezer-dl artist "Daft Punk"
deezer-dl artist 27
# Custom output directory
deezer-dl -o ~/Music -q flac artist "Radiohead"deezer-dl uses Deezer's ARL cookie for authentication. To obtain it:
- Log in to deezer.com in your browser
- Open Developer Tools (
F12) - Go to Application > Cookies >
https://www.deezer.com - Copy the value of the
arlcookie
On first launch, the CLI will prompt you to enter your ARL. It is then stored locally at ~/.config/deezer-dl/.arl for subsequent sessions.
To clear your credentials:
deezer-dl logoutsrc/
main.rs CLI entry point, argument parsing, interactive mode
api.rs Deezer GW (internal) API + public API + media URL client
auth.rs ARL-based login, persistent credential storage
crypto.rs Blowfish CBC decryption, AES-128-ECB stream path, key generation
download.rs Track/playlist/favorites/artist download orchestration
models.rs Data structures (tracks, playlists, albums, formats)
- GW API:
http://www.deezer.com/ajax/gw-light.php— internal API for track metadata, playlists, user data - Public API:
https://api.deezer.com— artist search, track info - Media API:
https://media.deezer.com/v1/get_url— authenticated track stream URLs - Decryption: Blowfish CBC with per-track key derived from
MD5(track_id) XOR secret, IV[0,1,2,3,4,5,6,7] - Stream format: every 6144 bytes (2048 * 3), the first 2048 bytes are Blowfish-encrypted
- Rust (edition 2024)
- tokio — async runtime
- reqwest — HTTP client with cookie jar
- clap — CLI argument parsing
- dialoguer — interactive prompts and selection menus
- indicatif — progress bars
- blowfish / cbc — stream decryption
- aes — AES-128-ECB for URL path generation
- md-5 — MD5 hashing for key derivation
MIT