This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
Album Search
Tuhin Kanti Pal edited this page Dec 13, 2020
·
1 revision
http://[Your-Url]/albumsearch?query={Album-Name}
//example
https://jiosaavn-api.vercel.app/albumsearch?query=dil+bechara
- You need the id object to get the detail of the album.
[
{
"id": "21318145",
"title": "Dil Bechara",
"image": "https://c.saavncdn.com/870/Dil-Bechara-Hindi-2020-20200709070438-500x500.jpg",
"music": "A.R. Rahman",
"description": "2020 · Hindi Album · A.R. Rahman",
"position": 1,
"more_info": {
"year": "2020",
"song_pids": "ohUsQ-U0, iX_FM-ow, ZzT4D6dZ, 9v-mTsYV, fK__62jr, Jb25uB4m, YRJDNs_m, kF-UYP6r, Q6Kj6zJm",
"language": "hindi"
},
"url": "https://www.jiosaavn.com/album/dil-bechara/OV26eogqCTQ_"
},
{
"id": "21882882",
"title": "Dil Bechara",
"image": "https://c.saavncdn.com/238/Dil-Bechara-Unknown-2020-20201104113053-500x500.jpg",
"music": "raktim chowdhury",
"description": "2020 · Album · Raktim chowdhury",
"position": 2,
"more_info": {
"year": "2020",
"song_pids": "gmBVU1ei",
"language": "unknown"
},
"url": "https://www.jiosaavn.com/album/dil-bechara/DdUcaSGkIg0_"
},
{
"id": "21537543",
"title": "Dil Bechara",
"image": "https://c.saavncdn.com/380/Dil-Bechara-English-2020-20200718234012-500x500.jpg",
"music": "Rishi Rakshit",
"description": "2020 · English Album · Rishi Rakshit",
"position": 3,
"more_info": {
"year": "2020",
"song_pids": "A2LIwleE",
"language": "english"
},
"url": "https://www.jiosaavn.com/album/dil-bechara/oaL,Sttdf5A_"
},
{
"id": "23294391",
"title": "Dil Bechara (feat. Nirala G & Big J)",
"image": "https://c.saavncdn.com/652/Dil-Bechara-feat-Nirala-G-Big-J--English-2020-20201110200856-500x500.jpg",
"music": "Nirala G",
"description": "2020 · English Album · Nirala G",
"position": 4,
"more_info": {
"year": "2020",
"song_pids": "cauyFntY",
"language": "english"
},
"url": "https://www.jiosaavn.com/album/dil-bechara-feat.-nirala-g--big-j/ix9mukpJRv8_"
},
{
"id": "21978623",
"title": "Dil Bechara",
"image": "https://c.saavncdn.com/223/Dil-Bechara-Unknown-2020-20200812031945-500x500.jpg",
"music": "",
"description": "2020 · Album",
"position": 5,
"more_info": {
"year": "2020",
"song_pids": "ml0RSvE1",
"language": "unknown"
},
"url": "https://www.jiosaavn.com/album/dil-bechara/4C8ni7kLoXw_"
}
]
- NodeJS (axios)
var axios = require('axios');
var config = {
method: 'get',
url: 'https://jiosaavn-api.vercel.app/albumsearch?query=dil+bechara',
headers: { }
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
- XHR
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://jiosaavn-api.vercel.app/albumsearch?query=dil+bechara");
xhr.send();
- PHP Using Curl
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://jiosaavn-api.vercel.app/albumsearch?query=dil+bechara',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
- Python Using Requests
import requests
url = "https://jiosaavn-api.vercel.app/albumsearch?query=dil+bechara"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)