JSON APIforEncyclopaedia Metallum

Overview 

This is an unofficial, third party API developed and maintained by Martin Ivanov for retrieving data from Encyclopaedia Metallum.

Responses from the method calls are in JSONP format and the service is free (but donations are very welcome), however providing an API key along with the requests is required. To use the API you should get a free API key from here first.

This service is not endorsed by or affiliated with Encyclopaedia Metallum.

IMPORTANT: In order to make the service faster, requests are cached on the API side and stored data is flushed weekly, on Sunday. This may cause delays in syncing the API responses with the latest updates on Encyclopaedia Metallum.

Endpoint 

The API endpoint is:

http://em.wemakesites.{{$root.fsl}}/


Get API key 

To start using the API you should register for a free API key below. Please, use a valid email address as the API key will be emailed to you. The email you provide will be kept safe and not given or sold to third parties. I will only use it to send occasional updates regarding the API and for nothing else.

{{ apiKey }}

{{ keyNotGeneratedMessage }}

Methods 

Below is a list of the currently available API methods and also a playground where they can be tested.

jsonp Get album by ID 

http://em.wemakesites.{{$root.fsl}}/album/:album_id

The method returns album info, track listing, personnel, details, release date, etc. The album_id is the last part of an actual Encyclopaedia Metallum URI, for example: http://www.metal-archives.com/albums/Cannibal_Corpse/Eaten_Back_to_Life/778 where album_id is 778.

  • album / 

jsonp Get upcoming albums 

albums/upcoming

Get a list of upcoming albums.

jsonp Get artist by id 

http://em.wemakesites.{{$root.fsl}}/artist/:artist_id

The method returns artist info, bio, birthday, age, place of birth, current and previous bands. The artist_id is the last part of an actual Encyclopaedia Metallum URI, for example: http://www.metal-archives.com/artists/Tom_Angelripper/3182 where artist_id is 3182.

  • artist / 

jsonp Deceased artists 

artists/deceased

Get a list of recently deceased artists. R.I.P.

jsonp Get band by ID 

http://em.wemakesites.{{$root.fsl}}/band/:band_id

Get band bio, discography, country, current line-up, status, logo and band photo by providing band id. The band id can be extracted from an actual Encyclopaedia Metallum URI of the band, for example: http://www.metal-archives.com/bands/Cannibal_Corpse/186 where the band_id is the last part of the url, i.e. 186.

  • band / 

jsonp Get random band 

band/random

Get random band bio, discography, country, current line-up, status, logo and band photo. As some IDs on Encyclopaedia Metallum are invalid/dead, request may sometimes take longer.

jsonp Get bands by country 

http://em.wemakesites.{{$root.fsl}}/country/:country_code

The method returns bands on Encyclopaedia Metallum listed by country and requires passing a country code to the URI. A complete list of country codes can be found here.

  • country / 

jsonp Get bands by letter 

http://em.wemakesites.{{$root.fsl}}/letter/:letter

The method returns bands listed by letter (a-z) or number (nbr) on Encyclopaedia Metallum.

  • letter / 

http://em.wemakesites.{{$root.fsl}}/search/:search_type/:keyword

Perform a keyword search on Encyclopaedia Metallum by predefined search type. The values for search_type can be band_name, band_genre, band_themes, album_title, song_title, label_name and artist_alias.

  • search / 
  •  / 

jsonp Get bands by status 

http://em.wemakesites.{{$root.fsl}}/status/:status

Get bands by predefined status. The available statuses are: active, on-hold, split-up, unknown, changed-name and disputed.

  • status / 

jsonp Get user by name 

http://em.wemakesites.{{$root.fsl}}/user/:user_name

The method returns Encyclopaedia Metallum users by user_name.

  • user / 

Status codes and messages 

All responses contain the standard code, status, message and data fields.

{
  "code": {Number},
  "status": {String},
  "message": {String},
  "data": {Object},
  "hash": {String},
  "donation": {
    "message": "Please, donate to keep this service alive and help its further development",
    "donation_url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=27JWD2KFQHCTE"
  }
}

Code samples 

Below are sample calls to the API, using popular front-end libraries and server-side requests with PHP and cURL.

jQuery

jQuery.ajax({
  url: 'http://em.wemakesites.net/band/186?api_key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
  dataType: 'jsonp',
  crossDomain: true,
  success: function(response) {
    console.log(response);
  }
});

Angular

$http({
  url: 'http://em.wemakesites.net/band/186',
  method: 'jsonp',
  params: {
    api_key: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
    callback: 'JSON_CALLBACK'
  }}).then(function(response) {
    console.log(response.data);
  }
);

cURL with PHP

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "em.wemakesites.net/band/186?api_key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
echo $output;
curl_close($ch);
?>

PHP

<?php
echo file_get_contents('http://em.wemakesites.net/band/186?api_key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
?>

About 

Software engineer in long term love relationship with music and guitar. Cat addict, blogger and occasional drummer. Supporter of Anarcho-capitalism.

 

 

I use cookies to ensure you get the best experience.