Spotify Web API
  1. category-tracks
Spotify Web API
  • category-albums
    • Get Multiple Albums
      GET
    • Get an Album
      GET
    • Get an Album's Tracks
      GET
  • category-artists
    • Get Multiple Artists
      GET
    • Get an Artist
      GET
    • Get an Artist's Albums
      GET
    • Get an Artist's Related Artists
      GET
    • Get an Artist's Top Tracks
      GET
  • category-tracks
    • Get Audio Analysis for a Track
      GET
    • Get Audio Features for Several Tracks
      GET
    • Get Audio Features for a Track
      GET
    • Get Several Tracks
      GET
    • Get a Track
      GET
  • category-browse
    • Get All Categories
      GET
    • Get a Category
      GET
    • Get a Category's Playlists
      GET
    • Get All Featured Playlists
      GET
    • Get All New Releases
      GET
    • Get Recommendations
      GET
    • Get Recommendation Genres
      GET
  • category-episodes
    • Get Multiple Episodes
      GET
    • Get an Episode
      GET
  • category-markets
    • Get Available Markets
      GET
  • category-users-profile
    • Get Current User's Profile
    • Get a User's Profile
  • category-library
    • Remove Albums for Current User
    • Get User's Saved Albums
    • Save Albums for Current User
    • Check User's Saved Albums
    • Remove User's Saved Episodes
    • Get User's Saved Episodes
    • Save Episodes for User
    • Check User's Saved Episodes
    • Remove User's Saved Shows
    • Get User's Saved Shows
    • Save Shows for Current User
    • Check User's Saved Shows
    • Remove User's Saved Tracks
    • Get User's Saved Tracks
    • Save Tracks for User
    • Check User's Saved Tracks
  • category-follow
    • Unfollow Artists or Users
    • Get User's Followed Artists
    • Follow Artists or Users
    • Get Following State for Artists/Users
    • Unfollow Playlist
    • Follow a Playlist
    • Check if Users Follow a Playlist
  • category-player
    • Get Information About The User's Current Playback
    • Transfer a User's Playback
    • Get the User's Currently Playing Track
    • Get a User's Available Devices
    • Skip User’s Playback To Next Track
    • Pause a User's Playback
    • Start/Resume a User's Playback
    • Skip User’s Playback To Previous Track
    • Add an item to queue
    • Get Current User's Recently Played Tracks
    • Set Repeat Mode On User’s Playback
    • Seek To Position In Currently Playing Track
    • Toggle Shuffle For User’s Playback
    • Set Volume For User's Playback
  • category-playlists
    • Get a List of Current User's Playlists
    • Get a Playlist
    • Change a Playlist's Details
    • Get a Playlist Cover Image
    • Upload a Custom Playlist Cover Image
    • Remove Items from a Playlist
    • Get a Playlist's Items
    • Add Items to a Playlist
    • Reorder or Replace a Playlist's Items
    • Get a List of a User's Playlists
    • Create a Playlist
  • category-personalization
    • Get a User's Top Artists and Tracks
  • category-search
    • Search for an Item
  • category-shows
    • Get Multiple Shows
    • Get a Show
    • Get a Show's Episodes
  1. category-tracks

Get Audio Analysis for a Track

Developing
GET
/audio-analysis/{id}
category-tracks
Get a detailed audio analysis for a single track identified by its unique
Spotify ID.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.spotify.com/v1/audio-analysis/' \
--header 'Authorization;'
Response Response Example
200 - Example 1
{
  "bars": [
    {
      "confidence": 0,
      "duration": 0,
      "start": 0
    }
  ],
  "beats": [
    {
      "confidence": 0,
      "duration": 0,
      "start": 0
    }
  ],
  "sections": [
    {
      "confidence": 0,
      "duration": 0,
      "key": 0,
      "key_confidence": 0,
      "loudness": 0,
      "mode": 0,
      "mode_confidence": 0,
      "start": 0,
      "tempo": 0,
      "tempo_confidence": 0,
      "time_signature": 0,
      "time_signature_confidence": 0
    }
  ],
  "segments": [
    {
      "confidence": 0,
      "duration": 0,
      "loudness_end": 0,
      "loudness_max": 0,
      "loudness_max_time": 0,
      "loudness_start": 0,
      "pitches": [
        0
      ],
      "start": 0,
      "timbre": [
        0
      ]
    }
  ],
  "tatums": [
    {
      "confidence": 0,
      "duration": 0,
      "start": 0
    }
  ]
}

Request

Path Params
id
string 
required
The Spotify ID for the track.
Header Params
Authorization
string 
required
valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.

Responses

🟢200On success, the HTTP status code in the response header is `200 OK` and the response body contains an audio analysis object in JSON format. On error, the header status code is an [error code](https://developer.spotify.com/documentation/web-api/#response-s
application/json
Body
bars
array[object (TimeIntervalObject) {3}] 
optional
The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined as a given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.
confidence
number 
optional
The confidence, from 0.0 to 1.0, of the reliability of the interval.
duration
number 
optional
The duration (in seconds) of the time interval.
start
number 
optional
The starting point (in seconds) of the time interval.
beats
array[object (TimeIntervalObject) {3}] 
optional
The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music; for example, each tick of a metronome. Beats are typically multiples of tatums.
confidence
number 
optional
The confidence, from 0.0 to 1.0, of the reliability of the interval.
duration
number 
optional
The duration (in seconds) of the time interval.
start
number 
optional
The starting point (in seconds) of the time interval.
sections
array[object (SectionObject) {12}] 
optional
Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
confidence
number 
optional
The confidence, from 0.0 to 1.0, of the reliability of the section’s "designation".
duration
number 
optional
The duration (in seconds) of the section.
key
integer <int32>
optional
key_confidence
number 
optional
loudness
number 
optional
The overall loudness of the section in decibels (dB). Loudness values are useful for comparing relative loudness of sections within tracks.
mode
integer <int32>
optional
mode_confidence
number 
optional
start
number 
optional
The starting point (in seconds) of the section.
tempo
number 
optional
The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.
tempo_confidence
number 
optional
time_signature
integer <int32>
optional
time_signature_confidence
number 
optional
segments
array[object (SegmentObject) {9}] 
optional
Audio segments attempts to subdivide a song into many segments, with each segment containing a roughly consistent sound throughout its duration.
confidence
number 
optional
duration
number 
optional
loudness_end
number 
optional
loudness_max
number 
optional
loudness_max_time
number 
optional
loudness_start
number 
optional
pitches
array[number]
optional
start
number 
optional
timbre
array[number]
optional
tatums
array[object (TimeIntervalObject) {3}] 
optional
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing of perceived musical events (segments).
confidence
number 
optional
The confidence, from 0.0 to 1.0, of the reliability of the interval.
duration
number 
optional
The duration (in seconds) of the time interval.
start
number 
optional
The starting point (in seconds) of the time interval.
🔴500500
Modified at 2022-09-12 10:04:50
Previous
Get an Artist's Top Tracks
Next
Get Audio Features for Several Tracks
Built with