Get Spotify catalog information about an artist’s albums. Optional parameters can be specified in the query string to filter and sort the response.
Endpoint
GET https://api.spotify.com/v1/artists/{id}/albums
Request Parameters
| Path element | Value |
|---|---|
| id | The Spotify ID for the artist. |
Query parameter | Value |
|---|---|
| album_type | Optional. A comma-separated list of keywords that will be used to filter the response. If not supplied, all album types will be returned. Valid values are:
album_type=album,single. |
| market (synonym: country) | Optional. An ISO 3166-1 alpha-2 country code. Supply this parameter to limit the response to one particular geographical market. For example, for albums available in Sweden: market=SE. If not given, results will be returned for all markets and you are likely to get duplicate results per album, one for each market in which the album is available! |
| limit | Optional. The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: limit=2 |
| offset | Optional. The index of the first album to return. Default: 0 (i.e., the first album). Use with limit to get the next set of albums. |
Response Format
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified album objects (wrapped in a paging object) in JSON format. 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/artists/1vCWHaC5f2uS3yhpwWbIA6/albums?market=ES&album_type=single&limit=2"
{
"href" : "https://api.spotify.com/v1/artists/1vCWHaC5f2uS3yhpwWbIA6/albums?offset=0&limit=2&album_type=single&market=ES",
"items" : [ {
"album_type" : "single",
"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", "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" ],
"external_urls" : {
"spotify" : "https://open.spotify.com/album/3j3cgkuyo015dghNYhHnZJ"
},
"href" : "https://api.spotify.com/v1/albums/3j3cgkuyo015dghNYhHnZJ",
"id" : "3j3cgkuyo015dghNYhHnZJ",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/f8717f432506ab213c4de0c66d6ac24cd07ecf72",
"width" : 640
}, {
"height" : 300,
"url" : "https://i.scdn.co/image/502bc1e1726e2594cd0045473e10d9166fa79dd8",
"width" : 300
}, {
"height" : 64,
"url" : "https://i.scdn.co/image/d709f676d5c16db8941b1084b3ca348d35de04af",
"width" : 64
} ],
"name" : "The Days",
"type" : "album",
"uri" : "spotify:album:3j3cgkuyo015dghNYhHnZJ"
}, {
"album_type" : "single",
"available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "GR", "GT", "HK", "HN", "HU", "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" ],
"external_urls" : {
"spotify" : "https://open.spotify.com/album/1moqjcU7BoanAsSKRdHnP1"
},
"href" : "https://api.spotify.com/v1/albums/1moqjcU7BoanAsSKRdHnP1",
"id" : "1moqjcU7BoanAsSKRdHnP1",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/5f8349e8e4ed81b48f033a9818939c835520f150",
"width" : 640
}, {
"height" : 300,
"url" : "https://i.scdn.co/image/8a5e05379add83b787a4cf0c3909a415e60b93ef",
"width" : 300
}, {
"height" : 64,
"url" : "https://i.scdn.co/image/84f3422d4946c71c8891c0f0fcbe78d6e7395f5f",
"width" : 64
} ],
"name" : "Lay Me Down (Black Coffee Remix)",
"type" : "album",
"uri" : "spotify:album:1moqjcU7BoanAsSKRdHnP1"
} ],
"limit" : 2,
"next" : "https://api.spotify.com/v1/artists/1vCWHaC5f2uS3yhpwWbIA6/albums?offset=2&limit=2&album_type=single&market=ES",
"offset" : 0,
"previous" : null,
"total" : 41
}
album object (simplified)
| Key | Value Type | Value Description |
|---|---|---|
| album_type | string | The type of the album: one of "album", "single", or "compilation". |
| available_markets | array of strings | The markets in which the album is available: ISO 3166-1 alpha-2 country codes. Note that an album is considered available in a market when at least 1 of its tracks is available in that market. |
| external_urls | an external URL object | Known external URLs for this album. |
| href | string | A link to the Web API endpoint providing full details of the album. |
| id | string | The Spotify ID for the album. |
| images | array of image objects | The cover art for the album in various sizes, widest first. |
| name | string | The name of the album. |
| type | string | The object type: "album" |
| uri | string | The Spotify URI for the album. |
paging object
| Key | Value Type | Value Description |
|---|---|---|
| href | string | A link to the Web API endpoint returning the full result of the request. |
| items | an array of objects | The requested data. |
| limit | integer | The maximum number of items in the response (as set in the query or by default). |
| next | string | URL to the next page of items. (null if none) |
| offset | integer | The offset of the items returned (as set in the query or by default). |
| previous | string | URL to the previous page of items. (null if none) |
| total | integer | The total number of items available to return. |