Spotify Web API
spotify · Media
You can use Spotify's Web API to discover music and podcasts, manage your Spotify library, control audio playback, and much more. Browse our available Web API endpoints using the sidebar at left, or via the navigation bar on top of this page on smaller screens. In order to make successful Web API requests your app will need a valid access token. One can be obtained through OAuth 2.0 . The base URI for
Authentication
Sample Requests
Get Spotify catalog information for several artists based on their Spotify IDs.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists?ids=2CIMQHirSU0MQqyYHq0eOx%2C57dN52uHvrHOxijzpIgu3E%2C1vCWHaC5f2uS3yhpwWbIA6"
import requests
params = {
"ids": "2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists');
url.searchParams.set('ids', '2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists")
q := baseURL.Query()
q.Set("ids", "2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists")
uri.query = URI.encode_www_form({
"ids" => "2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spotify.com/1.0.0/artists?" . http_build_query([
"ids" => "2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get audio features for multiple tracks based on their Spotify IDs.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features?ids=7ouMYWpwJ422jRcDASZB7P%2C4VqPOruhp5EdPBeR92t6lQ%2C2takcwOaAZWiXQijPHIx7B"
import requests
params = {
"ids": "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features');
url.searchParams.set('ids', '7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features")
q := baseURL.Query()
q.Set("ids", "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features")
uri.query = URI.encode_www_form({
"ids" => "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spotify.com/1.0.0/audio-features?" . http_build_query([
"ids" => "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get Spotify catalog information for several episodes based on their Spotify IDs.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes?ids=77o6BIVlYM3msb4MMIL1jH%2C0Q86acNRm6V9GYx55SXKwf&market=ES"
import requests
params = {
"ids": "77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf",
"market": "ES"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes');
url.searchParams.set('ids', '77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf');
url.searchParams.set('market', 'ES');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes")
q := baseURL.Query()
q.Set("ids", "77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf")
q.Set("market", "ES")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes")
uri.query = URI.encode_www_form({
"ids" => "77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf",
"market" => "ES"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spotify.com/1.0.0/episodes?" . http_build_query([
"ids" => "77o6BIVlYM3msb4MMIL1jH,0Q86acNRm6V9GYx55SXKwf",
"market" => "ES"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Spotify Web API?
Spotify Web API is a Media API. Developers commonly use media APIs for:
- storing and delivering images, video, and audio
- building digital asset management and media libraries
- transcoding and optimising media for the web
- adding video streaming and playback to your app
- automating content tagging and metadata extraction
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Spotify Web API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?