### Search Albums API Example (Shell) Source: https://saavn.dev/docs/index This code snippet demonstrates how to search for albums using the Saavn API. It utilizes cURL to send a GET request with query parameters for the search term, page number, and limit. The response is expected in JSON format. ```shell curl 'https://saavn.dev/api/search/albums?query=Evolve&page=0&limit=10' ``` -------------------------------- ### Search Playlists API Example (Shell) Source: https://saavn.dev/docs/index This code snippet shows how to search for playlists using the Saavn API. It employs cURL to make a GET request, including parameters for the search query, page number, and the desired limit of results. The expected response format is JSON. ```shell curl 'https://saavn.dev/api/search/playlists?query=Indie&page=0&limit=10' ``` -------------------------------- ### Search Artists API Example (Shell) Source: https://saavn.dev/docs/index This code snippet illustrates how to search for artists via the Saavn API using cURL. It specifies the search query, page number, and the number of results per page as parameters in the GET request. The API returns results in JSON format. ```shell curl 'https://saavn.dev/api/search/artists?query=Adele&page=0&limit=10' ``` -------------------------------- ### GET /api/search Source: https://saavn.dev/docs/index Performs a global search for songs, albums, artists, and playlists based on a query string. ```APIDOC ## GET /api/search ### Description Search for songs, albums, artists, and playlists based on the provided query string. ### Method GET ### Endpoint /api/search ### Parameters #### Query Parameters - **query** (string) - Required - Search query (e.g., Imagine Dragons) ### Request Example ```json { "query": "Imagine Dragons" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **data** (object) - Contains the search results categorized by type (albums, songs, artists, playlists, topQuery). - **albums** (object) - Search results for albums. - **results** (array) - Array of album objects. - **id** (string) - Album ID. - **title** (string) - Album title. - **image** (array) - Array of image objects with different qualities and URLs. - **artist** (string) - Artist name. - **url** (string) - URL to the album. - **type** (string) - Type of content (e.g., 'album'). - **description** (string) - Album description. - **year** (string) - Release year. - **language** (string) - Album language. - **songIds** (string) - Comma-separated string of song IDs in the album. - **position** (integer) - Position of albums in the search results. - **songs** (object) - Search results for songs. - **results** (array) - Array of song objects. - **id** (string) - Song ID. - **title** (string) - Song title. - **image** (array) - Array of image objects with different qualities and URLs. - **album** (string) - Album title. - **url** (string) - URL to the song. - **type** (string) - Type of content (e.g., 'song'). - **description** (string) - Song description. - **primaryArtists** (string) - Primary artist(s) name. - **singers** (string) - Singers' names. - **language** (string) - Song language. - **position** (integer) - Position of songs in the search results. - **artists** (object) - Search results for artists. - **results** (array) - Array of artist objects. - **id** (string) - Artist ID. - **title** (string) - Artist name. - **image** (array) - Array of image objects with different qualities and URLs. - **type** (string) - Type of content (e.g., 'artist'). - **description** (string) - Artist description. - **position** (integer) - Position of artists in the search results. - **playlists** (object) - Search results for playlists. - **results** (array) - Array of playlist objects. - **id** (string) - Playlist ID. - **title** (string) - Playlist title. - **image** (array) - Array of image objects with different qualities and URLs. - **url** (string) - URL to the playlist. - **language** (string) - Playlist language. - **type** (string) - Type of content (e.g., 'playlist'). - **description** (string) - Playlist description. - **position** (integer) - Position of playlists in the search results. - **topQuery** (object) - Represents the top search result. - **results** (array) - Array of top query result objects (similar structure to songs). - **position** (integer) - Position of the top query result. #### Response Example ```json { "success": true, "data": { "albums": { "results": [ { "id": "string", "title": "string", "image": [ { "quality": "string", "url": "string" } ], "artist": "string", "url": "string", "type": "string", "description": "string", "year": "string", "language": "string", "songIds": "string" } ], "position": 1 }, "songs": { "results": [ { "id": "string", "title": "string", "image": [ { "quality": "string", "url": "string" } ], "album": "string", "url": "string", "type": "string", "description": "string", "primaryArtists": "string", "singers": "string", "language": "string" } ], "position": 1 }, "artists": { "results": [ { "id": "string", "title": "string", "image": [ { "quality": "string", "url": "string" } ], "type": "string", "description": "string", "position": 1 } ], "position": 1 }, "playlists": { "results": [ { "id": "string", "title": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string", "language": "string", "type": "string", "description": "string" } ], "position": 1 }, "topQuery": { "results": [ { "id": "string", "title": "string", "image": [ { "quality": "string", "url": "string" } ], "album": "string", "url": "string", "type": "string", "description": "string", "primaryArtists": "string", "singers": "string", "language": "string" } ], "position": 1 } } } ``` ``` -------------------------------- ### GET /api/search/songs Source: https://saavn.dev/docs/index Searches for songs based on a provided query, with options for pagination and result limits. ```APIDOC ## GET /api/search/songs ### Description Searches for songs based on the provided query. ### Method GET ### Endpoint /api/search/songs ### Parameters #### Query Parameters - **query** (string) - Required - The search query for songs. - **page** (integer) - Optional - The page number of the search results to retrieve. Defaults to "0". - **limit** (integer) - Optional - The number of search results per page. Defaults to "10". ### Request Example ```json { "example": "curl 'https://saavn.dev/api/search/songs?query=Believer&page=0&limit=10'" } ``` ### Response #### Success Response (200) Successful response with song search results. - **success** (boolean) - Indicates if the request was successful. - **data** (object) - Contains the search results. - **total** (integer) - The total number of search results. - **start** (integer) - The starting index of the current results page. - **results** (array) - An array of song objects. - **id** (string) - The unique identifier of the song. - **name** (string) - The name of the song. - **type** (string) - The type of the item (e.g., song). - **year** (integer or null) - The release year of the song. - **releaseDate** (string or null) - The release date of the song. - **duration** (integer or null) - The duration of the song in seconds. - **label** (string or null) - The music label of the song. - **explicitContent** (boolean) - Indicates if the song contains explicit content. - **playCount** (integer or null) - The number of times the song has been played. - **language** (string) - The language of the song. - **hasLyrics** (boolean) - Indicates if the song has lyrics available. - **lyricsId** (string or null) - The identifier for the song's lyrics. - **url** (string) - The URL to the song. - **copyright** (string or null) - Copyright information for the song. - **album** (object or null) - Information about the album the song belongs to. - **id** (string or null) - The album's unique identifier. - **name** (string or null) - The album's name. - **url** (string or null) - The URL to the album. - **artists** (object) - Information about the artists of the song. - **primary** (array) - An array of primary artists. - **featured** (array) - An array of featured artists. - **all** (array) - An array of all artists (primary and featured). - **id** (string) - The artist's unique identifier. - **name** (string) - The artist's name. - **role** (string) - The artist's role (e.g., performer). - **type** (string) - The type of artist (e.g., artist). - **image** (array) - An array of artist images with quality and URL. - **url** (string) - The URL to the artist's profile. - **image** (array) - An array of song images with quality and URL. - **downloadUrl** (array) - An array of available download URLs with quality and URL. #### Response Example ```json { "success": true, "data": { "total": 1, "start": 1, "results": [ { "id": "string", "name": "string", "type": "string", "year": null, "releaseDate": null, "duration": null, "label": null, "explicitContent": true, "playCount": null, "language": "string", "hasLyrics": true, "lyricsId": null, "url": "string", "copyright": null, "album": { "id": null, "name": null, "url": null }, "artists": { "primary": [ { "id": "string", "name": "string", "role": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string" } ], "featured": [ { "id": "string", "name": "string", "role": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string" } ], "all": [ { "id": "string", "name": "string", "role": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string" } ] }, "image": [ { "quality": "string", "url": "string" } ], "downloadUrl": [ { "quality": "string", "url": "string" } ] } ] } } ``` ``` -------------------------------- ### Search Songs using cURL Source: https://saavn.dev/docs/index This snippet demonstrates how to perform a song search using the cURL command-line tool. It includes the base API endpoint and required query parameters for a successful search. The parameters specify the search term, page number, and the number of results per page. ```shell curl 'https://saavn.dev/api/search/songs?query=Believer&page=0&limit=10' ``` -------------------------------- ### Global Search API Request using Curl Source: https://saavn.dev/docs/index Demonstrates how to perform a global search for songs, albums, artists, and playlists using the JioSaavn API with a cURL command. This endpoint requires a 'query' parameter for the search term. ```shell curl 'https://saavn.dev/api/search?query=Imagine%20Dragons' ``` -------------------------------- ### Search Artists API Source: https://saavn.dev/docs/index Searches for artists based on a provided query. Supports pagination and limiting results. ```APIDOC ## GET /api/search/artists ### Description Searches for artists based on the provided query. Supports pagination and limiting results. ### Method GET ### Endpoint /api/search/artists ### Parameters #### Query Parameters - **query** (string) - Required - Search query for artists - **page** (integer) - Optional - The page number of the search results to retrieve (default: 0) - **limit** (integer) - Optional - The number of search results per page (default: 10) ### Request Example ```json { "example": "curl 'https://saavn.dev/api/search/artists?query=Adele&page=0&limit=10'" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful - **data** (object) - Contains the search results - **total** (integer) - Total number of results found - **start** (integer) - The starting index of the results - **results** (array) - An array of artist objects - **id** (string) - Unique identifier for the artist - **name** (string) - Name of the artist - **role** (string) - Role of the artist (e.g., singer, composer) - **type** (string) - Type of the artist (e.g., artist) - **image** (array) - Array of image objects with different qualities and URLs - **url** (string) - URL to the artist's profile #### Response Example ```json { "success": true, "data": { "total": 1, "start": 1, "results": [ { "id": "string", "name": "string", "role": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string" } ] } } ``` ``` -------------------------------- ### Playlists API Endpoint Source: https://saavn.dev/docs/index Endpoint for retrieving playlists. ```APIDOC ## GET /api/playlists ### Description Retrieves a list of playlists. ### Method GET ### Endpoint /api/playlists ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **playlists** (array) - A list of playlist objects. #### Response Example { "playlists": [ { "id": "playlist_id_1", "name": "Playlist Name 1" }, { "id": "playlist_id_2", "name": "Playlist Name 2" } ] } ``` -------------------------------- ### Search Albums API Source: https://saavn.dev/docs/index Searches for albums based on a provided query. Supports pagination and limiting results. ```APIDOC ## GET /api/search/albums ### Description Searches for albums based on the provided query. Supports pagination and limiting results. ### Method GET ### Endpoint /api/search/albums ### Parameters #### Query Parameters - **query** (string) - Required - Search query for albums - **page** (integer) - Optional - The page number of the search results to retrieve (default: 0) - **limit** (integer) - Optional - The number of search results per page (default: 10) ### Request Example ```json { "example": "curl 'https://saavn.dev/api/search/albums?query=Evolve&page=0&limit=10'" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful - **data** (object) - Contains the search results - **total** (integer) - Total number of results found - **start** (integer) - The starting index of the results - **results** (array) - An array of album objects - **id** (string) - Unique identifier for the album - **name** (string) - Name of the album - **description** (string) - Description of the album - **year** (integer) - Release year of the album - **type** (string) - Type of the album (e.g., album, compilation) - **playCount** (integer) - Number of times the album has been played - **language** (string) - Language of the album - **explicitContent** (boolean) - Indicates if the album contains explicit content - **artists** (object) - Artist information - **primary** (array) - Primary artists - **featured** (array) - Featured artists - **all** (array) - All artists associated with the album - **url** (string) - URL to the album - **image** (array) - Array of image objects with different qualities and URLs #### Response Example ```json { "success": true, "data": { "total": 1, "start": 1, "results": [ { "id": "string", "name": "string", "description": "string", "year": null, "type": "string", "playCount": null, "language": "string", "explicitContent": true, "artists": { "primary": [ { "id": "string", "name": "string", "role": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string" } ], "featured": [], "all": [] }, "url": "string", "image": [ { "quality": "string", "url": "string" } ] } ] } } ``` ``` -------------------------------- ### Search API Endpoint Source: https://saavn.dev/docs/index Performs a global search across Saavn. ```APIDOC ## GET /api/search ### Description Performs a global search across Saavn for various entities like songs, artists, and albums. ### Method GET ### Endpoint /api/search ### Parameters #### Path Parameters None #### Query Parameters - **query** (string) - Required - The search term to look for. #### Request Body None ### Request Example `GET https://saavn.dev/api/search?query=Imagine%20Dragons` ### Response #### Success Response (200) - **results** (object) - An object containing search results categorized by type (e.g., songs, artists, albums). #### Response Example { "results": { "songs": [ { "id": "song_id_1", "title": "Song Title 1" } ], "artists": [ { "id": "artist_id_1", "name": "Artist Name 1" } ], "albums": [ { "id": "album_id_1", "title": "Album Title 1" } ] } } ``` -------------------------------- ### Search Playlists API Source: https://saavn.dev/docs/index Searches for playlists based on a provided query. Supports pagination and limiting results. ```APIDOC ## GET /api/search/playlists ### Description Searches for playlists based on the provided query. Supports pagination and limiting results. ### Method GET ### Endpoint /api/search/playlists ### Parameters #### Query Parameters - **query** (string) - Required - Search query for playlists - **page** (integer) - Optional - The page number of the search results to retrieve (default: 0) - **limit** (integer) - Optional - The number of search results per page (default: 10) ### Request Example ```json { "example": "curl 'https://saavn.dev/api/search/playlists?query=Indie&page=0&limit=10'" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful - **data** (object) - Contains the search results - **total** (integer) - Total number of results found - **start** (integer) - The starting index of the results - **results** (array) - An array of playlist objects - **id** (string) - Unique identifier for the playlist - **name** (string) - Name of the playlist - **type** (string) - Type of the playlist - **image** (array) - Array of image objects with different qualities and URLs - **url** (string) - URL to the playlist - **songCount** (integer) - Number of songs in the playlist - **language** (string) - Language of the playlist - **explicitContent** (boolean) - Indicates if the playlist contains explicit content #### Response Example ```json { "success": true, "data": { "total": 1, "start": 1, "results": [ { "id": "string", "name": "string", "type": "string", "image": [ { "quality": "string", "url": "string" } ], "url": "string", "songCount": null, "language": "string", "explicitContent": true } ] } } ``` ``` -------------------------------- ### Songs Operations Source: https://saavn.dev/docs/index Operations related to songs, including retrieving song details and suggestions. ```APIDOC ## Songs Operations ### Description This section details the endpoints for retrieving information about songs, including specific song details and suggestions. ### Endpoints - **GET /api/songs** - **GET /api/songs/{id}** - **GET /api/songs/{id}/suggestions** ``` -------------------------------- ### Artists API Endpoints Source: https://saavn.dev/docs/index Endpoints for retrieving information about artists, including their songs and albums. ```APIDOC ## GET /api/artists ### Description Retrieves a list of all artists. ### Method GET ### Endpoint /api/artists ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **artists** (array) - A list of artist objects. #### Response Example { "artists": [ { "id": "artist_id_1", "name": "Artist Name 1" }, { "id": "artist_id_2", "name": "Artist Name 2" } ] } ## GET /api/artists/{id} ### Description Retrieves details for a specific artist by their ID. ### Method GET ### Endpoint /api/artists/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the artist. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **id** (string) - The artist's unique identifier. - **name** (string) - The name of the artist. #### Response Example { "id": "artist_id_1", "name": "Artist Name 1" } ## GET /api/artists/{id}/songs ### Description Retrieves a list of songs by a specific artist. ### Method GET ### Endpoint /api/artists/{id}/songs ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the artist. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **songs** (array) - A list of song objects associated with the artist. #### Response Example { "songs": [ { "id": "song_id_1", "title": "Song Title 1" }, { "id": "song_id_2", "title": "Song Title 2" } ] } ## GET /api/artists/{id}/albums ### Description Retrieves a list of albums by a specific artist. ### Method GET ### Endpoint /api/artists/{id}/albums ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the artist. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **albums** (array) - A list of album objects associated with the artist. #### Response Example { "albums": [ { "id": "album_id_1", "title": "Album Title 1" }, { "id": "album_id_2", "title": "Album Title 2" } ] } ``` -------------------------------- ### Album Operations Source: https://saavn.dev/docs/index Operations related to albums, including retrieving album details. ```APIDOC ## Album Operations ### Description This section details the endpoint for retrieving information about albums. ### Endpoints - **GET /api/albums** ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.