Search for Track
curl --request GET \
--url https://{spoofify_url}/api/spotify/search/{query} \
--header 'api-key: <api-key>'const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://{spoofify_url}/api/spotify/search/{query}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://{spoofify_url}/api/spotify/search/{query}';
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{spoofify_url}/api/spotify/search/{query}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{spoofify_url}/api/spotify/search/{query}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://{spoofify_url}/api/spotify/search/{query}")
.get()
.addHeader("api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()HttpResponse<String> response = Unirest.get("https://{spoofify_url}/api/spotify/search/{query}")
.header("api-key", "<api-key>")
.asString();Endpoints
Search for Track
Search Spotify for a specific query.
GET
/
api
/
spotify
/
search
/
{query}
Search for Track
curl --request GET \
--url https://{spoofify_url}/api/spotify/search/{query} \
--header 'api-key: <api-key>'const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://{spoofify_url}/api/spotify/search/{query}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://{spoofify_url}/api/spotify/search/{query}';
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{spoofify_url}/api/spotify/search/{query}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{spoofify_url}/api/spotify/search/{query}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://{spoofify_url}/api/spotify/search/{query}")
.get()
.addHeader("api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()HttpResponse<String> response = Unirest.get("https://{spoofify_url}/api/spotify/search/{query}")
.header("api-key", "<api-key>")
.asString();Request Headers
string
required
Must match the API key set in the Spoofify environment variables
Path Parameters
string
required
URL-encoded search query.
JSON Response
- Success
- Error
A Spotify search result object
Example Response
https://developer.spotify.com/documentation/web-api/reference/searchA Spotify error responsehttps://developer.spotify.com/documentation/web-api/reference/search
Example Response
{
error: {
status: 400,
message: "string"
}
}
⌘I

