Tracks

Get Recommendations

GET
/recommendations

Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.

For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.

Authorization

oauth_2_0
AuthorizationBearer <token>

Spotify supports OAuth 2.0 for authenticating all API requests.

In: header

Query Parameters

limit?Limit

The target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response. Default: 20. Minimum: 1. Maximum: 100.

Range1 <= value <= 100
Default20
market?Market

An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter. Note: If neither market or user country are provided, the content is considered unavailable for the client. Users can view the country that is associated with their account in the account settings.

seed_artists?Spotify Artist ID Seeds

A comma separated list of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. Note: only required if seed_genres and seed_tracks are not set.

seed_genres?Genres Seeds

A comma separated list of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. Note: only required if seed_artists and seed_tracks are not set.

seed_tracks?Spotify Track ID Seeds

A comma separated list of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. Note: only required if seed_artists and seed_genres are not set.

min_acousticness?Min. Acousticness

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_acousticness?Max. Acousticness

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_acousticness?Target Acousticness

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_danceability?Min. Danceability

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_danceability?Max. Danceability

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_danceability?Target Danceability

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_duration_ms?Min. Duration (ms)

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

max_duration_ms?Max. Duration (ms)

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

target_duration_ms?Target Duration (ms)

Target duration of the track (ms)

min_energy?Min. Energy

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_energy?Max. Energy

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_energy?Target Energy

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_instrumentalness?Min. Instrumentalness

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_instrumentalness?Max. Instrumentalness

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_instrumentalness?Target Instrumentalness

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_key?Min. Key

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 11
max_key?Max. Key

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 11
target_key?Target Key

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 11
min_liveness?Min. Liveness

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_liveness?Max. Liveness

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_liveness?Target Liveness

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_loudness?Min. Loudness

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

max_loudness?Max. Loudness

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

target_loudness?Target Loudness

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

min_mode?Min. Mode

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_mode?Max. Mode

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_mode?Target Mode

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_popularity?Min. Popularity

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 100
max_popularity?Max. Popularity

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 100
target_popularity?Target Popularity

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 100
min_speechiness?Min. Speechiness

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_speechiness?Max. Speechiness

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_speechiness?Target Speechiness

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1
min_tempo?Min. Tempo

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

max_tempo?Max. Tempo

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

target_tempo?Target Tempo

Target tempo (BPM)

min_time_signature?Min. Time Signature

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Rangevalue <= 11
max_time_signature?Max. Time Signature

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

target_time_signature?Target Time Signature

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

min_valence?Min. Valence

For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.

Range0 <= value <= 1
max_valence?Max. Valence

For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.

Range0 <= value <= 1
target_valence?Target Valence

For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.

Range0 <= value <= 1

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/recommendations"
{  "seeds": [    {      "afterFilteringSize": 0,      "afterRelinkingSize": 0,      "href": "string",      "id": "string",      "initialPoolSize": 0,      "type": "string"    }  ],  "tracks": [    {      "album": {        "album_type": "compilation",        "total_tracks": 9,        "available_markets": [          "CA",          "BR",          "IT"        ],        "external_urls": {          "spotify": "string"        },        "href": "string",        "id": "2up3OPMp9Tb4dAKM2erWXQ",        "images": [          {            "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",            "height": 300,            "width": 300          }        ],        "name": "string",        "release_date": "1981-12",        "release_date_precision": "year",        "restrictions": {          "reason": "market"        },        "type": "album",        "uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",        "artists": [          {            "external_urls": {              "spotify": "string"            },            "href": "string",            "id": "string",            "name": "string",            "type": "artist",            "uri": "string"          }        ]      },      "artists": [        {          "external_urls": {            "spotify": "string"          },          "followers": {            "href": "string",            "total": 0          },          "genres": [            "Prog rock",            "Grunge"          ],          "href": "string",          "id": "string",          "images": [            {              "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",              "height": 300,              "width": 300            }          ],          "name": "string",          "popularity": 0,          "type": "artist",          "uri": "string"        }      ],      "available_markets": [        "string"      ],      "disc_number": 0,      "duration_ms": 0,      "explicit": true,      "external_ids": {        "isrc": "string",        "ean": "string",        "upc": "string"      },      "external_urls": {        "spotify": "string"      },      "href": "string",      "id": "string",      "is_playable": true,      "linked_from": {        "external_urls": {          "spotify": "string"        },        "href": "string",        "id": "string",        "type": "string",        "uri": "string"      },      "restrictions": {        "reason": "string"      },      "name": "string",      "popularity": 0,      "preview_url": "string",      "track_number": 0,      "type": "track",      "uri": "string",      "is_local": true    }  ]}