Get Track's Audio Features
Deprecated
client.AudioFeatures.Get(ctx, id) (*AudioFeatureGetResponse, error)
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
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"),
)
audioFeature, err := client.AudioFeatures.Get(context.TODO(), "11dFghVXANMlKmJXsNCbNl")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", audioFeature.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
}