Can I pull an album's worth of audio features from Spotify in Python?

37 Views Asked by At

I am working on a project in Python where I have a list of albums from various artists and I want the audio features for all of the tracks on each album. I have the spotify id for each album.

In R, there is a function called get_artist_audio_features() . My list of albums is quite long, so I don't want to pull all of the artists' data, but I will if that's the only way to quickly get all the data. Does Python have an equivalent to get_artist_audio_features() or something that would be more like to get_album_audio_features()?

Right now I use sp.album_tracks() to get the tracks for each album and then I set up a loop that uses sp.audio_features() on each track. Spotify sets a limit on how many songs you can do this for though, so it does not iterate through all my albums.

I have been getting my functions from this documentation: https://spotipy.readthedocs.io/en/2.22.1/

The function I'm looking for is not there but I just can't believe R's packages would be so much more robust than Python's, I must be missing something.

0

There are 0 best solutions below