Get Several Tracks' Audio Features
Deprecated
client.AudioFeatures.BulkGet(ctx, query) (*AudioFeatureBulkGetResponse, error)
GET/audio-features
Get audio features for multiple tracks based on their Spotify IDs.
Parameters
Returns
Get Several Tracks' Audio Features
package main
import (
"context"
"fmt"
"github.com/cjavdev/spotted-go"
"github.com/cjavdev/spotted-go/option"
)
func main() {
client := spotted.NewClient(
option.WithAccessToken("My Access Token"),
)
response, err := client.AudioFeatures.BulkGet(context.TODO(), spotted.AudioFeatureBulkGetParams{
IDs: "7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.AudioFeatures)
}
{
"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
}
]
}