npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

musicmatch

v0.3.2

Published

musicmatch api

Downloads

79

Readme

musicmatch

download-count dev-deps

NodeJS musicmatch api

Install

$ npm install musicmatch

Usage


music = require('musicmatch')({apikey:""});

// or

music =  require('musicmatch')();

Methods

| Name | Method | |---|---| |chart.artists.get| chartArtists| |chart.tracks.get| chartTracks| |track.search| trackSearch| |track.get| track| |track.subtitle.get| trackSubtitle| |track.lyrics.get| trackLyrics| |track.snippet.get| trackSnippet| |track.lyrics.post| trackLyricsAdd| |track.lyrics.feedback.post| trackLyricsFeedback| |matcher.lyrics.get| matcherLyrics| |matcher.track.get| matcherTrack| |matcher.subtitle.get| matcherSubtitle| |artist.get| artist| |artist.search.get| artistSearch| |artist.albums.get| artistAlbums| |artist.related.get| artistRelated| |album.get| album| |album.tracks.get| albumTracks|

chartArtists

| Params | Desc | |---|---| | country | A valid country code (default US) | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. |

Example


music.chartArtists({page:1, page_size:3, country:"tr"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

chartTracks

| Params | Desc | |---|---| | country | A valid country code (default US) | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. | | f_has_lyrics | When set, filter only contents with lyrics |

Example


music.chartTracks({page:1, page_size:3, country:"tr", f_has_lyrics:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSearch

| Params | Desc | |---|---| | q | Search within track titles,artists,lyrics | | q_lyrics |Any word in the lyrics | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. | | f_has_lyrics | When set, filter only contents with lyrics | | f_artist_id | When set, filter by this artist id | | f_music_genre_id | When set, filter by this music category id | | f_artist_mbid | When set, filter by this artist musicbrainz id | | f_lyrics_language | Filter by the lyrics language (en,it,..) | | s_track_rating | Sort by our popularity index for tracks (asc-desc) | | s_artist_rating | Sort by our popularity index for artists (asc-desc) |
| quorum_factor | Search only a part of the given query string.Allowed range is (0.1 – 0.9), default is 1 (100%) |

Example


music.trackSearch({q:"Chet Faker - Gold", page:1, page_size:3})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

track

| Params | Desc | |---|---| | track_id | The musiXmatch track id | | track_mbid |The musicbrainz recording id |

Example


music.track({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSubtitle

| Params | Desc | |---|---| | track_id | The musiXmatch track id | | track_mbid |The musicbrainz recording id | |subtitle_format | The format of the subtitle (lrc,dfxp,stledu). Default to lrc | |f_subtitle_length | The desired length of the subtitle (seconds) | |f_subtitle_length_max_deviation| The maximum deviation allowed from the f_subtitle_length (seconds) |

Example


music.trackSubtitle({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyrics

| Params | Desc | |---|---| | track_id | The musiXmatch track id | | track_mbid |The musicbrainz recording id |

Example


music.trackLyrics({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackSnippet

| Params | Desc | |---|---| | track_id | The musiXmatch track id |

Example


music.trackSnippet({track_id:15445219})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyricsAdd

| Params | Desc | |---|---| | track_id | The musiXmatch track id | | lyrics_body | The lyrics Example


music.trackLyricsAdd({track_id:15445219, lyrics_body:"example lyrics"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

trackLyricsFeedback

| Params | Desc | |---|---| |lyrics_id | The musiXmatch lyrics id | |track_id | The musiXmatch track id | |feedback | The feedback to be reported, possible values are: wrong_lyrics, wrong_attribution, bad_characters, lines_too_long, wrong_verses, wrong_formatting | Example


music.trackLyricsFeedback({track_id:15445219, lyrics_id:4193713, feedback:"wrong_verses"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherLyrics

| Params | Desc | |---|---| | q_track | The song title | | q_artist | The song artist | Example


music.matcherLyrics({q_track:"sexy and i know it", q_artist:"lmfao"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherTrack

| Params | Desc | |---|---| | q_track | The song title | | q_artist | The song artist | | q_album | The song album | | f_has_lyrics | When set, filter only contents with lyrics | | f_has_subtitle | |

Example


music.matcherTrack({q_artist:"eminem", q_track:"lose yourself"})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

matcherSubtitle

| Params | Desc | |---|---| | q_track | The song title | | q_artist | The song artist | | f_subtitle_length | Filter by subtitle length in seconds | | f_subtitle_length_max_deviation | Max deviation for a subtitle length in seconds |

Example


music.matcherSubtitle({q_track:"sexy and i know it", q_artist:"lmfao", f_subtitle_length:200})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artist

| Params | Desc | |---|---| | artist_id | The musiXmatch artist id | | artist_mbid | The musicbrainz artist id |

Example


music.artist({artist_id:118})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistSearch

| Params | Desc | |---|---| | q_artist | The song artist | | f_artist_id | When set, filter by this artist id | | f_artist_mbid | When set, filter by this artist musicbrainz id | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. |

Example


music.artistSearch({q_artist:"prodigy", page_size:5})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistAlbums

| Params | Desc | |---|---| | artist_id | The musiXmatch artist id | | artist_mbid | The musicbrainz artist id | | g_album_name | Group by Album Name | | s_release_date | Sort by release date (asc-desc) | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. |

Example


music.artistAlbums({artist_id:1039, s_release_date:"desc", g_album_name:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

artistRelated

| Params | Desc | |---|---| | artist_id | The musiXmatch artist id | | artist_mbid | The musicbrainz artist id | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. |

Example


music.artistRelated({artist_id:56, page_size:2, page:1})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

album

| Params | Desc | |---|---| | album_id | The musiXmatch album id |

Example


music.album({album_id:14250417})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})

albumTracks

| Params | Desc | |---|---| | album_id | The musiXmatch album id | | album_mbid | The musicbrainz album id | | format | Decide the output type (json or xml) | | f_has_lyrics | When set, filter only contents with lyrics | | page | Define the page number for paginated results | | page_size | Define the page size for paginated results. Range is 1 to 100. |

Example


music.albumTracks({album_id:13750844, page:1, page_size:2})
	.then(function(data){
		console.log(data);
	}).catch(function(err){
		console.log(err);
})