Get artist discography overview
curl --request GET \
--url https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
},
"data": {
"id": "1yxSLGMDHlW21z4YXirZDS",
"name": "Black Eyed Peas",
"uri": "spotify:artist:1yxSLGMDHlW21z4YXirZDS",
"discography": {
"albums": {
"totalCount": 16
},
"singles": {
"totalCount": 61
},
"compilations": {
"totalCount": 2
},
"all": {
"totalCount": 79
}
}
}
}{
"message": "Bad request"
}{
"message": "Invalid API key"
}{
"message": "You are not subscribed to this API, please subscribe before using"
}{
"success": false,
"message": "Internal Server Error",
"status_code": 500,
"cost": 0,
"explain": "Internal Server Error"
}Artists
Get artist discography overview
Get discography overview statistics for the specified artist
GET
/
api
/
v1
/
artists
/
discography-overview
Get artist discography overview
curl --request GET \
--url https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spotify-api31.p.rapidapi.com/api/v1/artists/discography-overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
},
"data": {
"id": "1yxSLGMDHlW21z4YXirZDS",
"name": "Black Eyed Peas",
"uri": "spotify:artist:1yxSLGMDHlW21z4YXirZDS",
"discography": {
"albums": {
"totalCount": 16
},
"singles": {
"totalCount": 61
},
"compilations": {
"totalCount": 2
},
"all": {
"totalCount": 79
}
}
}
}{
"message": "Bad request"
}{
"message": "Invalid API key"
}{
"message": "You are not subscribed to this API, please subscribe before using"
}{
"success": false,
"message": "Internal Server Error",
"status_code": 500,
"cost": 0,
"explain": "Internal Server Error"
}Authorizations
API Key
Query Parameters
Spotify artist URI to get discography overview
Pattern:
^spotify:artist:[a-zA-Z0-9]+$Example:
"spotify:artist:1yxSLGMDHlW21z4YXirZDS"
Was this page helpful?
⌘I

