Easily get music Synced Lyrics by using MusixMatch API written in PHP!
To retrieve lyrics using the alternative method, use the /getLyricsMusix.php
endpoint with the following parameters:
t
: The title of the songa
: The artist's named
: The duration of the song (you can specify the duration in eithermm:ss
format or in total seconds)type
: The type for search the lyrics,alternative
for search it by using metadata anddefault
is only using song title and artist name
Example:
https://paxsenixofc.my.id/server/getLyricsMusix.php?t=Hope&a=XXXTENTACION&d=1:50&type=alternative
To retrieve lyrics using the default method, use the /getLyricsMusix.php
endpoint with the following parameter:
q
: The query string containing the song title and artist nametype
: The type for search the lyrics,alternative
for search it by using metadata anddefault
is only using song title and artist name
Example:
https://paxsenixofc.my.id/server/getLyricsMusix.php?q=Hope%20XXXTentacion&type=default
[00:02.80]Yeah
[00:05.56]♪
[00:11.06]Rest in peace to all the kids that lost their lives in the Parkland shooting
[00:13.63]This song is dedicated to you
include_once("./Musixmatch.php");
$musix = new MusixLyricsApi\Musix();
echo $musix->getLyricsAlternative("Hope", "XXXTENTACION");
include_once("./Musixmatch.php");
$musix = new MusixLyricsApi\Musix();
$track_id = $musix->searchTrack("Hope XXXTENTACION");
echo $musix->getLyrics($track_id);
I'm sorry if the code looks weird; I'm working only on a phone (I don't have a PC/Laptop) and I'm still a beginner. :)
I started searching for lyrics APIs because of this repository: Spotify Lyrics API by akashrchandran