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

Song Search

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

Method {GET}

Request:

http://[Your-Url]/search?query={song-name}

//example
https://jiosaavn-api.vercel.app/search?query=taare+ginn

Note:

  • You need the id object to get the detail of the song.

Result:

[
  {
    "id": "iX_FM-ow",
    "title": "Taare Ginn",
    "image": "https://c.saavncdn.com/870/Dil-Bechara-Hindi-2020-20200709070438-500x500.jpg",
    "album": "Dil Bechara",
    "description": "Dil Bechara · A.R. Rahman, Mohit Chauhan, Shreya Ghoshal",
    "position": 1,
    "more_info": {
      "vlink": "https://jiotunepreview.jio.com/content/Converted/010910141116022.mp3",
      "primary_artists": "A.R. Rahman, Mohit Chauhan, Shreya Ghoshal",
      "singers": "A.R. Rahman, Mohit Chauhan, Shreya Ghoshal",
      "language": "hindi"
    },
    "url": "https://www.jiosaavn.com/song/taare-ginn/GTA0dzkdWEQ"
  }
]

Snippet:

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

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

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

$curl = curl_init();

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

payload={}
headers = {}

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

print(response.text)
Clone this wiki locally