Psst! Check out our brand-new Web API Reference in beta!
And be sure to tweet us your feedback at @SpotifyPlatform on Twitter!
And be sure to tweet us your feedback at @SpotifyPlatform on Twitter!
Get a Track
Get Spotify catalog information for a single track identified by its unique Spotify ID.
Endpoint
GET https://api.spotify.com/v1/tracks/{id}
Request Parameters
Header Fields
Header Field | Value |
---|---|
Authorization | Required. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. |
Path Parameters
Path Parameter | Value |
---|---|
id | The Spotify ID for the track. |
Query Parameters
Query Parameter | Value |
---|---|
market | Optional. An ISO 3166-1 alpha-2 country code or the string from_token . Provide this parameter if you want to apply Track Relinking. |
Response Format
On success, the HTTP status code in the response header is 200
OK and the response body contains a track object in JSON format. On error, the header status code is an error code and the response body contains an error object.
Example Request
curl -X GET "https://api.spotify.com/v1/tracks/11dFghVXANMlKmJXsNCbNl" -H "Authorization: Bearer {your access token}"
{
"album": {
"album_type": "single",
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
},
"href": "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
"id": "6sFIWsNpZYqfjUpaCgueju",
"name": "Carly Rae Jepsen",
"type": "artist",
"uri": "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
}
],
"available_markets": [
"AD",
"AR",
"AT",
"AU",
"BE",
"BG",
"BO",
"BR",
"CA",
"CH",
"CL",
"CO",
"CR",
"CY",
"CZ",
"DE",
"DK",
"DO",
"EC",
"EE",
"ES",
"FI",
"FR",
"GB",
"GR",
"GT",
"HK",
"HN",
"HU",
"ID",
"IE",
"IL",
"IS",
"IT",
"JP",
"LI",
"LT",
"LU",
"LV",
"MC",
"MT",
"MX",
"MY",
"NI",
"NL",
"NO",
"NZ",
"PA",
"PE",
"PH",
"PL",
"PT",
"PY",
"RO",
"SE",
"SG",
"SK",
"SV",
"TH",
"TR",
"TW",
"US",
"UY",
"VN",
"ZA"
],
"external_urls": {
"spotify": "https://open.spotify.com/album/0tGPJ0bkWOUmH7MEOR77qc"
},
"href": "https://api.spotify.com/v1/albums/0tGPJ0bkWOUmH7MEOR77qc",
"id": "0tGPJ0bkWOUmH7MEOR77qc",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/966ade7a8c43b72faa53822b74a899c675aaafee",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/107819f5dc557d5d0a4b216781c6ec1b2f3c5ab2",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/5a73a056d0af707b4119a883d87285feda543fbb",
"width": 64
}
],
"name": "Cut To The Feeling",
"release_date": "2017-05-26",
"release_date_precision": "day",
"type": "album",
"uri": "spotify:album:0tGPJ0bkWOUmH7MEOR77qc"
},
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
},
"href": "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
"id": "6sFIWsNpZYqfjUpaCgueju",
"name": "Carly Rae Jepsen",
"type": "artist",
"uri": "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
}
],
"available_markets": [
"AD",
"AR",
"AT",
"AU",
"BE",
"BG",
"BO",
"BR",
"CA",
"CH",
"CL",
"CO",
"CR",
"CY",
"CZ",
"DE",
"DK",
"DO",
"EC",
"EE",
"ES",
"FI",
"FR",
"GB",
"GR",
"GT",
"HK",
"HN",
"HU",
"ID",
"IE",
"IL",
"IS",
"IT",
"JP",
"LI",
"LT",
"LU",
"LV",
"MC",
"MT",
"MX",
"MY",
"NI",
"NL",
"NO",
"NZ",
"PA",
"PE",
"PH",
"PL",
"PT",
"PY",
"RO",
"SE",
"SG",
"SK",
"SV",
"TH",
"TR",
"TW",
"US",
"UY",
"VN",
"ZA"
],
"disc_number": 1,
"duration_ms": 207959,
"explicit": false,
"external_ids": {
"isrc": "USUM71703861"
},
"external_urls": {
"spotify": "https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl"
},
"href": "https://api.spotify.com/v1/tracks/11dFghVXANMlKmJXsNCbNl",
"id": "11dFghVXANMlKmJXsNCbNl",
"is_local": false,
"name": "Cut To The Feeling",
"popularity": 63,
"preview_url": "https://p.scdn.co/mp3-preview/3eb16018c2a700240e9dfb8817b6f2d041f15eb1?cid=774b29d4f13844c495f206cafdad9c86",
"track_number": 1,
"type": "track",
"uri": "spotify:track:11dFghVXANMlKmJXsNCbNl"
}
track object (full)
Key | Value Type | Value Description |
---|---|---|
album | a simplified album object | The album on which the track appears. The album object includes a link in href to full information about the album. |
artists | an array of simplified artist objects | The artists who performed the track. Each artist object includes a link in href to more detailed information about the artist. |
available_markets | array of strings | A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code. |
disc_number | integer | The disc number (usually 1 unless the album consists of more than one disc). |
duration_ms | integer | The track length in milliseconds. |
explicit | Boolean | Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown). |
external_ids | an external ID object | Known external IDs for the track. |
external_urls | an external URL object | Known external URLs for this track. |
href | string | A link to the Web API endpoint providing full details of the track. |
id | string | The Spotify ID for the track. |
is_playable | boolean | Part of the response when Track Relinking is applied. If true , the track is playable in the given market. Otherwise false . |
linked_from | a linked track object | Part of the response when Track Relinking is applied, and the requested track has been replaced with different track. The track in the linked_from object contains information about the originally requested track. |
restrictions | a restrictions object | Part of the response when Track Relinking is applied, the original track is not available in the given market, and Spotify did not have any tracks to relink it with. The track response will still contain metadata for the original track, and a restrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"} |
name | string | The name of the track. |
popularity | integer | The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album) are rated independently. Artist and album popularity is derived mathematically from track popularity. Note that the popularity value may lag actual popularity by a few days: the value is not updated in real time. |
preview_url | string | A link to a 30 second preview (MP3 format) of the track. Can be null |
track_number | integer | The number of the track. If an album has several discs, the track number is the number on the specified disc. |
type | string | The object type: “track”. |
uri | string | The Spotify URI for the track. |