Description Usage Arguments Value Examples
Create a playlist-style listening experience based on seed artists, tracks and genres.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 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
)
|
limit |
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. |
market |
Optional. An ISO 3166-1 alpha-2 country code or the string |
seed_artists |
A character vector of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of |
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_tracks |
A character vector of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of |
max_acousticness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' acousticness. |
max_danceability |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' danceability. |
max_duration_ms |
Optional. Integer indicating a hard ceiling on recommended tracks' duration in milliseconds. |
max_energy |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' energy. |
max_instrumentalness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' instrumentalness. |
max_key |
Optional. Integer ranging from 1 to 12 indicating a hard ceiling on recommended tracks' key. |
max_liveness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' liveness. |
max_loudness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' loudness. |
max_mode |
Optional. Integer ranging from 0 to 1 indicating a hard ceiling on recommended tracks' mode. |
max_popularity |
Optional. Integer ranging between 0 and 100 indicating a hard ceiling on recommended tracks' popularity. |
max_speechiness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' speechiness. |
max_tempo |
Optional. Numeric value indicating a hard ceiling on recommended tracks' tempo. |
max_time_signature |
Optional. Integer indicating a hard ceiling on recommended tracks' time signature. |
max_valence |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' valence. |
min_acousticness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' acousticness. |
min_danceability |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' danceability. |
min_duration_ms |
Optional. Integer indicating a hard floor on recommended tracks' duration in milliseconds. |
min_energy |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' energy. |
min_instrumentalness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' instrumentalness. |
min_key |
Optional. Integer ranging from 1 to 12 indicating a hard floor on recommended tracks' key. |
min_liveness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' liveness. |
min_loudness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' loudness. |
min_mode |
Optional. Integer ranging from 0 to 1 indicating a hard floor on recommended tracks' mode. |
min_popularity |
Optional. Integer ranging between 0 and 100 indicating a hard floor on recommended tracks' popularity. |
min_speechiness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' speechiness. |
min_tempo |
Optional. Numeric value indicating a hard floor on recommended tracks' tempo. |
min_time_signature |
Optional. Integer indicating a hard floor on recommended tracks' time signature. |
min_valence |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' valence. |
target_acousticness |
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_danceability |
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_duration_ms |
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 |
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_instrumentalness |
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_key |
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_liveness |
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_loudness |
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_mode |
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_popularity |
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_speechiness |
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_tempo |
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_time_signature |
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_valence |
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 |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_seeds_in_response |
Optional. Boolean for whether to include seed object in response. Defaults to |
Returns a data frame of results recommendations. See the official Spotify Web API documentation for more information.
1 2 3 4 5 | ## Not run:
## Get new Swedish music
get_recommendations(country = 'SE')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.