API

For Webmasters

Our Web API gives external applications access to our BPM database. All you need is a valid API key!

Endpoint Reference

Using our web API is very easy: endpoints return metadata in JSON format about artists, and songs.

  • Web API Base URL: https://api.getsongbpm.com
  • Method: GET

Please note that unauthenticated requests are not allowed, and that rate limits apply.

Endpoint Params Returns
/search/
  • api_key (required): your API key
  • 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/
  • api_key (required): your API key
  • id (required): artist ID
Artist infos.
/song/
  • api_key (required): your API key
  • id (required): song ID
Details about a song.

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_id String The GetSong ID for the artist who released the song.
name String The name of the artist who released the song.
Artist Query
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.
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.
artist array Same keys and values as for "artist" query type.
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,

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_id String The GetSong ID for the artist who released the song.
name String The name of the artist who released the song.
img External URL Link to album cover art.
tempo Integrer Beat per minute of the song.

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.
from String Country or region/city of origin.
bio text Short biography.

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"
	}
]}

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",
		"img":"https:\/\/images-na.ssl-images-amazon.com\/images\/P\/B000002JS8.01.MZZZZZZZ.jpg",
		"bpm":"116"
	}
}