Get Spotify catalog information for multiple tracks based on their Spotify IDs.
Endpoint
GET https://api.spotify.com/v1/tracks?ids={ids}
Request Parameters
Query argument | 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. 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=0eGsygTp906u18L0Oimnem,1lDWb6b6ieDQ2xT7ewTC3G"
{
"tracks": [ {
"album": {
"album_type": "album",
"external_urls": {
"spotify": "https://open.spotify.com/album/6TJmQnO44YE5BtTxH8pop1"
},
"href": "https://api.spotify.com/v1/albums/6TJmQnO44YE5BtTxH8pop1",
"id": "6TJmQnO44YE5BtTxH8pop1",
"images": [ {
"height": 640,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/8e13218039f81b000553e25522a7f0d7a0600f2e",
"width": 629
}, {
"height": 300,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/8c1e066b5d1045038437d92815d49987f519e44f",
"width": 295
}, {
"height": 64,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/d49268a8fc0768084f4750cf1647709e89a27172",
"width": 63
} ],
"name": "Hot Fuss",
"type": "album",
"uri": "spotify:album:6TJmQnO44YE5BtTxH8pop1"
},
"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", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ],
"disc_number": 1,
"duration_ms": 222075,
"explicit": false,
"external_ids": {
"isrc": "USIR20400274"
},
"external_urls": {
"spotify": "https://open.spotify.com/track/0eGsygTp906u18L0Oimnem"
},
"href": "https://api.spotify.com/v1/tracks/0eGsygTp906u18L0Oimnem",
"id": "0eGsygTp906u18L0Oimnem",
"name": "Mr. Brightside",
"popularity": 0,
"preview_url": "http://d318706lgtcm8e.cloudfront.net/mp3-preview/f454c8224828e21fa146af84916fd22cb89cedc6",
"track_number": 2,
"type": "track",
"uri": "spotify:track:0eGsygTp906u18L0Oimnem"
}, {
"album": {
"album_type": "album",
"external_urls": {
"spotify": "https://open.spotify.com/album/6TJmQnO44YE5BtTxH8pop1"
},
"href": "https://api.spotify.com/v1/albums/6TJmQnO44YE5BtTxH8pop1",
"id": "6TJmQnO44YE5BtTxH8pop1",
"images": [ {
"height": 640,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/8e13218039f81b000553e25522a7f0d7a0600f2e",
"width": 629
}, {
"height": 300,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/8c1e066b5d1045038437d92815d49987f519e44f",
"width": 295
}, {
"height": 64,
"url": "https://d3rt1990lpmkn.cloudfront.net/original/d49268a8fc0768084f4750cf1647709e89a27172",
"width": 63
} ],
"name": "Hot Fuss",
"type": "album",
"uri": "spotify:album:6TJmQnO44YE5BtTxH8pop1"
},
"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", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ],
"disc_number": 1,
"duration_ms": 197160,
"explicit": false,
"external_ids": {
"isrc": "USIR20400195"
},
"external_urls": {
"spotify": "https://open.spotify.com/track/1lDWb6b6ieDQ2xT7ewTC3G"
},
"href": "https://api.spotify.com/v1/tracks/1lDWb6b6ieDQ2xT7ewTC3G",
"id": "1lDWb6b6ieDQ2xT7ewTC3G",
"name": "Somebody Told Me",
"popularity": 0,
"preview_url": "http://d318706lgtcm8e.cloudfront.net/mp3-preview/4c63a3d4eaf7f8f86cfdb8bf46ef3974f4092357",
"track_number": 4,
"type": "track",
"uri": "spotify:track:1lDWb6b6ieDQ2xT7ewTC3G"
} ]
}
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. |
| 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 is calculated from both total plays and most recent plays. |
| preview_url | string | A link to a 30 second preview (MP3 format) of the track. |
| 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. |