Get Track's Audio Features
Deprecated
audio_features.retrieve(strid) -> AudioFeatureRetrieveResponse
GET/audio-features/{id}
Get audio feature information for a single track identified by its unique Spotify ID.
Parameters
Returns
Get Track's 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
)
audio_feature = client.audio_features.retrieve(
"11dFghVXANMlKmJXsNCbNl",
)
print(audio_feature.id){
"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
{
"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
}