Deezer search
Search Deezer's catalogue for tracks, albums, artists, playlists, radios or users. Tracks: id, title and version, ISRC, link, duration, rank, explicit flags, 30-second preview link, artist and album. Advanced track filters (artist, album, track title, label, BPM, duration) and the site's sort orders. total is the number of matches; pass next_page back as page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
qrequired | string | Search words. Example: daft punk |
type | track | album | artist | playlist | radio | user | What to search (default track). |
order | RANKING | TRACK_ASC | TRACK_DESC | ARTIST_ASC | ARTIST_DESC | ALBUM_ASC | ALBUM_DESC | RATING_ASC | RATING_DESC | DURATION_ASC | DURATION_DESC | Sort order (default: relevance). |
strict | string | 1 = exact matches only (no fuzzy matching). |
artist | string | Tracks: artist name must match. |
album | string | Tracks: album title must match. |
track_title | string | Tracks: track title must match. |
label | string | Tracks: record label must match. |
bpm_min | integer | Tracks: lowest BPM. |
bpm_max | integer | Tracks: highest BPM. |
dur_min | integer | Tracks: shortest duration in seconds. |
dur_max | integer | Tracks: longest duration in seconds. |
limit | integer | Results per page (default 25, max 100). |
page | integer | Page number (default 1). Pass next_page back; null on the last page. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/deezer/v1/search?q=daft+punk" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/deezer/v1/search",
params={"q": "daft punk"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/deezer/v1/search");
url.searchParams.set("q", "daft punk");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).