Get Recommendations
GET
/recommendations
category-browse
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.spotify.com/recommendations?seed_artists=&seed_genres=&seed_tracks=' \
--header 'Authorization;'
响应示例响应示例
200 - 示例 1
{
"seeds": [
{
"afterFilteringSize": 0,
"afterRelinkingSize": 0,
"href": "string",
"id": "string",
"initialPoolSize": 0,
"type": "string"
}
],
"tracks": [
{
"album": {
"album_group": "string",
"album_type": "string",
"artists": [
{
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"name": "string",
"type": "string",
"uri": "string"
}
],
"available_markets": [
"string"
],
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"name": "string",
"release_date": "string",
"release_date_precision": "string",
"restrictions": {
"reason": "string"
},
"total_tracks": 0,
"type": "string",
"uri": "string"
},
"artists": [
{
"external_urls": {
"spotify": "string"
},
"followers": {
"href": "string",
"total": 0
},
"genres": [
"string"
],
"href": "string",
"id": "string",
"images": [
{
"height": 0,
"url": "string",
"width": 0
}
],
"name": "string",
"popularity": 0,
"type": "string",
"uri": "string"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "string",
"isrc": "string",
"upc": "string"
},
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"is_local": true,
"is_playable": true,
"linked_from": {
"external_urls": {
"spotify": "string"
},
"href": "string",
"id": "string",
"type": "string",
"uri": "string"
},
"name": "string",
"popularity": 0,
"preview_url": "string",
"restrictions": {
"reason": "string"
},
"track_number": 0,
"type": "string",
"uri": "string"
}
]
}
请求参数
Query 参数
limit
可选
market
可选
from_token
. Provide this parameter if you want to apply Track Relinking. Because min_*
, max_*
and target_*
are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via the linked_from
attribute of the relinked track response.seed_artists
必需
seed_artists
, seed_tracks
and seed_genres
.seed_genres
必需
seed_artists
, seed_tracks
and seed_genres
.seed_tracks
必需
seed_artists
, seed_tracks
and seed_genres
.min_acousticness
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_acousticness
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_acousticness
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_danceability
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_danceability
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_danceability
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_duration_ms
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_duration_ms
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_duration_ms
可选
min_energy
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_energy
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_energy
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_instrumentalness
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_instrumentalness
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_instrumentalness
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_key
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_key
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_key
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_liveness
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_liveness
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_liveness
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_loudness
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_loudness
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_loudness
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_mode
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_mode
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_mode
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_popularity
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_popularity
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_popularity
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_speechiness
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_speechiness
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_speechiness
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_tempo
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_tempo
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_tempo
可选
min_time_signature
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_time_signature
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_time_signature
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.min_valence
可选
min_tempo=140
would restrict results to only those tracks with a tempo of greater than 140 beats per minute.max_valence
可选
max_instrumentalness=0.35
would filter out most tracks that are likely to be instrumental.target_valence
可选
target_energy=0.6
and target_danceability=0.8
. All target values will be weighed equally in ranking results.Header 参数
Authorization
必需
返回响应
修改于 2021-08-02 10:49:33