Skip to main content

🎶 jiosaavnpy: Unofficial JioSaavn API Client

Python Version License PyPI Version

A Python 3 library for accessing JioSaavn's music catalog through their unofficial API. This library emulates JioSaavn web client requests without requiring authentication.

📖 Table Of Contents

✨ Features

🔍 Search Capabilities

  • Songs: Search for songs with customizable result limits.
  • Albums: Search for albums with customizable result limits.
  • Artists: Search for artists with customizable result limits.
  • Playlists: Search for playlists with customizable result limits.

📊 Entity Information

  • Song Details: Get comprehensive track information.
  • Album Information: Retrieve album metadata and track listings.
  • Artist Profiles: Access artist details, top songs, and albums.
  • Playlist Contents: Fetch playlist metadata and track lists.

🎵 Audio Streaming

  • Multiple quality options (48kbps to 320kbps).
  • Direct streaming URLs for all tracks.
  • Thumbnail images in various resolutions (50x50, 150x150, 500x500).

📋 Requirements

  • Python 3.7 or higher.
  • Internet connection for API requests.

🔨 Installation

pip install jiosaavnpy

🚀 Quick Start

from jiosaavnpy import JioSaavn

# Initialize the client
jio = JioSaavn()

# Search for songs
results = jio.search_songs("Never gonna give you up", limit=5)
print(results[0]['title'])  # "Never Gonna Give You Up"
print(results[0]['primary_artists'])  # "Rick Astley"

📖 Usage Examples

Searching for Songs

from jiosaavnpy import JioSaavn

def search_songs_example():
    """Search for songs and display results."""
    jio = JioSaavn()
    
    query = input("Enter song name: ")
    results = jio.search_songs(query, limit=10)
    
    for i, song in enumerate(results, 1):
        print(f"{i}. {song['title']} - {song['primary_artists']}")
    return results

# Run the example
songs = search_songs_example()

Getting Song Information

from jiosaavnpy import JioSaavn

def get_song_details():
    """Retrieve detailed information about a specific song."""
    jio = JioSaavn()
    
    # Use track_id from search results
    track_id = "e0kCEwoC"  # Never Gonna Give You Up
    song_info = jio.song_info(track_id)
    
    print(f"Title: {song_info['title']}")
    print(f"Artist: {song_info['primary_artists']}")
    print(f"Album: {song_info['album_name']}")
    print(f"Duration: {song_info['duration']} seconds")
    print(f"Year: {song_info['release_year']}")
    
    return song_info

# Run the example
details = get_song_details()

Working with Albums

from jiosaavnpy import JioSaavn

def explore_album():
    """Search for albums and get detailed information."""
    jio = JioSaavn()
    
    # Search for albums
    albums = jio.search_albums("Whenever You Need Somebody", limit=3)
    
    if albums:
        album_id = albums[0]['album_id']
        album_details = jio.album_info(album_id)
        
        print(f"Album: {album_details['album_name']}")
        print(f"Artist: {album_details['primary_artists']}")
        print(f"Tracks: {len(album_details['tracks'])}")
        
        # List all tracks
        for track in album_details['tracks']:
            print(f"  - {track['title']}")

# Run the example
explore_album()

Check out examples for more usage examples.

📚 API Reference

Search Methods

search_songs(search_query, limit=5)

Search for songs by name, artist, or lyrics.

Parameters:

  • search_query (str): Search term for songs.
  • limit (int, optional): Number of results to return (default: 5).

Returns: List of song dictionaries with metadata.

search_albums(search_query, limit=5)

Search for albums by name or artist.

Parameters:

  • search_query (str): Search term for albums.
  • limit (int, optional): Number of results to return (default: 5).

Returns: List of album dictionaries.

search_artists(search_query, limit=5)

Search for artists by name.

Parameters:

  • search_query (str): Artist name to search for.
  • limit (int, optional): Number of results to return (default: 5).

Returns: List of artist dictionaries.

search_playlists(search_query, limit=5)

Search for playlists by name or description.

Parameters:

  • search_query (str): Playlist name to search for.
  • limit (int, optional): Number of results to return (default: 5).

Returns: List of playlist dictionaries.

Information Methods

song_info(track_id)

Get detailed information about a specific song.

Parameters:

  • track_id (str): Unique identifier for the track

Returns: Dictionary with comprehensive song information

album_info(album_id)

Get detailed information about a specific album.

Parameters:

  • album_id (str): Unique identifier for the album

Returns: Dictionary with album information and track list

artist_info(artist_token, song_limit=5, album_limit=5)

Get detailed information about a specific artist.

Parameters:

  • artist_token (str): Unique identifier for the artist
  • song_limit (int, optional): Number of top songs to include (default: 5)
  • album_limit (int, optional): Number of top albums to include (default: 5)

Returns: Dictionary with artist information, top songs, and albums

playlist_info(playlist_id)

Get detailed information about a specific playlist.

Parameters:

  • playlist_id (str): Unique identifier for the playlist

Returns: Dictionary with playlist information and track list

Other Methods

similar_songs(track_id)

Get related songs based on its track_id.

Parameters:

  • track_id (str): Unique identifier for the track.

get_home(language)

Get detailed home page data (new trending, top playlists & albums, charts) based on the language.

Parameters:

  • language (str): The language to return home data in. Example: english, tamil (Case Sensitive!)

Returns: Dictionary with home page data.

📋 Response Format

Song Object

{
  "track_id": "e0kCEwoC",
  "title": "Never Gonna Give You Up",
  "primary_artists": "Rick Astley",
  "primary_artists_ids": "512102",
  "album_name": "Whenever You Need Somebody",
  "album_id": "26553699",
  "duration": "213",
  "release_year": "1987",
  "track_language": "english",
  "play_count": "199567",
  "is_explicit": false,
  "thumbnails": {
    "quality": {
      "50x50": "https://c.saavncdn.com/...",
      "150x150": "https://c.saavncdn.com/...",
      "500x500": "https://c.saavncdn.com/..."
    }
  },
  "stream_urls": {
    "low_quality": "https://aac.saavncdn.com/...48.mp4",
    "medium_quality": "https://aac.saavncdn.com/...96.mp4",
    "high_quality": "https://aac.saavncdn.com/...160.mp4",
    "very_high_quality": "https://aac.saavncdn.com/...320.mp4"
  }
}

⚠️ Important Notes

  • Unofficial API: This library uses JioSaavn's internal API endpoints and is not officially supported.
  • Geographic Restrictions: Non-English tracks may not be available when accessed from non-Indian IP addresses.
  • Rate Limits: There are no known rate limits as of now (?).

🤝 Contributing

Contributions are welcome! There may be certain endpoints which have not been fully covered yet.

Metadata

Release files for jiosaavnpy 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jiosaavnpy 0.1.3
File Size Uploaded Provenance Actions
jiosaavnpy-0.1.3.tar.gz 35.1 kB Without provenance Details for jiosaavnpy-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jiosaavnpy 0.1.3
File Interpreter ABI Platform Actions
jiosaavnpy-0.1.3-py3-none-any.whl Python 3 none any Details for jiosaavnpy-0.1.3-py3-none-any.whl

Total release size: 72.2 kB

Release files / jiosaavnpy-0.1.3.tar.gz

Download URL jiosaavnpy-0.1.3.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6b78aa8662be6e8f365a0a4483f8062bff809d05cb10caadaa8688eaa7369bbf
BLAKE2b-256 checksum
How to use checksums
8620622ce475b712bbc8df1eadd929477769c23bdb93d5f8cdea217c6ecc4573
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / jiosaavnpy-0.1.3-py3-none-any.whl

Download URL jiosaavnpy-0.1.3-py3-none-any.whl
Size 37.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4632349fb0d390b37e29d0afdc2a2fea22c1fa6c7d2fee9c9f09fd0a41280bdd
BLAKE2b-256 checksum
How to use checksums
68f22152e54aac2a3d2e56a56a2cf45efb1e3e2b8fa72ae17ba5e56a27462058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Security for jiosaavnpy 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page