The LyricWiki API provides a convenient way for plugins and apps to easily find and display lyrics from LyricWiki. The typical process works like this:
- Your app or plugin passes an artist and song-name to the API (there are also requests to get discographies etc, please see documentation).
- The API returns a match (or a message saying there is no match) along with a small chunk of the lyrics and a link to a page where the user can view the full lyrics.
Quick Start Guide
TODO: Make a step-by-step list of how to make something using the API. Try to do so using one of the existing Client libraries.
Two ways to access the API: SOAP or REST-like
The API has a number of functions which can currently be accessed by two different methods: as a SOAP (Simple Object Access Protocol) webservice or a more lightweight REST-like interface (the request is just a specially-formatted url). Each method has different advantages and disadvantages.
- SOAP documentation
- The SOAP webservice lets your code use the API as if the functions were a normal part of your code. This saves the trouble of having to parse the results from the API. Most languages (PHP, Java, Ruby, .NET, etc.) have libraries which make it possible to get this ease-of-use from SOAP webservices. If there is not a library for your language, it would be a ton of work to use the SOAP API and you would probably have a much easier time using REST. Our SOAP documentation has information on what languages and libraries have been used successfully (or unsuccessfully in rare instances) with the LyricWiki API in the past.
- More challenging to debug since you need to do it from a SOAP client rather than just a webbrowser.
- There are glitches in some libraries which try to implement SOAP. Please check the SOAP documentation to make see if the library you want to use will work well enough for you.
- REST documentation
- Super easy to make a request and to debug the requests in your browser. Here are some example requests:
- Once you have the results back, you will have to parse them yourself (as opposed to the SOAP which will give you the result as an object).
- There are several result formats that you can choose from (eg: text, xml, html, and sometimes json).
- Is not "actual" REST. If you're used to very strictly RESTful APIs, then just pretend we're not using the word REST ;)
|Partially supported (might be buggy)|
|n/a||Don't plan to support this|
* Note the
** Note the
fixXML parameter on the getArtist XML call. It is recommended that this be used on all getArtist XML calls to get valid XML as opposed to the original format of the XML. The old format was kept as the default to keep from breaking existing apps but is poorly formed XML.
- Why does the API only return a few lines of lyrics for each song?
- Can I sub-license lyrics from LyricWiki to use the full lyrics in an app I'm making?
- In summary: please use a browser panel to display the lyrics, and choose the skin that works best for your app. For example, if your app has a small area for the lyrics, the mobile skin may be the best fit for your app.
- Can I make jsonp requests to access the API from another domain?
- Yes. As of the release on Wednesday April 25th, the LyricWiki REST API will support the 'callback' parameter for any fmt=realjson requests. Simply add the name of the callback as the &callback=MyCallbackName parameter, or use a popular library such as jQuery. We support the common convention of using callback=? to indicate that the result should just be wrapped in an anonymous function. This allows jQuery to operate on the jsonp result automatically.
Log of Recent Changes
If we make any adjustments to the way the API works, we intend to list them here so that you can make sure your apps are still up to date (it's very rare that we make changes which aren't backward-compatible though).