This tool is currently unavailable.
Network & Web 2021

Spotify Track ID Lookup

Resolve a Spotify track ID or link for a chosen market: title, artist, album, duration and whether the track can be played there, as a stable link with market and ID or through a JSON API.

Since

2021

Part of

troubleshooting.tools

Tool page in its current state
22
characters per track ID, checked up front
1
market per lookup, part of the link
2
forms of stable links: with and without market
0
API keys for users of the API

Technologies

PHP Spotify Web API OAuth 2.0 (Client Credentials) JSON Content Security Policy nginx Docker GitLab CI/CD

The Challenge

Spotify answers per country: whether a track can be played or is replaced by a differently licensed recording depends on the market, not on the recording. Anyone holding an ID from a log or a support case therefore needs the answer for exactly the country in question.

The Solution

The tool takes an ID or an open.spotify.com link, checks the market against Spotify's own market list and requests the track for exactly that country. Market and ID are part of the link, so a result can be shared and repeated.

How a lookup runs

ID or link

A 22-character track ID or an open.spotify.com link, also with a language segment such as /intl-de/ and share parameters such as ?si=. The ID is extracted from the link.

Market

A country from a searchable picker, defaulting to the US. The server checks the market against Spotify's own market list before requesting the track.

Result

Title, artist, album, release year, duration, track and disc number, explicit and playability as copyable fields. A track that cannot be played in the market is answered with “Not available”, not with an error. “Play on Spotify” asks before leaving the site.

Stable links

Under /lookup/spotify/track/{id} and /lookup/spotify/track/{market}/{id} the page opens straight on the result. Every lookup writes the form with market into the address, and back and forward repeat it. That way the same ID can be compared in two countries side by side.

API

Via GET or POST the API answers in JSON, without a key and with open CORS; the market is optional. The answer is a selection from Spotify's track record, extended with readable duration, market and release year. Errors come as JSON with a matching status, and the rate limit applies per address.

Platform and operations

The tool runs on the same platform as every tool on troubleshooting.tools: plain PHP behind nginx in one Docker image, a shared layout and router, a strict Content Security Policy per route, every resource served by the site itself. GitLab CI tests every branch, builds the images with Docker-in-Docker and deploys them; structured logs and external uptime checks monitor operations.

Privacy

The server queries Spotify, not the visitor's browser. “Play on Spotify” opens Spotify only after confirmation.

Results

A tool for the question of what a track is in a specific country, with stable links that carry market and ID. It is currently unavailable; page, links and API are in place and resume once the tool is available again.

Gallery

Screenshots of the public site in its current state.