Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API provide track BPM tempo? [closed]

i am looking for API can provide track tempo BPM by artist and track name ( title ) , so far i found Spotify can do this , but i can't use it because its require auth_token which user should login to Spotify to be able to use this API .

$curl -X GET "https://api.spotify.com/v1/audio-features/06AKEBrKUckW0KREUWRnvT" -H "Authorization: Bearer {your access token}"

{
  "danceability" : 0.735,
  "energy" : 0.578,
  "key" : 5,
  "loudness" : -11.840,
  "mode" : 0,
  "speechiness" : 0.0461,
  "acousticness" : 0.514,
  "instrumentalness" : 0.0902,
  "liveness" : 0.159,
  "valence" : 0.624,
  "tempo" : 98.002,
  "type" : "audio_features",
  "id" : "06AKEBrKUckW0KREUWRnvT",
  "uri" : "spotify:track:06AKEBrKUckW0KREUWRnvT",
  "track_href" : "https://api.spotify.com/v1/tracks/06AKEBrKUckW0KREUWRnvT",
  "analysis_url" : "https://api.spotify.com/v1/audio-analysis/06AKEBrKUckW0KREUWRnvT",
  "duration_ms" : 255349,
  "time_signature" : 4
}

i found this website https://songbpm.com they are using Spotify API without Auth_token ( for login ) to get the track BPM.

any idea about this trick ?

like image 487
Noob Avatar asked Oct 27 '25 09:10

Noob


1 Answers

It sounds like you need the Client Credentials auth flow, which lets you create access tokens that are tied to your client id, but not to any specific user. You won't be able to make requests for any specific user (i.e. modifying playlists).

Hope that helps!

like image 100
Hugh Rawlinson Avatar answered Oct 29 '25 05:10

Hugh Rawlinson