Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Fetch Song From Jiosaavn Link

Tuhin Kanti Pal edited this page Dec 13, 2020 · 2 revisions

Method {GET}

Request:

http://[Your-Url]/link?id={Jiosaavn-Link}

//example
https://jiosaavn-api.vercel.app/link?query=https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ

Note:

  • Only Jiosaavn Song links are supported.

Result:

{
  "id": "iX_FM-ow",
  "song": "Taare Ginn",
  "album": "Dil Bechara",
  "year": "2020",
  "primary_artists": "A.R. Rahman, Mohit Chauhan, Shreya Ghoshal",
  "singers": "A.R. Rahman, Mohit Chauhan, Shreya Ghoshal",
  "image": "https://c.saavncdn.com/870/Dil-Bechara-Hindi-2020-20200709070438-500x500.jpg",
  "label": "Sony Music Entertainment India Pvt. Ltd.",
  "albumid": "21318145",
  "language": "hindi",
  "copyright_text": "(P) 2020 Sony Music Entertainment India Pvt. Ltd.",
  "has_lyrics": "true",
  "media_url": "https://aac.saavncdn.com/870/ec5183010778d5db1164eabc32d9f0ed_160.mp4",
  "other_qualities": [
    {
      "quality": "96_KBPS",
      "url": "https://aac.saavncdn.com/870/ec5183010778d5db1164eabc32d9f0ed_96_p.mp4"
    },
    {
      "quality": "160_KBPS",
      "url": "https://aac.saavncdn.com/870/ec5183010778d5db1164eabc32d9f0ed_160.mp4"
    },
    {
      "quality": "320_KBPS",
      "url": "https://aac.saavncdn.com/870/ec5183010778d5db1164eabc32d9f0ed_320.mp4"
    }
  ],
  "perma_url": "https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ",
  "album_url": "https://www.jiosaavn.com/album/dil-bechara/OV26eogqCTQ_",
  "release_date": "2020-07-10",
  "repo_url": "https://github.com/cachecleanerjeet/JiosaavnAPI"
}

Snippet:

  • NodeJS (axios)
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://jiosaavn-api.vercel.app/link?query=https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ',
  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/link?query=https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ");

xhr.send();
  • PHP Using Curl
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://jiosaavn-api.vercel.app/link?query=https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ',
  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/link?query=https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
Clone this wiki locally