|
Index 1. Introduction 2. Documentation Tag description Status and error description Editing Lyrics - Updated! Flash cross domain 3. Content Quality 4. Requirements for permanent user ID key Introduction Application Programming Interface is available to anyone who wishes to use our database for their own music project, website or program. If you currently use the web to search out lyrics or use code tricks to access other lyrics websites to display relevant lyrics text for your content you can now have a reliable source without the hassle. We have gathered this database from everyday web users like you and we think lyrics to all songs should be freely available without any restrictions. Song lyrics performed by an artist can be interpreted in many ways. No label, and sometimes not even the inside of an album cover can carry the exact reflection of this artistic expression. Here at lyricsfly... people decide. Documentation Download example code for php here Please use the weekly user ID key below for testing: (good all this week, Mon-Sun) Calls are made using the following URL format: To search by artist and title combination: http://api.lyricsfly.com/api/api.php?i=[USER ID]&a=[ARTIST]&t=[TITLE] To search by lyrics text string: http://api.lyricsfly.com/api/txt-api.php?i=[USER ID]&l=[LYRICS TEXT STRING] Because our database varies with many html format encodings including international characters, we recommend that you replace all quotes, ampersands and all other special and international characters with "%". Simply put; if the character is not [A-Z a-z 0-9] or space, just substitute "%" for it to get most out of your results. All API calls return an XML document. The following is an example of the output: <?xml version="1.0" encoding="utf-8"?> -<start> -<sg> <cs>14eb6fba81</cs> <id>1438</id> <ar>U2</ar> <tt>Beautiful Day</tt> <al>All that you can't leave behind</al> -<tx> . . . . . Lyrics provided by lyricsfly.com [br] </tx> </sg> </start> Each call for artist and title combination can return a total of 3 possible titles. Because of some album duplicates such as live performances as well as re-releases, we give you an option to pick the best result that suits your needs. For the lyrics search string call a total of 10 titles are returned to help your users find the correct title. The lyrics option also requires minimum 4 characters. However, you might want to require more since only the first 10 titles found are returned and rest are never shown. So it would be a good idea to query for a phrase in a song rather than a word. Tag description <sg> - song <cs> - checksum (for original URL link back construction) <id> - song ID in the database (for original URL link back construction) <ar> - artist name <tt> - title of the song <al> - album name <tx> - lyrics text separated by [br] for line break (replace with <br>) Status and error description 200 – ok Results are returned. All parameters checked ok. 204 - NO CONTENT Parameter query returned no results. All parameters checked ok. 300 - TESTING LIMITED Temporary access. Limited content. All parameters checked ok. 400 - MISSING KEY Parameter “i” missing. Authorization failed. 401 – UNAUTHORIZED Parameter “i” invalid. Authorization failed. 402 - LIMITED TIME This response is returned only if you query too soon. Limit query requests. Time of delay is shown in <delay> tag in milliseconds. 406 - QUERY TOO SHORT Query request string is too short. All other parameters checked ok. Amazon EC2 users please contact us with your IP. Editing lyrics - Updated! In order to provide your users with ability to edit lyrics you will have to link back to us. This is done by sending the checksum and song ID to our correction form with the following URL format: http://lyricsfly.com/search/correction.php?[CHECKSUM]&id=[SONG ID] Correction form is seamless and works directly inside of a browser, taking into account for an already in progress correction, all without the need to sign up. By helping us you will be helping all of your users with an updated and most correct lyrics available. NOTICE: Temporary key does not return correct checksum. You must have permanent key for correction link to work. This is done intentionally to stop abuse of our system. Flash cross domain Crossdomain xml file is located at: http://lyricsfly.com/api/crossdomain.xml and http://lyricsfly.com/crossdomain.xml It allows access from all sites. Content Quality Most of our lyric text is dead on correct. Submissions from users are looked at very closely and corrected if needed. However, most of our titles are crawled and cached by our spiders which are selectively programmed to weed out and collect only the highest quality content. Requirements for permanent user ID key: updated 09-02-2009 1. Proof that your code is working with the weekly key. The reason why we provide the weekly key is so that you can start your work immediately and just replace one line of code with the new key once everything is completed. In order to create a fast and responsive API system we save the permanent keys only for those who will put them to use. Copying the example.php file into your site is not a valid proof. Please integrate the code into the design of your site/application/project. 2. Website and domain name for your project. We need to establish your presence on the web. Personal projects for individual use will be rejected unless they are put to use for general public. Requests for general library code will not be accepted. Please use the weekly key for educational purposes. You can obtain a new key on this page every Monday at 12:00am 3. Verify your identity based on your request. The best way is to send us the request directly from the domain's mailbox. If you don't have mail setup, just make a custom page on the site or think of another way. This prevents other people from requesting permanent keys for your project. 4. Permit and links to lyricsfly.com. Each lyrics title text fed from our database has our domain name imbedded at the end as the provider of content. You must not change it with the exception of making “lyricsfly.com” a clickable html link to our main page. You should also allow your users to contribute by placing a clickable html link/button to the correction form of the title. Furthermore, you must link back wherever appropriate, such as project description/features home webpage. You should not cache/store lyrics content on your server permanently. You can however, cache lyrics temporarily. This is simply due to ever changing lyrics content which should be up-to-date. Besides intentional abuse, there are no restrictions in using our database or in combination with others (mashup). We welcome commercial, shareware as well as open source freeware products without royalty payments. Lyricsfly.com reserves the right to deny access based on the above mentioned circumstances or requirements as well as rights to change this permit and/or requirements by publishing it on this page. Once your project meets the above requirements, please contact us us for a permanent user ID key which will be assigned specifically to your project. There are no limits on how many keys you can get as long as each fulfills the above. |