EVOLUTION-MANAGER
Edit File: get_recommendations.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create a playlist-style listening experience based on seed...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for get_recommendations {spotifyr}"><tr><td>get_recommendations {spotifyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a playlist-style listening experience based on seed artists, tracks and genres.</h2> <h3>Description</h3> <p>All parameters are optional, but at least one of <code>seed_artists</code>, <code>seed_tracks</code> and <code>seed_genres</code> must be given. </p> <h3>Usage</h3> <pre> 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 ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>limit</code></td> <td> <p>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.</p> </td></tr> <tr valign="top"><td><code>market</code></td> <td> <p>Optional. An <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country code</a> or the string <code>from_token</code>. Provide this parameter if you want to apply <a href="https://developer.spotify.com/documentation/general/guides/track-relinking-guide/">Track Relinking</a>. Because <code>min_*</code>, <code>max_*</code> and <code>target_*</code> are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via the <code>linked_from</code> attribute of the <a href="https://developer.spotify.com/documentation/general/guides/track-relinking-guide/">relinked track response</a>.</p> </td></tr> <tr valign="top"><td><code>seed_artists</code></td> <td> <p>A character vector of <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a> for seed artists. Up to 5 seed values may be provided in any combination of <code>seed_artists</code>, <code>seed_tracks</code> and <code>seed_genres</code>.</p> </td></tr> <tr valign="top"><td><code>seed_genres</code></td> <td> <p>A character vector of any genres in the set of <a href="https://developer.spotify.com/documentation/web-api/reference/browse/get-recommendations/#available-genre-seeds">available genre seeds</a>. Up to 5 seed values may be provided in any combination of <code>seed_artists</code>, <code>seed_tracks</code> and <code>seed_genres</code>.</p> </td></tr> <tr valign="top"><td><code>seed_tracks</code></td> <td> <p>A character vector of <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a> for a seed track. Up to 5 seed values may be provided in any combination of <code>seed_artists</code>, <code>seed_tracks</code> and <code>seed_genres</code>.</p> </td></tr> <tr valign="top"><td><code>max_acousticness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' acousticness.</p> </td></tr> <tr valign="top"><td><code>max_danceability</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' danceability.</p> </td></tr> <tr valign="top"><td><code>max_duration_ms</code></td> <td> <p>Optional. Integer indicating a hard ceiling on recommended tracks' duration in milliseconds.</p> </td></tr> <tr valign="top"><td><code>max_energy</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' energy.</p> </td></tr> <tr valign="top"><td><code>max_instrumentalness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' instrumentalness.</p> </td></tr> <tr valign="top"><td><code>max_key</code></td> <td> <p>Optional. Integer ranging from 1 to 12 indicating a hard ceiling on recommended tracks' key.</p> </td></tr> <tr valign="top"><td><code>max_liveness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' liveness.</p> </td></tr> <tr valign="top"><td><code>max_loudness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' loudness.</p> </td></tr> <tr valign="top"><td><code>max_mode</code></td> <td> <p>Optional. Integer ranging from 0 to 1 indicating a hard ceiling on recommended tracks' mode.</p> </td></tr> <tr valign="top"><td><code>max_popularity</code></td> <td> <p>Optional. Integer ranging between 0 and 100 indicating a hard ceiling on recommended tracks' popularity.</p> </td></tr> <tr valign="top"><td><code>max_speechiness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' speechiness.</p> </td></tr> <tr valign="top"><td><code>max_tempo</code></td> <td> <p>Optional. Numeric value indicating a hard ceiling on recommended tracks' tempo.</p> </td></tr> <tr valign="top"><td><code>max_time_signature</code></td> <td> <p>Optional. Integer indicating a hard ceiling on recommended tracks' time signature.</p> </td></tr> <tr valign="top"><td><code>max_valence</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' valence.</p> </td></tr> <tr valign="top"><td><code>min_acousticness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' acousticness.</p> </td></tr> <tr valign="top"><td><code>min_danceability</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' danceability.</p> </td></tr> <tr valign="top"><td><code>min_duration_ms</code></td> <td> <p>Optional. Integer indicating a hard floor on recommended tracks' duration in milliseconds.</p> </td></tr> <tr valign="top"><td><code>min_energy</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' energy.</p> </td></tr> <tr valign="top"><td><code>min_instrumentalness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' instrumentalness.</p> </td></tr> <tr valign="top"><td><code>min_key</code></td> <td> <p>Optional. Integer ranging from 1 to 12 indicating a hard floor on recommended tracks' key.</p> </td></tr> <tr valign="top"><td><code>min_liveness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' liveness.</p> </td></tr> <tr valign="top"><td><code>min_loudness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' loudness.</p> </td></tr> <tr valign="top"><td><code>min_mode</code></td> <td> <p>Optional. Integer ranging from 0 to 1 indicating a hard floor on recommended tracks' mode.</p> </td></tr> <tr valign="top"><td><code>min_popularity</code></td> <td> <p>Optional. Integer ranging between 0 and 100 indicating a hard floor on recommended tracks' popularity.</p> </td></tr> <tr valign="top"><td><code>min_speechiness</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' speechiness.</p> </td></tr> <tr valign="top"><td><code>min_tempo</code></td> <td> <p>Optional. Numeric value indicating a hard floor on recommended tracks' tempo.</p> </td></tr> <tr valign="top"><td><code>min_time_signature</code></td> <td> <p>Optional. Integer indicating a hard floor on recommended tracks' time signature.</p> </td></tr> <tr valign="top"><td><code>min_valence</code></td> <td> <p>Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' valence.</p> </td></tr> <tr valign="top"><td><code>target_acousticness</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_danceability</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_duration_ms</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_energy</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_instrumentalness</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_key</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_liveness</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_loudness</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_mode</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_popularity</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_speechiness</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_tempo</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_time_signature</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>target_valence</code></td> <td> <p>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 <code>target_energy = 0.6</code> and <code>target_danceability = 0.8</code>. All target values will be weighed equally in ranking results.</p> </td></tr> <tr valign="top"><td><code>authorization</code></td> <td> <p>Required. A valid access token from the Spotify Accounts service. See the <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/">Web API authorization guide</a> for more details. Defaults to <code>spotifyr::get_spotify_access_token()</code></p> </td></tr> <tr valign="top"><td><code>include_seeds_in_response</code></td> <td> <p>Optional. Boolean for whether to include seed object in response. Defaults to <code>FALSE</code>.</p> </td></tr> </table> <h3>Value</h3> <p>Returns a data frame of results recommendations. See the official <a href="https://developer.spotify.com/documentation/web-api/reference/#category-search">Spotify Web API documentation</a> for more information. </p> <h3>See Also</h3> <p>Other personalization functions: <code><a href="get_my_top_artists_or_tracks.html">get_my_top_artists_or_tracks</a>()</code>, <code><a href="get_recommendations_all.html">get_recommendations_all</a>()</code> </p> <h3>Examples</h3> <pre> get_recommendations(market = 'SE', seed_genres = 'rock') </pre> <hr /><div style="text-align: center;">[Package <em>spotifyr</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>