### Install jiosaavn-python using pip Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md This command installs the jiosaavn-python library using pip, making it available for use in your Python projects. Ensure you have pip installed and configured. ```bash pip install jiosaavn-python ``` -------------------------------- ### Get Featured Playlists Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves curated playlists featured on JioSaavn's homepage with pagination support. ```APIDOC ## GET /featured-playlists ### Description Retrieves curated playlists featured on JioSaavn's homepage with pagination support. ### Method GET ### Endpoint `/featured-playlists` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results to return per page. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_featured_playlists(page=1, limit=2)) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (array) - An array of playlist objects, each containing listname and perma_url. #### Response Example ```json { "status": 200, "data": [ {"listname": "Playlist Name", "perma_url": "...", ...} ] } ``` ``` -------------------------------- ### Get Song Lyrics Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves lyrics for a specific song if available on JioSaavn. ```APIDOC ## GET /songs/{id_or_url}/lyrics ### Description Retrieves lyrics for a specific song if available on JioSaavn. ### Method GET ### Endpoint `/songs/{id_or_url}/lyrics` ### Parameters #### Path Parameters - **id_or_url** (string) - Required - The ID or URL of the song. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_song_lyrics("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (object) - An object containing the lyrics and snippet. #### Response Example ```json { "status": 200, "data": {"lyrics": "...", "snippet": "...", ...} } ``` ``` -------------------------------- ### Get Top Artists Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves the list of top/trending artists on JioSaavn. ```APIDOC ## GET /top-artists ### Description Retrieves the list of top/trending artists on JioSaavn. ### Method GET ### Endpoint `/top-artists` ### Parameters None ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_top_artists()) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (array) - An array of artist objects, each containing artistid and name. #### Response Example ```json { "status": 200, "data": [ {"artistid": "...", "name": "Artist Name", ...} ] } ``` ``` -------------------------------- ### Get Song Details Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Fetches detailed information about a specific song. Accepts either a JioSaavn URL or a song ID as input. ```APIDOC ## GET /songs/{id_or_url} ### Description Fetches detailed information about a specific song. Accepts either a JioSaavn URL or a song ID as input. ### Method GET ### Endpoint `/songs/{id_or_url}` ### Parameters #### Path Parameters - **id_or_url** (string) - Required - The ID or URL of the song. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() # Using URL data_url = asyncio.run(saavn.get_song_details("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) # Using song ID data_id = asyncio.run(saavn.get_song_details("RBpGRidYdVI")) print(data_url) print(data_id) ``` ### Response #### Success Response (200) - **songs** (array) - An array of song objects, each containing song ID, title, and more_info. #### Response Example ```json { "songs": [ {"id": "...", "title": "Srivalli", "more_info": {...}, ...} ] } ``` ``` -------------------------------- ### Get Artist's Top Songs Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Fetches the top songs from a specific artist. Accepts either an artist URL or ID. ```APIDOC ## GET /artists/{id_or_url}/songs ### Description Fetches the top songs from a specific artist. Accepts either an artist URL or ID. ### Method GET ### Endpoint `/artists/{id_or_url}/songs` ### Parameters #### Path Parameters - **id_or_url** (string) - Required - The ID or URL of the artist. #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results to return per page. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_artist_top_songs("https://www.jiosaavn.com/artist/allu-arjun-songs/BGi8EcKdZXk_", page=1, limit=2)) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (array) - An array of song objects, each containing song ID and title. #### Response Example ```json { "status": 200, "data": [ {"id": "...", "title": "Song Name", ...} ] } ``` ``` -------------------------------- ### Get Song Direct Download Link Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Returns a direct download URL for a song in the highest available quality (320kbps if available, otherwise 128kbps). ```APIDOC ## GET /songs/{id_or_url}/download ### Description Returns a direct download URL for a song in the highest available quality. ### Method GET ### Endpoint `/songs/{id_or_url}/download` ### Parameters #### Path Parameters - **id_or_url** (string) - Required - The ID or URL of the song. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() download_url = asyncio.run(saavn.get_song_direct_link("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(download_url) ``` ### Response #### Success Response (200) - **download_url** (string) - The direct download URL for the song. #### Response Example ``` "https://aac.saavncdn.com/..." ``` ``` -------------------------------- ### Search Podcasts using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Searches for podcasts on JioSaavn based on a search term. The output is a JSON object detailing the podcasts found. The example utilizes `asyncio` for asynchronous execution. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_podcasts("Krishan")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get New Releases Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves newly released albums from JioSaavn with pagination support. Returns album data including titles, artists, images, and release information. ```APIDOC ## GET /new-releases ### Description Retrieves newly released albums from JioSaavn with pagination support. ### Method GET ### Endpoint `/new-releases` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results to return per page. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_new_releases(page=1, limit=2)) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (array) - An array of album objects, each containing title, artist, image, and release information. #### Response Example ```json { "status": 200, "data": [ {"title": "Album Name", "artist": "Artist Name", ...} ] } ``` ``` -------------------------------- ### Get Top Charts Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Returns the current top charts from JioSaavn including trending songs and albums. ```APIDOC ## GET /top-charts ### Description Returns the current top charts from JioSaavn including trending songs and albums. ### Method GET ### Endpoint `/top-charts` ### Parameters None ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_top_charts()) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (array) - An array of chart objects, each containing title and perma_url. #### Response Example ```json { "status": 200, "data": [ {"title": "Chart Name", "perma_url": "...", ...} ] } ``` ``` -------------------------------- ### Get Playlist Songs Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Fetches songs from a specific playlist. Accepts either a JioSaavn playlist URL or playlist ID. ```APIDOC ## GET /playlists/{id_or_url} ### Description Fetches songs from a specific playlist. Accepts either a JioSaavn playlist URL or playlist ID. ### Method GET ### Endpoint `/playlists/{id_or_url}` ### Parameters #### Path Parameters - **id_or_url** (string) - Required - The ID or URL of the playlist. #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results to return per page. ### Request Example ```python import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_playlist_songs("https://www.jiosaavn.com/featured/the-landers/2-aGcw5eLvQwkg5tVhI3fw__", page=1, limit=2)) print(data) ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **data** (object) - An object containing playlist details and an array of songs. #### Response Example ```json { "status": 200, "data": {"listname": "...", "songs": [...], ...} } ``` ``` -------------------------------- ### Get Top Artists from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves a list of top artists from JioSaavn. This function uses `asyncio` for asynchronous fetching of artist data. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_top_artists()) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Featured Playlists from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Fetches a list of featured playlists from JioSaavn. This function supports pagination and limiting results, and it requires `asyncio` for asynchronous execution. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_featured_playlists(page=1, limit=2)) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Song Direct Download Link from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Obtains a direct download link for a song from JioSaavn. The function takes a song ID or URL as input and uses `asyncio` for asynchronous processing. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_song_direct_link("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get New Releases from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves a list of new releases from JioSaavn. This function supports pagination and limiting the number of results. It requires the `jiosaavn` library and `asyncio` for asynchronous execution. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_new_releases(page=1, limit=2)) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Song Details from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves detailed information about a song from JioSaavn. This function accepts a song ID or URL and utilizes `asyncio` for asynchronous fetching. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_song_details("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Top Charts from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Fetches the current top charts from JioSaavn. This function utilizes `asyncio` for asynchronous retrieval of chart data. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_top_charts()) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Song Direct Download Link (Python) Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Obtains a direct download URL for a song in the highest available quality (320kbps or 128kbps). This function utilizes the 'jiosaavn' library and 'asyncio', accepting either a song URL or ID. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() download_url = asyncio.run(saavn.get_song_direct_link("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(download_url) ``` -------------------------------- ### Get Song Details from JioSaavn (Python) Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves detailed information for a specific song using either its JioSaavn URL or song ID. This function requires the 'jiosaavn' library and 'asyncio'. The output includes song details like ID, title, and more info. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() # Using URL data = asyncio.run(saavn.get_song_details("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) # Or using song ID data = asyncio.run(saavn.get_song_details("RBpGRidYdVI")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Song Lyrics from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Fetches the lyrics for a specific song from JioSaavn. You can provide either the song's ID or its direct URL. This function uses `asyncio` for asynchronous operations. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_song_lyrics("https://www.jiosaavn.com/song/srivalli/RBpGRidYdVI")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Songs from a JioSaavn Playlist (Python) Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Fetches all songs contained within a specific JioSaavn playlist, using either the playlist URL or ID. This asynchronous function requires the 'jiosaavn' library and 'asyncio', and supports pagination. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_playlist_songs( "https://www.jiosaavn.com/featured/the-landers/2-aGcw5eLvQwkg5tVhI3fw__", page=1, limit=2 )) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Playlist Songs from JioSaavn Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves songs belonging to a specific playlist from JioSaavn. You can provide the playlist's URL, ID, or link. This function supports pagination and limiting results, using `asyncio` for asynchronous operations. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_playlist_songs("https://www.jiosaavn.com/featured/the-landers/2-aGcw5eLvQwkg5tVhI3fw__", page=1, limit=2)) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Artist's Top Songs from JioSaavn (Python) Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Retrieves the top songs for a specific artist, accepting either an artist URL or ID. This function uses the 'jiosaavn' library and 'asyncio', and supports pagination for results. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_artist_top_songs( "https://www.jiosaavn.com/artist/allu-arjun-songs/BGi8EcKdZXk_", page=1, limit=2 )) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Get Artist's Top Songs using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves the top songs for a given artist from JioSaavn. It takes an artist ID or link as input and an optional limit for the number of results. The output is a JSON object containing the song data. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.get_artist_top_songs("https://www.jiosaavn.com/artist/allu-arjun-songs/BGi8EcKdZXk_", limit=2)) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Async Usage within an Async Function Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Demonstrates how to use JioSaavn library methods within an asynchronous function using `await` instead of `asyncio.run()`. This allows for concurrent fetching of multiple resources using `asyncio.gather`. ```python import json from jiosaavn import JioSaavn async def main(): saavn = JioSaavn() # Fetch multiple items concurrently import asyncio results = await asyncio.gather( saavn.get_top_charts(), saavn.get_top_artists(), saavn.search_songs("Bollywood hits") ) charts, artists, songs = results print(f"Found {len(charts.get('data', []))} charts") print(f"Found {len(artists.get('data', []))} artists") print(f"Found {len(songs.get('data', []))} songs") # Run with asyncio import asyncio asyncio.run(main()) ``` -------------------------------- ### General Search across JioSaavn Content Source: https://context7.com/abhichaudharii/jiosaavn-python/llms.txt Performs a comprehensive search across all content types on JioSaavn, including songs, albums, artists, playlists, and podcasts. It uses the 'jiosaavn' library and 'asyncio'. The function takes a query and returns categorized results. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_on_saavn("Arijit Singh")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Search Artists using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Searches for artists on JioSaavn using a specified name. The result is a JSON object containing information about the artists found. The code demonstrates usage with `asyncio`. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_artists("Allu Arjun")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Search Playlists using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Allows searching for playlists on JioSaavn using a query string. The function returns a JSON formatted list of playlists matching the query. It's intended for use in asynchronous contexts. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_playlists("Krishna")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Search Albums using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Searches for albums on JioSaavn based on a provided query. The function returns a JSON object with album search results. This functionality is designed to be used with `asyncio`. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_albums("Narayan mil jayega")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Search Songs using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Searches for songs on JioSaavn based on a given query. The function returns a JSON object containing the search results for songs. It can be used within an async function with the `await` keyword. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_songs("Narayan mil jayega")) print(json.dumps(data, indent=4)) ``` -------------------------------- ### Search Top Queries using JioSaavn Python Source: https://github.com/abhichaudharii/jiosaavn-python/blob/main/README.md Retrieves top search queries from JioSaavn. This function takes a query string and returns a JSON object of related top queries. The code is structured for use with `asyncio`. ```python import json import asyncio from jiosaavn import JioSaavn saavn = JioSaavn() data = asyncio.run(saavn.search_topquery("the landers")) print(json.dumps(data, indent=4)) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.