'How to get lyrics from Musixmatch

I have a webradio and and the player gives me the song name and song artist

I read those 2 in a jquery var like this

<script> $('#GetLyrics').on('click', function(ev) { songArtistTitle.value = jQuery('#artist').text() + ' - '+ jQuery('#title').text() + jQuery('#year').text(); . .

"#artist" and "#title" are 2 divs that are auto updated by the player

the Musixmatch API its going like this:

http://api.musixmatch.com/ws/1.1/track.search?apikey=***&q_track=Dire%20straits%20Sultans%20of%20Swing&page_size=10

and returns the list of songs with "track_id":3867545, and then you must get the lyrics with the API

http://api.musixmatch.com/ws/1.1/track.lyrics.get?track_id=3867545

I want to have a button "GetLyrics" and when pressed by the user to have the list of songs from Musixmatch (with TRACK.SEARCH)(most of the times it will have only one song) and when the user select the correct song to display the lyrics

Can anyone please help me with the code to read the lyrics from Musixmatch database and diplay them? my webradio is here



Solution 1:[1]

Lastly, the track you are looking for 3867545 does not have lyrics, 'has_lyrics' parm is zero 0. A track ID that works is: track_id=5850832.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joe McKenna