API For Developpers
Our Web API gives external applications access to our database of Song Keys. It allows developers to build programs using getsongbpm's data on mobile devices or other web services. All you need is a valid API key!
Introduction
Any application can request data from GetSongBPM API endpoints, but it must be registered first. To register your application, fill in the form at the left (or top on mobiles) of this page.
Please contact us if your project is in development, for private use, or educational purposes (links from universities, colleges and schools are always greatly apreciated ;).
Get Started
Web API Base URL | https://api.getsongbpm.com |
Method | GET |
Authorization |
A valid API Key must be sent with all client requests, either via URL_PARAM (api_key ), or a X-API-KEY header parameter.Unauthenticated requests are not allowed, and rate limits apply. |
Endpoint Reference
Using our web API is very easy: endpoints return metadata in JSON format about artists, and songs.
Endpoint | Params | Returns |
---|---|---|
/search/ |
|
Array of song(s) or artist(s) matching your query. |
/artist/ |
|
Artist infos. |
/song/ |
|
Details about a song. |
/tempo/ |
|
Songs in the defined BPM or BPM range. |
/key/ |
|
Songs in the specified Key. |
Responses
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of values in JSON format.
On error, the header status code is an error code and the response body contains an error.
Search Object
Song Query
Key | Value Type | Value Description |
---|---|---|
id | String | The GetSong ID for the song. |
title | String | The title of the song. |
uri | String | The GetSong URI for the song. |
artist | array | See "artist" object. |
Artist Query
See "Artist" Object.
Both Query
Key | Value Type | Value Description |
---|---|---|
song_id | String | The GetSong ID for the song. |
song_title | String | The title of the song. |
song_uri | String | The GetSong URI for the song. |
tempo | Integrer | Beat per minute of the song. |
time_sig | Integrer | Time signature (beta). |
key_of | String | Original published key of the song. |
camelot | String | Name of the Key on the Camelot Wheel. |
artist | array | See "artist" object. |
album |
array {
|
Album name, The GetSong URI for the album, Link to album cover art, Release Year, |
Artist Object
Key | Value Type | Value Description |
---|---|---|
id | String | The GetSong ID for the artist. |
name | String | The name of the artist. |
uri | String | The GetSong URI for the artist. |
img | External URL | Link to artist photo. |
genres | array | Artist main genres. |
from | String | Country or region/city of origin. |
mbid | String | MusicBrainz ID. |
Song Object
Key | Value Type | Value Description |
---|---|---|
id | String | The GetSong ID for the song. |
title | String | The title of the song. |
uri | String | The GetSong URI for the song. |
artist | array | See "artist" object. |
tempo | Integrer | Beat per minute of the song (BPM). |
time_sig | Integrer | Time signature (beta). |
key_of | String | Original published key of the song. |
camelot | String | Name of the Key on the Camelot Wheel. |
Tempo Object
Key | Value Type | Value Description |
---|---|---|
song_id | String | The GetSong ID for the song. |
song_title | String | The title of the song. |
song_uri | String | The GetSong URI for the song. |
tempo | Integrer | Beat per minute of the song. |
artist | array | See "artist" object. |
album | array | Same keys and values as for "both" query type at /search/ endpoint. |
Key Object
Key | Value Type | Value Description |
---|---|---|
song_id | String | The GetSong ID for the song. |
song_title | String | The title of the song. |
song_uri | String | The GetSong URI for the song. |
music_key | array |
array {
|
artist | array | See "artist" object. |
album | array | Same keys and values as for "both" query type at /search/ endpoint. |
Examples
Search for an artist Search for "Green Day".curl -X GET "https://api.getsongbpm.com/search/?api_key=YOUR_API_KEY_HERE&type=artist&lookup=green+day"
Returns:
{ "search":[ { "id":"v9M", "name":"Green Day", "uri":"https:\/\/getsongbpm.com\/artist\/green-day\/v9M", "img":"https:\/\/lastfm-img2.akamaized.net\/i\/u\/2088cb779e7e4a828ddaea74fd0bacfa.png", "genres":[ "pop", "punk", "rock" ], "from":"US", "mbid":"084308bd-1654-436f-ba03-df6697104e19" }, ... ] }Get the BPM of a song Get the BPM of "Highway to hell" by "AC/DC".
curl -X GET "https://api.getsongbpm.com/song/?api_key=YOUR_API_KEY_HERE&id=983pB"
Returns:
{ "song": { "id":"983pB", "title":"Highway to Hell", "uri":"https:\/\/getsongbpm.com\/song\/highway-to-hell\/983pB", "artist":{ "id":"qB3", "name":"AC\/DC", "uri":"https:\/\/getsongbpm.com\/artist\/ac-dc\/qB3", "img":"https:\/\/lastfm-img2.akamaized.net\/i\/u\/d3f4e279a056464eb794710d8b4b69b7.png", "genres":[ "heavy metal", "rock" ], "from":"AU", "mbid":"66c662b6-6e2f-4930-8610-912e24c63ed1" }, "tempo":"112", "time_sig":"4\/4", "key_of":"F\u266fm", "camelot":"11A" } }
Changelog
Version | Date | Description |
---|---|---|
1.1.2 | 23/03/2022 |
• Added limit parameter for /search/ ,
/tempo/ and /key/ endpoints |
1.1.1 | 12/11/2019 |
• Added /key/ endpoint |
1.1 | 01/08/2019 |
• Added /tempo/ endpoint• Added artist nationality and genres where relevant • Changed response format for artists: data returned follows keys/values model of the artist object • Removed artist short biography bio at /artist/ endpoint• Fixed empty artist photo at /song/ endpoint |
1.0 | 02/02/2017 | Initial release. |