Documentation

The Elixir Lyrics API allows you to call two methods that respond in REST.

The API support two methods named getLyric and getSimpleLyric. The former returns a JSON string as response and the latter returns result in HTML format.

The API URL is located at :
http://elixirlyrics-api.madadipouya.com/

The API requires two input parameters which are artist and song. Use UTF-8 when sending arguments to API methods. For example:
http://elixirlyrics-api.madadipouya.com/getLyric?artist=MyFavArtist&song=MyFavSong

Consequently when you call the above API method, you get similar response to following :


{
   "artist":"MyFavArtist",
   "song":"MyFavSong",
   "lyric":"MyFavLyric",
   "errors":[]
}

For getSimpleLyric, the response is in simple HTML format.

Examples

A sample API call of getLyric method for the artist name "Nightwish" and the song "Two For Tragedy".
http://elixirlyrics-api.madadipouya.com/getLyric?artist=nightwish&song=two+for+tragedy

The response of the API call :


{
   "artist":"Nightwish",
   "song":"Two fortragedy",
   "lyric":"Sleep Eden sleep\n  My fallen son\n  Slumber in peace\n  \n  Cease the pain\n  Life's just in vain\n  For us to gain\n  Nothing but all the same\n  \n  No healing hand\n  For your disease\n  Drinking scorn like water\n  Cascading with my tears\n  \n  Beneath the candle bed\n  Two saddened angels-in heaven, in death\n  \n  Now let us lie\n  Sad we lived sad we die\n  Even in your pride\n  I never blamed you\n  \n  A mother's love\n  Is a sacrifice\n  Together sleeping\n  Keeping it all\n  \n  No sympathy\n  No eternity\n  One light for each undeserved tear\n  \n  Beneath the candle bed\n  Two souls with everything yet to be said",
   "errors":[]
}

If the lyric cannot be retrieved "Lyric not found" is returned in JSON response.


{
   "artist":"Artist",
   "song":"Song",
   "lyric":"",
   "errors":["Lyric not found"]
}

The same request using getSimpleLyric method.
http://elixirlyrics-api.madadipouya.com/getSimpleLyric?artist=nightwish&song=two+for+tragedy

The response of the getSimpleLyric method:

Sleep Eden sleep My fallen ...

Subsequently if the lyric cannot be retrieved empty page is returned with no error message.