A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.spotify.com/documentation/web-api/concepts/track-relinking below:

Track Relinking | Spotify for Developers

Track Relinking

The availability of a track depends on the country registered in the user’s Spotify profile settings. Often Spotify has several instances of a track in its catalogue, each available in a different set of markets. This commonly happens when the track the album is on has been released multiple times under different licenses in different markets.

These tracks are linked together so that when a user tries to play a track that isn’t available in their own market, the Spotify mobile, desktop, and web players try to play another instance of the track that is available in the user’s market.

Track Relinking in the Web API

If your application supplies a market parameter in its call to the following track endpoints, the Web API will attempt to return information about alternative tracks that are available in the specified market:

When using the market query parameter, the response will contain another instance of the tracks only if the original track is unavailable and other instances of the track are available.

For example, the track “Heaven and Hell” by William Onyeabor is not available in the United States (market code US), as shown by the request to retrieve the track’s metadata:


_10

curl -X GET "https://api.spotify.com/v1/tracks/6kLCHFM39wkFjOuyPGLGeQ"`



_10

available_markets: [ "AT", "AU", "BE", "DK", "ES", "FI",

_10

"FR", "HU", "IT", "PL", "PT", "SE",

_10

uri: "spotify:track:6kLCHFM39wkFjOuyPGLGeQ"


If a market query parameter specifying the US market is appended to the call, the Web API recognizes that the specified track is unplayable and instead returns information about a track that is playable in the specified market. In addition it returns information about the original track:


_10

curl -X GET "https://api.spotify.com/v1/tracks/6kLCHFM39wkFjOuyPGLGeQ?market=US"`



_15

spotify: "https://open.spotify.com/track/6kLCHFM39wkFjOuyPGLGeQ"

_15

href: "https://api.spotify.com/v1/tracks/6kLCHFM39wkFjOuyPGLGeQ",

_15

id: "6kLCHFM39wkFjOuyPGLGeQ",

_15

uri: "spotify:track:6kLCHFM39wkFjOuyPGLGeQ"

_15

uri: "spotify:track:6ozxplTAjWO0BlUxN8ia0A"


There are a number of important differences between the response you get with and without the market query parameter.

When the market parameter is supplied:

Valid market query parameter values are ISO 3166-1 alpha-2 codes, as well as from_token. If from_token is used, an access token tied to a user must be supplied; from_token is the same thing as setting the market parameter to the user’s country.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4