Before you can start using the Songkick API, apply for an API key here.
Once your application for an API key is granted, youâll receive details of your unique key by email. Youâll then need to include it as a parameter to every request you make to the Songkick API.
Letâs say you want to find all the past events of The Rolling Stones.
Youâd need to make a request to Songkickâs gigography endpoint, which looks like:
https://api.songkick.com/api/3.0/artists/{artist_id}/gigography.json?apikey={your_api_key}
You need to specify two parameters when making requests to this endpoint, which are shown in the braces:
{artist_id} and {your_api_key}.
The {artist_id} is Songkickâs unique identifier for this artist,
and you can find this by looking at their artist profile on Songkick and grabbing the number from the URL.
In the case of The Rolling Stones this is 379603.
In the gigography request endpoint, replace {artist_id} with '379603' and {your_api_key} with your unique API key, so that the URL looks something like:
https://api.songkick.com/api/3.0/artists/379603/gigography.json?apikey={your_api_key}
Now all thatâs left is to make the actual request to the API and you can do this by simply visiting the URL in your browser. All going well, youâll see a JSON response showing all of The Rolling Stonesâ past concerts.
Read the response object documentation to learn about the format of data that the Songkick API returns to your application.
You will see the term 'metro area' referenced across the documentation. This is mostly used for internal location identification so we recommend not using when integrating into a feature such as a listings page.
Every API endpoint allows you to specify whether you want results in JSON or XML, and these are outlined in the request details for each endpoint.
For example, the request for the gigography endpoint used in the above example is documented with two file extensions:
https://api.songkick.com/api/3.0/artists/{artist_id}/gigography.json?apikey={your_api_key}
https://api.songkick.com/api/3.0/artists/{artist_id}/gigography.xml?apikey={your_api_key}
You can chose whichever file extension works best for your application.
Where endpoints return an array of objects, the API wraps these in a paginated response.
The response results are contained within a resultsPage object, which looks like:
{
"resultsPage": {
"results": {
"type": [Array of response objects]
},
"totalEntries":80,
"perPage":50,
"page":1,
"status":"ok"
}
}
The type key represents the type of object that the endpoint returns, for example event or artist.
Check out the similar artists endpoint to see an example of paginated responses.
When requesting data in JSON format, JSONP can be specified using the
jsoncallback
parameter. Here is an example of using JSONP from jQuery:
$.getJSON("https://api.songkick.com/api/3.0/events.json?location=clientip&apikey={your_api_key}&jsoncallback=?",
function(data) {
// data is JSON response object
});