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. 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/3n3Ppam7vgaVa1iaRUc9Lp" -H "Authorization: Bearer {your access token}"
{
  "album" : {
    "album_type" : "album",
    "artists" : [ {
      "external_urls" : {
        "spotify" : "https://open.spotify.com/artist/0C0XlULifJtAgn6ZNCW2eu"
      },
      "href" : "https://api.spotify.com/v1/artists/0C0XlULifJtAgn6ZNCW2eu",
      "id" : "0C0XlULifJtAgn6ZNCW2eu",
      "name" : "The Killers",
      "type" : "artist",
      "uri" : "spotify:artist:0C0XlULifJtAgn6ZNCW2eu"
    } ],
    "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IS", "IT", "JP", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "SE", "SG", "SK", "SV", "TR", "TW", "UY" ],
    "external_urls" : {
      "spotify" : "https://open.spotify.com/album/4OHNH3sDzIxnmUADXzv2kT"
    },
    "href" : "https://api.spotify.com/v1/albums/4OHNH3sDzIxnmUADXzv2kT",
    "id" : "4OHNH3sDzIxnmUADXzv2kT",
    "images" : [ {
      "height" : 640,
      "url" : "https://i.scdn.co/image/ac68a9e4a867ec3ce8249cd90a2d7c73755fb487",
      "width" : 629
    }, {
      "height" : 300,
      "url" : "https://i.scdn.co/image/d0186ad64df7d6fc5f65c20c7d16f4279ffeb815",
      "width" : 295
    }, {
      "height" : 64,
      "url" : "https://i.scdn.co/image/7c3ec33d478f5f517eeb5339c2f75f150e4d601e",
      "width" : 63
    } ],
    "name" : "Hot Fuss (Deluxe Version)",
    "type" : "album",
    "uri" : "spotify:album:4OHNH3sDzIxnmUADXzv2kT"
  },
  "artists" : [ {
    "external_urls" : {
      "spotify" : "https://open.spotify.com/artist/0C0XlULifJtAgn6ZNCW2eu"
    },
    "href" : "https://api.spotify.com/v1/artists/0C0XlULifJtAgn6ZNCW2eu",
    "id" : "0C0XlULifJtAgn6ZNCW2eu",
    "name" : "The Killers",
    "type" : "artist",
    "uri" : "spotify:artist:0C0XlULifJtAgn6ZNCW2eu"
  } ],
  "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IS", "IT", "JP", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "SE", "SG", "SK", "SV", "TR", "TW", "UY" ],
  "disc_number" : 1,
  "duration_ms" : 222200,
  "explicit" : false,
  "external_ids" : {
    "isrc" : "GBFFP0300052"
  },
  "external_urls" : {
    "spotify" : "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp"
  },
  "href" : "https://api.spotify.com/v1/tracks/3n3Ppam7vgaVa1iaRUc9Lp",
  "id" : "3n3Ppam7vgaVa1iaRUc9Lp",
  "name" : "Mr. Brightside",
  "popularity" : 73,
  "preview_url" : "https://p.scdn.co/mp3-preview/4839b070015ab7d6de9fec1756e1f3096d908fba",
  "track_number" : 2,
  "type" : "track",
  "uri" : "spotify:track:3n3Ppam7vgaVa1iaRUc9Lp"
}

Try it

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.