musixmatch-richsync
v1.0.1
Published
description
Downloads
13
Readme
lyrics
MusixMatch lyrics getter.
How it works
Using an API used by the MusixMatch desktop app, it's possible to get lyrics, subtitles lyrics and richsync lyrics using a usertoken which is eternal and doesn't expire.
This library achieves this, but is against MusixMatch's API TOS because it's bypassing api auth, so please use at your own risk.
Install
NPM:
npm i musixmatch-lyrics
Yarn:
yarn add musixmatch-lyrics
Demo
import MusixMatch from 'musixmatch-lyrics';
const mm = new MusixMatch(['tokens here']);
mm.getLyrics('isrc')
.then((lyrics) => {
console.log(lyrics);
})
.catch((e) => {
console.error(e);
});
How to get a usertoken...
Super easy, just requires some knowledge of the Inspect menu in chrome.
- Head over to https://curators.musixmatch.com/missions and register an account.
- Once you're at the screen that reads
Missions are only available to Curators
, open the inspect menu. - Head over to the
Network
tab at the top. - Click
Fetch/XHR
- Then, reload the page.
- Go back to the inspect window.
- Look for an entry along the lines of
user.get?app_id=web-desktop-app-v1.0
- Open it up and look at the Request URL.
- Find the query parameter called
&usertoken=
and copy the value. - Chuck that into the API, and you should be away!
It's recommended to use multiple usertokens to avoid rate limits, but 1 should be fine.
WTF is an ISRC?
ISRC stands for International Standard Recording Code, and every song has one. This is because MusixMatch supports ISRC and Spotify + Deezer export ISRC's with their APIs, just look for a key called ISRC
and put it into the method in the library.
Help
Feel free to contact me on Discord Chezzer#6969