API For Developpers

Our Web API gives external applications access to our BPM database. 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!

Using our API is free but a link back to GetSongBPM .com is REQUIRED (Website, in-App or Store Listing), or we may suspend your account at any time without prior notice.

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 of this page.

Please contact us if your project is in development, for private use, or educational purposes.

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 that 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/
  • type (required): "song", "artist" or "both"
  • lookup (required): Song title (urlencoded) or Artist name (urlencoded), depending on selected type.
    For "both" type, prepend searched terms with "song:" and "artist:", like that: lookup=song:enter+sandman artist:metallica
Array of song(s) or artist(s) matching your query.
/artist/
  • id (required): artist ID
Artist infos.
/song/
  • id (required): song ID
Details about a song.
/tempo/
  • bpm (required): target BPM (allowed range: 40-220 BPM)
Songs with targeted BPM. Results limited to the 250 most viewed songs in the last 30 days.

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 {
  • title: string
  • uri: string
  • img: External URL
  • year: integrer
}
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.

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 01/08/2019 • Added /bpm/ endpoint
• Added artist nationality and genres info.
• 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 /bpm/ endpoint
1.0 02/02/2017 Initial release.