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.

PatternExample
/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

GET /v1/lookup/deezer/track?trackid={trackid}
POST /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.

NameTypeDefaultDescription
trackidintegerrequired The number of a Deezer track. Everything but digits is removed first, so a value with no digits in it counts as missing.
shell
$ 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:

json
{
  "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

FieldTypeDescription
idintegerThe track id that was looked up.
titlestringTitle of the recording.
isrcstringInternational Standard Recording Code, the same across services for the same recording.
linkstringThe track's address on Deezer.
durationintegerLength in seconds.
track_positionintegerPosition on the release.
disk_numberintegerDisc of the release the track is on.
release_datestringDate of the track's release, YYYY-MM-DD. album.release_date can differ.
explicit_lyricsbooleanWhether Deezer marks the lyrics as explicit.
available_countriesarrayCountry codes of the markets Deezer offers the track in.
artistobjectThe main artist, with id, name, link and pictures.
albumobjectThe release, with id, title, release_date and covers from cover_small to cover_xl.
errorstringPresent instead of the above when the lookup failed.

Errors

A failure answers with a status code and a JSON body of the form {"error": "…"}.

StatusMessageMeaning
400trackid parameter is required.No trackid, or one without a digit in it.
404Track 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.
405Method not allowed. Allowed: GET, POSTAny other method.
500Failed to connect to Deezer API.Deezer could not be reached.
as DeezerDeezer 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.