Spotify
Base URL:https://drain.lat/api/v1/spotify
GET /search
GET /search
Search for artists on Spotify by name.
GET /api/v1/spotify/search
string
required
Artist name to search.
curl "https://drain.lat/api/v1/spotify/search?q=drake" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://drain.lat/api/v1/spotify/search?q=drake", {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/search",
params={"q": "drake"},
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
string
The search query used.
array
Response
{
"query": "drake",
"artists": [
{
"id": "3TVXtAsR1Inumwj472S9r4",
"name": "Drake",
"genres": ["canadian hip hop", "rap", "toronto rap"],
"followers": 88000000,
"popularity": 96,
"avatarUrl": "https://i.scdn.co/image/...",
"spotifyUrl": "https://open.spotify.com/artist/3TVXtAsR1Inumwj472S9r4"
}
],
"scrapedAt": "2026-05-05T12:00:00.000Z"
}
GET /artist/:id
GET /artist/:id
Get a Spotify artist by their Spotify ID.
GET /api/v1/spotify/artist/:id
string
required
Spotify artist ID (e.g.
3TVXtAsR1Inumwj472S9r4 for Drake).curl "https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4",
{ headers: { "x-api-key": "YOUR_API_KEY" } }
);
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
Response
{
"id": "3TVXtAsR1Inumwj472S9r4",
"name": "Drake",
"genres": ["canadian hip hop", "rap", "toronto rap"],
"followers": 88000000,
"popularity": 96,
"avatarUrl": "https://i.scdn.co/image/...",
"spotifyUrl": "https://open.spotify.com/artist/3TVXtAsR1Inumwj472S9r4",
"scrapedAt": "2026-05-05T12:00:00.000Z"
}
GET /artist/:id/tracks
GET /artist/:id/tracks
Get an artist’s top 10 tracks.
GET /api/v1/spotify/artist/:id/tracks
string
required
Spotify artist ID.
curl "https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/tracks" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/tracks",
{ headers: { "x-api-key": "YOUR_API_KEY" } }
);
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/tracks",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
string
Spotify artist ID.
array
Response
{
"artistId": "3TVXtAsR1Inumwj472S9r4",
"tracks": [
{
"id": "2507CQMJ8xFZbFGSC9FXMX",
"name": "God's Plan",
"album": "Scorpion",
"albumArt": "https://i.scdn.co/image/...",
"durationMs": 198973,
"popularity": 88,
"previewUrl": "https://p.scdn.co/mp3-preview/...",
"spotifyUrl": "https://open.spotify.com/track/2507CQMJ8xFZbFGSC9FXMX"
}
],
"scrapedAt": "2026-05-05T12:00:00.000Z"
}
GET /search/tracks
GET /search/tracks
Search for tracks on Spotify.
GET /api/v1/spotify/search/tracks
string
required
Track name or search query.
curl "https://drain.lat/api/v1/spotify/search/tracks?q=god%27s+plan" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://drain.lat/api/v1/spotify/search/tracks?q=god's+plan", {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/search/tracks",
params={"q": "god's plan"},
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
string
The search query used.
array
Response
{
"query": "god's plan",
"tracks": [
{
"id": "6DCZcSspjsKoFjzjrWoCdn",
"name": "God's Plan",
"artists": [{ "id": "3TVXtAsR1Inumwj472S9r4", "name": "Drake" }],
"album": "Scorpion",
"albumArt": "https://...",
"durationMs": 198973,
"popularity": 88,
"previewUrl": "https://...",
"explicit": true,
"spotifyUrl": "https://open.spotify.com/track/6DCZcSspjsKoFjzjrWoCdn"
}
],
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
GET /search/albums
GET /search/albums
Search for albums on Spotify.
GET /api/v1/spotify/search/albums
string
required
Album name or search query.
curl "https://drain.lat/api/v1/spotify/search/albums?q=scorpion" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://drain.lat/api/v1/spotify/search/albums?q=scorpion", {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/search/albums",
params={"q": "scorpion"},
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
Response
{
"query": "scorpion",
"albums": [
{
"id": "1ATL5GLyefJaxhQzSPVrLX",
"name": "Scorpion",
"artists": [{ "id": "3TVXtAsR1Inumwj472S9r4", "name": "Drake" }],
"releaseDate": "2018-06-29",
"totalTracks": 25,
"coverUrl": "https://...",
"spotifyUrl": "https://open.spotify.com/album/1ATL5GLyefJaxhQzSPVrLX"
}
],
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
GET /artist/:id/albums
GET /artist/:id/albums
Get an artist’s albums and singles.
GET /api/v1/spotify/artist/:id/albums
string
required
Spotify artist ID.
curl "https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/albums" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/albums",
{ headers: { "x-api-key": "YOUR_API_KEY" } }
);
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/albums",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
Response
{
"artistId": "3TVXtAsR1Inumwj472S9r4",
"albums": [
{
"id": "1ATL5GLyefJaxhQzSPVrLX",
"name": "Scorpion",
"type": "album",
"releaseDate": "2018-06-29",
"totalTracks": 25,
"coverUrl": "https://...",
"spotifyUrl": "https://open.spotify.com/album/1ATL5GLyefJaxhQzSPVrLX"
}
],
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
GET /artist/:id/related
GET /artist/:id/related
Get artists related to a given artist.
GET /api/v1/spotify/artist/:id/related
string
required
Spotify artist ID.
curl "https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/related" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/related",
{ headers: { "x-api-key": "YOUR_API_KEY" } }
);
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/artist/3TVXtAsR1Inumwj472S9r4/related",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
Response
{
"artistId": "3TVXtAsR1Inumwj472S9r4",
"related": [
{
"id": "0Y5tJX1MQlPlqiwlOH1tJY",
"name": "Travis Scott",
"genres": ["rap", "trap"],
"followers": 42000000,
"popularity": 91,
"avatarUrl": "https://...",
"spotifyUrl": "https://open.spotify.com/artist/0Y5tJX1MQlPlqiwlOH1tJY"
}
],
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
GET /track/:id
GET /track/:id
Get info for a single Spotify track.
GET /api/v1/spotify/track/:id
string
required
Spotify track ID.
curl "https://drain.lat/api/v1/spotify/track/6DCZcSspjsKoFjzjrWoCdn" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://drain.lat/api/v1/spotify/track/6DCZcSspjsKoFjzjrWoCdn", {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/track/6DCZcSspjsKoFjzjrWoCdn",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
Response
{
"id": "6DCZcSspjsKoFjzjrWoCdn",
"name": "God's Plan",
"artists": [{ "id": "3TVXtAsR1Inumwj472S9r4", "name": "Drake" }],
"album": "Scorpion",
"albumId": "1ATL5GLyefJaxhQzSPVrLX",
"albumArt": "https://...",
"releaseDate": "2018-06-29",
"durationMs": 198973,
"popularity": 88,
"previewUrl": "https://...",
"explicit": true,
"spotifyUrl": "https://open.spotify.com/track/6DCZcSspjsKoFjzjrWoCdn",
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
GET /album/:id
GET /album/:id
Get a full album with tracklist.
GET /api/v1/spotify/album/:id
string
required
Spotify album ID.
curl "https://drain.lat/api/v1/spotify/album/1ATL5GLyefJaxhQzSPVrLX" \
-H "x-api-key: YOUR_API_KEY"
const res = await fetch("https://drain.lat/api/v1/spotify/album/1ATL5GLyefJaxhQzSPVrLX", {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const data = await res.json();
import requests
res = requests.get(
"https://drain.lat/api/v1/spotify/album/1ATL5GLyefJaxhQzSPVrLX",
headers={"x-api-key": "YOUR_API_KEY"}
)
print(res.json())
string
Album ID.
string
Album name.
string
Album type (
album, single, compilation).array
List of artists.
string
Release date.
number
Total track count.
string
Album cover URL.
string
Record label.
number
Popularity score (0-100).
array
Response
{
"id": "1ATL5GLyefJaxhQzSPVrLX",
"name": "Scorpion",
"type": "album",
"artists": [{ "id": "3TVXtAsR1Inumwj472S9r4", "name": "Drake" }],
"releaseDate": "2018-06-29",
"totalTracks": 25,
"coverUrl": "https://...",
"label": "Young Money",
"popularity": 85,
"tracks": [
{
"id": "6DCZcSspjsKoFjzjrWoCdn",
"name": "God's Plan",
"trackNumber": 1,
"durationMs": 198973,
"previewUrl": "https://...",
"explicit": true,
"spotifyUrl": "https://open.spotify.com/track/6DCZcSspjsKoFjzjrWoCdn"
}
],
"spotifyUrl": "https://open.spotify.com/album/1ATL5GLyefJaxhQzSPVrLX",
"scrapedAt": "2026-05-08T10:00:00.000Z"
}
