This is a wrapper for the get_recommendations() function, which provides a workaround for the limit of 5 seed tracks per recommendation call. The function splits a supplied vector of track IDs into subsets of length 5, then applies a get_recommendations() call, 5 tracks at a time. This should generate a data frame of recommended tracks, with length equal to the supplied vector of track ids.

get_recommendations_all(track_ids, valence = NULL)



A vector containing the IDs of the tracks you'd like recommendations for


The target valence for the recommendations


Returns a data frame containing recommendations from the Spotify API


get_recommendations_all(c("5VIpLopHgolKcSSj7JPCMA" "3QRGYDFFUVb4qneE4DX1gR" "5daijadRuGwMA4HvhuOW9P" "020F5NN49ygwQzy0MjV7vb" "1gXU06BFeIcmkpBWisYCMB", "1msXkHv84LKikJGKcfdGBu"))
#> Error: <text>:1:52: unexpected string constant #> 1: get_recommendations_all(c("5VIpLopHgolKcSSj7JPCMA" "3QRGYDFFUVb4qneE4DX1gR" #> ^