All parameters are optional, but at least one of
seed_artists
, seed_tracks
and seed_genres
must be given.
get_recommendations(
limit = 20,
market = NULL,
seed_artists = NULL,
seed_genres = NULL,
seed_tracks = NULL,
max_acousticness = NULL,
max_danceability = NULL,
max_duration_ms = NULL,
max_energy = NULL,
max_instrumentalness = NULL,
max_key = NULL,
max_liveness = NULL,
max_loudness = NULL,
max_mode = NULL,
max_popularity = NULL,
max_speechiness = NULL,
max_tempo = NULL,
max_time_signature = NULL,
max_valence = NULL,
min_acousticness = NULL,
min_danceability = NULL,
min_duration_ms = NULL,
min_energy = NULL,
min_instrumentalness = NULL,
min_key = NULL,
min_liveness = NULL,
min_loudness = NULL,
min_mode = NULL,
min_popularity = NULL,
min_speechiness = NULL,
min_tempo = NULL,
min_time_signature = NULL,
min_valence = NULL,
target_acousticness = NULL,
target_danceability = NULL,
target_duration_ms = NULL,
target_energy = NULL,
target_instrumentalness = NULL,
target_key = NULL,
target_liveness = NULL,
target_loudness = NULL,
target_mode = NULL,
target_popularity = NULL,
target_speechiness = NULL,
target_tempo = NULL,
target_time_signature = NULL,
target_valence = NULL,
authorization = get_spotify_access_token(),
include_seeds_in_response = FALSE
)
Returns a data frame of results recommendations. See the official Spotify Web API documentation for more information.
Optional. 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.
Optional.
An ISO 3166-1 alpha-2 country code or the string 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.
A character vector 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
.
A character vector 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
.
A character vector 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
.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' acousticness.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' danceability.
Optional. Integer indicating a hard ceiling on recommended tracks' duration in milliseconds.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' energy.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' instrumentalness.
Optional. Integer ranging from 1 to 12 indicating a hard ceiling on recommended tracks' key.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' liveness.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' loudness.
Optional. Integer ranging from 0 to 1 indicating a hard ceiling on recommended tracks' mode.
Optional. Integer ranging between 0 and 100 indicating a hard ceiling on recommended tracks' popularity.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' speechiness.
Optional. Numeric value indicating a hard ceiling on recommended tracks' tempo.
Optional. Integer indicating a hard ceiling on recommended tracks' time signature.
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' valence.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' acousticness.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' danceability.
Optional. Integer indicating a hard floor on recommended tracks' duration in milliseconds.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' energy.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' instrumentalness.
Optional. Integer ranging from 1 to 12 indicating a hard floor on recommended tracks' key.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' liveness.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' loudness.
Optional. Integer ranging from 0 to 1 indicating a hard floor on recommended tracks' mode.
Optional. Integer ranging between 0 and 100 indicating a hard floor on recommended tracks' popularity.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' speechiness.
Optional. Numeric value indicating a hard floor on recommended tracks' tempo.
Optional. Integer indicating a hard floor on recommended tracks' time signature.
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' valence.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' acousticness. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' danceability. 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.
Optional. Integer indicating a target value for recommended tracks' duration in milliseconds. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' energy. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' instrumentalness. 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.
Optional. Integer ranging from 1 to 12 indicating a target value for recommended tracks' key. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' liveness. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' loudness. 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.
Optional. Integer ranging from 0 to 1 indicating a target value for recommended tracks' mode. 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.
Optional. Integer ranging between 0 and 100 indicating a target value for recommended tracks' popularity. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' speechiness. 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.
Optional. Numeric value indicating a target value for recommended tracks' tempo. 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.
Optional. Integer indicating a target value for recommended tracks' time signature. 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.
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' valence. 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.
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to spotifyr::get_spotify_access_token()
Optional. Boolean for whether to include seed object in response. Defaults to FALSE
.
Other personalization functions:
get_my_top_artists_or_tracks()
,
get_recommendations_all()
if (FALSE) {
get_recommendations(market = 'SE', seed_genres = 'rock')
}
Run the code above in your browser using DataLab