Download songs from JioSaavn
Project description
saavn-dlp
Download songs, albums, playlists, and artist discographies from JioSaavn.
Outputs high-quality AAC audio in M4A containers. No dependencies outside the Python standard library.
Requirements
- Python 3.10+
- ffmpeg (optional) — for playback or conversion; not required for downloading
Installation
pip install saavn-dlp
Usage
saavn-dlp [options] <url> [url...]
Download a single song
saavn-dlp "https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk"
Download at a specific bitrate
saavn-dlp --bitrate 320 "https://www.jiosaavn.com/song/chuttamalle/P1FfWjZkQ0Q"
Download an entire album
saavn-dlp --output-dir "./music" "https://www.jiosaavn.com/album/96/buIOjYZDrNA_"
Download a playlist
saavn-dlp "https://www.jiosaavn.com/s/playlist/2279fbe391defa793ad7076929a2f5c9/mood-english/LlJ8ZWT1ibN5084vKHRj2Q__"
Download all songs by an artist
saavn-dlp --output-dir "./krsna" "https://www.jiosaavn.com/artist/krsna-songs/rYLBEve2z3U_"
Options
| Option | Description | Default |
|---|---|---|
urls |
One or more JioSaavn URLs to download (song, album, playlist, or artist) | required |
-q, --quiet |
Suppress progress output | off |
--bitrate |
Preferred bitrate(s) in kbps. Tried in order; first successful one is used | 128 320 |
-o, --output |
Output filename template. Supports %(title)s, %(id)s, %(ext)s |
%(title)s-%(id)s.%(ext)s |
--output-dir |
Directory to save downloaded files | . |
-v, --verbose |
Show full error tracebacks | off |
--list-extractors |
List all supported URL patterns and exit | |
--write-info-json |
Write song metadata as a .info.json file alongside the audio |
off |
Bitrate values
Valid choices: 16, 32, 64, 128, 320
You can pass multiple values. The first bitrate that successfully generates an auth token will be used:
saavn-dlp --bitrate 320 128 64 "https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk"
Output template
The default template %(title)s-%(id)s.%(ext)s produces filenames like Leja_Re-IcoLuefJ.m4a.
Available fields:
%(title)s— song title (special characters stripped)%(id)s— internal JioSaavn song ID%(ext)s— file extension (m4a)
Output
Files are downloaded as M4A (AAC audio in MP4 container). Bitrate depends on the --bitrate option and what JioSaavn makes available for the track.
When --write-info-json is used, a companion .info.json file is written with full metadata:
{
"id": "IcoLuefJ",
"title": "Leja Re",
"album": "Leja Re",
"artists": ["Sandesh Shandilya", "Dhvani Bhanushali", "Tanishk Bagchi"],
"duration": 205,
"language": "hindi",
"release_year": 2018,
"thumbnail": "https://c.saavncdn.com/258/...-500x500.jpg",
"view_count": 132113875,
"channel": "T-Series"
}
Supported URLs
| Type | Pattern | Example |
|---|---|---|
| Song | jiosaavn.com/song/.../<id> |
https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk |
| Song (legacy) | saavn.com/s/song/.../<id> |
https://www.saavn.com/s/song/hindi/Saathiya/O-Humdum-Suniyo-Re/KAMiazoCblU |
| Album | jiosaavn.com/album/.../<id> |
https://www.jiosaavn.com/album/96/buIOjYZDrNA_ |
| Playlist | jiosaavn.com/s/playlist/.../.../<id> |
https://www.jiosaavn.com/s/playlist/.../mood-english/LlJ8ZWT1ibN5084vKHRj2Q__ |
| Featured | jiosaavn.com/featured/.../<id> |
https://www.jiosaavn.com/featured/taaza-tunes/Me5RridRfDk_ |
| Artist | jiosaavn.com/artist/...-songs/<id> |
https://www.jiosaavn.com/artist/krsna-songs/rYLBEve2z3U_ |
Programmatic use
from saavn_dlp import SaavnDL
svdl = SaavnDL({'bitrate': ['320'], 'quiet': True})
# Extract metadata
info = svdl.extract_info('https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk')
print(info['title'], info['artists'])
# Download to current directory
svdl.download(['https://www.jiosaavn.com/song/leja-re/OQsEfQFVUXk'])
How it works
saavn-dlpcalls JioSaavn's internal API (webapi.get) to fetch song metadata — title, artist, album, and an encrypted media URL.- It then calls
song.generateAuthTokenwith that encrypted URL and your chosen bitrate to obtain a signed, time-limited CDN URL. - The audio is downloaded from JioSaavn's CDN and saved as an M4A file.
- Downloads can be resumed if interrupted — partial files use a
.partextension until complete.
License
The Unlicense — public domain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file saavn_dlp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: saavn_dlp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ddbdedd6f55dbc9f40a6bf0dc5217f041ec7d09f7130eb327ff8c46b355c234
|
|
| MD5 |
d004874b6b0b659fd0da3b95efbb0c17
|
|
| BLAKE2b-256 |
413dde676cb9f52c02bca4949454110fefe9221a4bff0c14ef3bab1c57b671c9
|