Endpoint

GET https://api.spotify.com/v1/tracks

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.

Query Parameters

Query Parameter Value
ids Required. A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.
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 an object whose key is tracks and whose value is an array of track objects in JSON format.

Objects are returned in the order requested. If an object is not found, a null value is returned in the appropriate position. Duplicate ids in the query will result in duplicate objects in the response. On error, the header status code is an error code and the response body contains an error object.

Example

curl -X GET "https://api.spotify.com/v1/tracks/?ids=11dFghVXANMlKmJXsNCbNl,20I6sIOMTCkB6w7ryavxtO,7xGfFoTpQ2E7fRF5lN10tr" -H "Authorization: Bearer {your access token}"
{
  "tracks": [
    {
      "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"
    },
    {
      "album": {
        "album_type": "album",
        "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/6SSSF9Y6MiPdQoxqBptrR2"
        },
        "href": "https://api.spotify.com/v1/albums/6SSSF9Y6MiPdQoxqBptrR2",
        "id": "6SSSF9Y6MiPdQoxqBptrR2",
        "images": [
          {
            "height": 640,
            "url": "https://i.scdn.co/image/2fb20bf4c1fb29b503bfc21516ff4b1a334b6372",
            "width": 640
          },
          {
            "height": 300,
            "url": "https://i.scdn.co/image/a7b076ed5aa0746a21bc71ab7d2b6ed80dd3ebfe",
            "width": 300
          },
          {
            "height": 64,
            "url": "https://i.scdn.co/image/b1d4c7643cf17c06b967b50623d7d93725b31de5",
            "width": 64
          }
        ],
        "name": "Kiss",
        "release_date": "2012-01-01",
        "release_date_precision": "day",
        "type": "album",
        "uri": "spotify:album:6SSSF9Y6MiPdQoxqBptrR2"
      },
      "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": 193400,
      "explicit": false,
      "external_ids": {
        "isrc": "CAB391100615"
      },
      "external_urls": {
        "spotify": "https://open.spotify.com/track/20I6sIOMTCkB6w7ryavxtO"
      },
      "href": "https://api.spotify.com/v1/tracks/20I6sIOMTCkB6w7ryavxtO",
      "id": "20I6sIOMTCkB6w7ryavxtO",
      "is_local": false,
      "name": "Call Me Maybe",
      "popularity": 74,
      "preview_url": "https://p.scdn.co/mp3-preview/335bede49342352cddd53cc83af582e2240303bb?cid=774b29d4f13844c495f206cafdad9c86",
      "track_number": 3,
      "type": "track",
      "uri": "spotify:track:20I6sIOMTCkB6w7ryavxtO"
    },
    {
      "album": {
        "album_type": "album",
        "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/1DFixLWuPkv3KT3TnV35m3"
        },
        "href": "https://api.spotify.com/v1/albums/1DFixLWuPkv3KT3TnV35m3",
        "id": "1DFixLWuPkv3KT3TnV35m3",
        "images": [
          {
            "height": 640,
            "url": "https://i.scdn.co/image/3f65c5400c7f24541bfd48e60f646e6af4d6c666",
            "width": 640
          },
          {
            "height": 300,
            "url": "https://i.scdn.co/image/ff347680d9e62ccc144926377d4769b02a1024dc",
            "width": 300
          },
          {
            "height": 64,
            "url": "https://i.scdn.co/image/c836e14a8ceca89e18012cab295f58ceeba72594",
            "width": 64
          }
        ],
        "name": "Emotion (Deluxe)",
        "release_date": "2015-09-18",
        "release_date_precision": "day",
        "type": "album",
        "uri": "spotify:album:1DFixLWuPkv3KT3TnV35m3"
      },
      "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": 251319,
      "explicit": false,
      "external_ids": {
        "isrc": "USUM71507009"
      },
      "external_urls": {
        "spotify": "https://open.spotify.com/track/7xGfFoTpQ2E7fRF5lN10tr"
      },
      "href": "https://api.spotify.com/v1/tracks/7xGfFoTpQ2E7fRF5lN10tr",
      "id": "7xGfFoTpQ2E7fRF5lN10tr",
      "is_local": false,
      "name": "Run Away With Me",
      "popularity": 50,
      "preview_url": "https://p.scdn.co/mp3-preview/3e05f5ed147ca075c7ae77c01f2cc0e14cfad78d?cid=774b29d4f13844c495f206cafdad9c86",
      "track_number": 1,
      "type": "track",
      "uri": "spotify:track:7xGfFoTpQ2E7fRF5lN10tr"
    }
  ]
}

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.