### Run Example Source: https://pypi.org/project/jiosaavnpy This is a simple example of how to run a function within the library. ```python explore_album() ``` -------------------------------- ### Install jiosaavnpy Source: https://pypi.org/project/jiosaavnpy Install the jiosaavnpy library using pip. ```bash pip install jiosaavnpy ``` -------------------------------- ### Usage Example: Get Song Information Source: https://pypi.org/project/jiosaavnpy Retrieves and displays detailed information for a specific song using its track ID. Includes title, artist, album, duration, and release year. ```python 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() ``` -------------------------------- ### Usage Example: Search for Songs Source: https://pypi.org/project/jiosaavnpy Demonstrates how to search for songs by a given query and display the title and primary artists for each result. Prompts the user for input. ```python 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() ``` -------------------------------- ### Quick Start: Initialize Client and Search Songs Source: https://pypi.org/project/jiosaavnpy Initialize the JioSaavn client and perform a basic song search. Displays the title and primary artists of the first result. ```python 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" ``` -------------------------------- ### Get Album Information Source: https://pypi.org/project/jiosaavnpy Retrieve detailed information about a specific album using its unique album ID. ```python album_info(album_id) ``` -------------------------------- ### Get Home Page Data Source: https://pypi.org/project/jiosaavnpy Retrieve detailed home page data, including trending content, top playlists, albums, and charts, for a specified language. ```python get_home(language) ``` -------------------------------- ### Get Song Information Source: https://pypi.org/project/jiosaavnpy Retrieve detailed information about a specific song using its unique track ID. ```python song_info(track_id) ``` -------------------------------- ### Usage Example: Explore Album Information Source: https://pypi.org/project/jiosaavnpy Searches for an album by name, retrieves its details using the album ID, and then lists all tracks within that album. Displays album name, artist, and track count. ```python 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']}") ``` -------------------------------- ### Get Playlist Information Source: https://pypi.org/project/jiosaavnpy Retrieve detailed information about a specific playlist using its unique playlist ID. ```python playlist_info(playlist_id) ``` -------------------------------- ### Get Artist Information Source: https://pypi.org/project/jiosaavnpy Retrieve detailed information about a specific artist using their unique artist token. You can also specify limits for top songs and albums to include. ```python artist_info(artist_token, song_limit=5, album_limit=5) ``` -------------------------------- ### Song Object Structure Source: https://pypi.org/project/jiosaavnpy This is an example of the JSON structure returned for a Song Object, containing metadata such as track ID, title, artists, album, duration, and stream URLs. ```json { "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" } } ``` -------------------------------- ### Get Similar Songs Source: https://pypi.org/project/jiosaavnpy Find songs that are related to a given track based on its track ID. ```python similar_songs(track_id) ``` -------------------------------- ### get_home Source: https://pypi.org/project/jiosaavnpy Fetches detailed home page data, including new trending content, top playlists, albums, and charts, for a specified language. ```APIDOC ## get_home(language) ### Description Get detailed home page data (new trending, top playlists & albums, charts) based on the `language`. ### Parameters #### Path Parameters * None #### Query Parameters * **language** (str) - Required - The language to return home data in. Example: `english`, `tamil` (Case Sensitive!). ### Request Example ```json { "language": "english" } ``` ### Response #### Success Response * Returns a dictionary with home page data. ``` -------------------------------- ### Search Playlists Source: https://pypi.org/project/jiosaavnpy Use this method to search for playlists by name or description. You can specify the number of results to return. ```python search_playlists(search_query, limit=5) ``` -------------------------------- ### Search Albums Source: https://pypi.org/project/jiosaavnpy Use this method to search for albums by name or artist. You can specify the number of results to return. ```python search_albums(search_query, limit=5) ``` -------------------------------- ### Search Artists Source: https://pypi.org/project/jiosaavnpy Use this method to search for artists by name. You can specify the number of results to return. ```python search_artists(search_query, limit=5) ``` -------------------------------- ### search_playlists Source: https://pypi.org/project/jiosaavnpy Searches for playlists by name or description, returning a list of playlist dictionaries. The number of results can be limited. ```APIDOC ## search_playlists(search_query, limit=5) ### Description Search for playlists by name or description. ### Parameters #### Path Parameters * None #### Query Parameters * **search_query** (str) - Required - Playlist name to search for. * **limit** (int) - Optional - Number of results to return (default: 5). ### Request Example ```json { "search_query": "Chill Vibes", "limit": 4 } ``` ### Response #### Success Response * Returns a list of playlist dictionaries. ``` -------------------------------- ### Search Songs Source: https://pypi.org/project/jiosaavnpy Use this method to search for songs by name, artist, or lyrics. You can specify the number of results to return. ```python search_songs(search_query, limit=5) ``` -------------------------------- ### album_info Source: https://pypi.org/project/jiosaavnpy Retrieves detailed information about a specific album using its album ID. ```APIDOC ## album_info(album_id) ### Description Get detailed information about a specific album. ### Parameters #### Path Parameters * None #### Query Parameters * **album_id** (str) - Required - Unique identifier for the album. ### Request Example ```json { "album_id": "26553699" } ``` ### Response #### Success Response * Returns a dictionary with album information and track list. ``` -------------------------------- ### song_info Source: https://pypi.org/project/jiosaavnpy Retrieves detailed information about a specific song using its track ID. ```APIDOC ## song_info(track_id) ### Description Get detailed information about a specific song. ### Parameters #### Path Parameters * None #### Query Parameters * **track_id** (str) - Required - Unique identifier for the track. ### Request Example ```json { "track_id": "e0kCEwoC" } ``` ### Response #### Success Response * Returns a dictionary with comprehensive song information. ``` -------------------------------- ### playlist_info Source: https://pypi.org/project/jiosaavnpy Retrieves detailed information about a specific playlist using its playlist ID. ```APIDOC ## playlist_info(playlist_id) ### Description Get detailed information about a specific playlist. ### Parameters #### Path Parameters * None #### Query Parameters * **playlist_id** (str) - Required - Unique identifier for the playlist. ### Request Example ```json { "playlist_id": "some_playlist_id" } ``` ### Response #### Success Response * Returns a dictionary with playlist information and track list. ``` -------------------------------- ### search_albums Source: https://pypi.org/project/jiosaavnpy Searches for albums by name or artist, returning a list of album dictionaries. The number of results can be limited. ```APIDOC ## search_albums(search_query, limit=5) ### Description Search for albums by name or artist. ### Parameters #### Path Parameters * None #### Query Parameters * **search_query** (str) - Required - Search term for albums. * **limit** (int) - Optional - Number of results to return (default: 5). ### Request Example ```json { "search_query": "Abbey Road", "limit": 3 } ``` ### Response #### Success Response * Returns a list of album dictionaries. ``` -------------------------------- ### search_artists Source: https://pypi.org/project/jiosaavnpy Searches for artists by name, returning a list of artist dictionaries. The number of results can be limited. ```APIDOC ## search_artists(search_query, limit=5) ### Description Search for artists by name. ### Parameters #### Path Parameters * None #### Query Parameters * **search_query** (str) - Required - Artist name to search for. * **limit** (int) - Optional - Number of results to return (default: 5). ### Request Example ```json { "search_query": "Queen", "limit": 7 } ``` ### Response #### Success Response * Returns a list of artist dictionaries. ``` -------------------------------- ### artist_info Source: https://pypi.org/project/jiosaavnpy Retrieves detailed information about a specific artist using their artist token, including top songs and albums. ```APIDOC ## artist_info(artist_token, song_limit=5, album_limit=5) ### Description Get detailed information about a specific artist. ### Parameters #### Path Parameters * None #### Query Parameters * **artist_token** (str) - Required - 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). ### Request Example ```json { "artist_token": "512102", "song_limit": 10, "album_limit": 3 } ``` ### Response #### Success Response * Returns a dictionary with artist information, top songs, and albums. ``` -------------------------------- ### similar_songs Source: https://pypi.org/project/jiosaavnpy Retrieves a list of songs that are similar to a given track, based on its track ID. ```APIDOC ## similar_songs(track_id) ### Description Get related songs based on its `track_id`. ### Parameters #### Path Parameters * None #### Query Parameters * **track_id** (str) - Required - Unique identifier for the track. ### Request Example ```json { "track_id": "e0kCEwoC" } ``` ### Response #### Success Response * Returns a list of similar song dictionaries. ``` -------------------------------- ### search_songs Source: https://pypi.org/project/jiosaavnpy Searches for songs by name, artist, or lyrics, returning a list of song dictionaries with metadata. The number of results can be limited. ```APIDOC ## search_songs(search_query, limit=5) ### Description Search for songs by name, artist, or lyrics. ### Parameters #### Path Parameters * None #### Query Parameters * **search_query** (str) - Required - Search term for songs. * **limit** (int) - Optional - Number of results to return (default: 5). ### Request Example ```json { "search_query": "Bohemian Rhapsody", "limit": 10 } ``` ### Response #### Success Response * Returns a list of song dictionaries with metadata. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.