Get Several Tracks' Audio Features
Deprecated
audio_features.bulk_retrieve(AudioFeatureBulkRetrieveParams**kwargs) -> AudioFeatureBulkRetrieveResponse
GET/audio-features
Get audio features for multiple tracks based on their Spotify IDs.
Parameters
Returns
Get Several Tracks' Audio Features
import os
from spotted import Spotted
client = Spotted(
access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"), # This is the default and can be omitted
)
response = client.audio_features.bulk_retrieve(
ids="7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B",
)
print(response.audio_features){
"audio_features": [
{
"id": "2takcwOaAZWiXQijPHIx7B",
"acousticness": 0.00242,
"analysis_url": "https://api.spotify.com/v1/audio-analysis/2takcwOaAZWiXQijPHIx7B\n",
"danceability": 0.585,
"duration_ms": 237040,
"energy": 0.842,
"instrumentalness": 0.00686,
"key": 9,
"liveness": 0.0866,
"loudness": -5.883,
"mode": 0,
"published": true,
"speechiness": 0.0556,
"tempo": 118.211,
"time_signature": 4,
"track_href": "https://api.spotify.com/v1/tracks/2takcwOaAZWiXQijPHIx7B\n",
"type": "audio_features",
"uri": "spotify:track:2takcwOaAZWiXQijPHIx7B",
"valence": 0.428
}
]
}Returns Examples
{
"audio_features": [
{
"id": "2takcwOaAZWiXQijPHIx7B",
"acousticness": 0.00242,
"analysis_url": "https://api.spotify.com/v1/audio-analysis/2takcwOaAZWiXQijPHIx7B\n",
"danceability": 0.585,
"duration_ms": 237040,
"energy": 0.842,
"instrumentalness": 0.00686,
"key": 9,
"liveness": 0.0866,
"loudness": -5.883,
"mode": 0,
"published": true,
"speechiness": 0.0556,
"tempo": 118.211,
"time_signature": 4,
"track_href": "https://api.spotify.com/v1/tracks/2takcwOaAZWiXQijPHIx7B\n",
"type": "audio_features",
"uri": "spotify:track:2takcwOaAZWiXQijPHIx7B",
"valence": 0.428
}
]
}