Deezer Track Lookup
Resolve a Deezer track id to the record Deezer keeps for it: title, artist, album, duration, position on the release, and whether it is marked explicit.
Overview
Every track on Deezer carries a number, and that number is the last part of its address: in
deezer.com/track/3135556 it is 3135556. The lookup takes that number, asks
Deezer's public API for the track, and hands back the answer.
The number belongs to one recording, not to a song. The same song on a single, on an album and on a compilation has three different ids, each with its own duration and position.
Web interface
Paste the number or the whole Deezer address of the track. An address, with or without a language
segment such as /en/, is reduced to the number before the lookup. The dice in the field looks
up one of ten sample tracks.
The result shows the cover beside title, artist, album, release year and duration, and below that the metadata as rows. A click on a row copies its value. Play on Deezer asks before it leaves the site.
URL parameters
| Pattern | Example |
|---|---|
/lookup/deezer/track/{trackid} | /lookup/deezer/track/3135556 |
The page looks the track up as soon as it opens, and every lookup made on the page updates the address, so any result can be linked to.
API
/v1/lookup/deezer/track?trackid={trackid}
/v1/lookup/deezer/track
Both return JSON. POST takes the same field as a form, trackid. On
api.troubleshooting.tools the path also answers without /v1; on the main site that
shorter path is the tool page.
| Name | Type | Default | Description |
|---|---|---|---|
| trackid | integer | required | The number of a Deezer track. Everything but digits is removed first, so a value with no digits in it counts as missing. |
$ curl -s "https://api.troubleshooting.tools/v1/lookup/deezer/track?trackid=3135556" | jq .
# Just the title and the artist
$ curl -s "https://api.troubleshooting.tools/v1/lookup/deezer/track?trackid=3135556" | jq -r '.title, .artist.name'
Harder, Better, Faster, Stronger
Daft Punk
# The same as a form post
$ curl -s -d trackid=3135556 https://api.troubleshooting.tools/v1/lookup/deezer/track
Shortened; the full answer has more fields:
{
"id": 3135556,
"readable": true,
"title": "Harder, Better, Faster, Stronger",
"isrc": "GBDUW0000059",
"link": "https://www.deezer.com/track/3135556",
"duration": 226,
"track_position": 4,
"disk_number": 1,
"release_date": "2001-03-12",
"explicit_lyrics": false,
"artist": {
"id": 27,
"name": "Daft Punk",
"link": "https://www.deezer.com/artist/27"
},
"album": {
"id": 302127,
"title": "Discovery",
"cover_big": "https://cdn-images.dzcdn.net/images/cover/5718f7c81c27e0b2417e2a4c45224f8a/500x500-000000-80-0-0.jpg",
"release_date": "2001-03-07"
},
"type": "track"
}
The body is Deezer's own record for the track, passed through unchanged. The fields below are the ones the tool page uses; the others come from Deezer as well and change when Deezer changes them.
Response fields
| Field | Type | Description |
|---|---|---|
| id | integer | The track id that was looked up. |
| title | string | Title of the recording. |
| isrc | string | International Standard Recording Code, the same across services for the same recording. |
| link | string | The track's address on Deezer. |
| duration | integer | Length in seconds. |
| track_position | integer | Position on the release. |
| disk_number | integer | Disc of the release the track is on. |
| release_date | string | Date of the track's release, YYYY-MM-DD. album.release_date can differ. |
| explicit_lyrics | boolean | Whether Deezer marks the lyrics as explicit. |
| available_countries | array | Country codes of the markets Deezer offers the track in. |
| artist | object | The main artist, with id, name, link and pictures. |
| album | object | The release, with id, title, release_date and covers from cover_small to cover_xl. |
| error | string | Present instead of the above when the lookup failed. |
Errors
A failure answers with a status code and a JSON body of the form {"error": "…"}.
| Status | Message | Meaning |
|---|---|---|
400 | trackid parameter is required. | No trackid, or one without a digit in it. |
404 | Track not found. | Deezer reported an error for the id. That is a track that does not exist or was taken down, but also any other error Deezer returns in its answer. |
405 | Method not allowed. Allowed: GET, POST | Any other method. |
500 | Failed to connect to Deezer API. | Deezer could not be reached. |
| as Deezer | Deezer API returned HTTP code {status} | Deezer answered with a status other than 200, and that status is passed on. |
Rate limits
50 requests per second per IP address, burst 100, at most 50 concurrent connections, HTTP 429
over the limit.
Every request is also a request to Deezer, which sets limits of its own. A request Deezer refuses comes
back through the error rows above, not as 429.
Privacy
The track id is sent to this site, which asks Deezer from the server. Deezer sees the server, not you. Lookups appear in server logs for operational purposes and are not sold, shared or used to build profiles.
On the tool page the cover is the one thing your browser loads from Deezer directly, from
cdn-images.dzcdn.net. An API caller receives the cover addresses and decides for itself whether
to load them.