musixmatch-richsync
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

  1. Head over to https://curators.musixmatch.com/missions and register an account.
  2. Once you're at the screen that reads Missions are only available to Curators, open the inspect menu.
  3. Head over to the Network tab at the top.
  4. Click Fetch/XHR
  5. Then, reload the page.
  6. Go back to the inspect window.
  7. Look for an entry along the lines of user.get?app_id=web-desktop-app-v1.0
  8. Open it up and look at the Request URL.
  9. Find the query parameter called &usertoken= and copy the value.
  10. 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

Readme

Keywords

Package Sidebar

Install

npm i musixmatch-richsync

Weekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

12.7 kB

Total Files

8

Last publish

Collaborators

  • chezzer