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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chatandshare/random-song

v1.0.0

Published

MusixMatch API wrapper specifically to fetch random songs!

Downloads

7

Readme

Random Song API

MusixMatch API wrapper specifically to fetch random songs!

Requirements

You'll need a MusixMatch API key to get access to random songs. It's totally free, and you can get one by clicking here

Example

const RandomSong = require('random-song');
const random = new RandomSong("YOUR_API_KEY_HERE");

(async () => {

    let very_random_song = await random.song();
    
  console.log(very_random_song); // Outputs a random song
  
    let edm_song = await random.song("edm");
    
  console.log(edm_song);;
  
  // Scroll down to see what kind of data you'll receive (in JSON)
})();

Data

{
  track_id: 194285372,
  track_name: 'Falling',
  track_name_translation_list: [],
  track_rating: 100,
  commontrack_id: 88456398,
  instrumental: 0,
  explicit: 0,
  has_lyrics: 1,
  has_subtitles: 1,
  has_richsync: 1,
  num_favourite: 2730,
  album_id: 37245143,
  album_name: 'Nicotine',
  artist_id: 28976090,
  artist_name: 'Trevor Daniel',
  track_share_url: 'https://www.musixmatch.com/lyrics/Trevor-Daniel/Falling?utm_source=application&utm_campaign=api&utm_medium=Chat+%26+Share%3A1409619829238',
  track_edit_url: 'https://www.musixmatch.com/lyrics/Trevor-Daniel/Falling/edit?utm_source=application&utm_campaign=api&utm_medium=Chat+%26+Share%3A1409619829238',
  restricted: 0,
  updated_time: '2020-02-17T10:13:22Z',
  primary_genres: { music_genre_list: [ [Object], [Object] ] }
}

Valid Genres

Over a hundred genres are supported! You can view all of them here. 😀

Information

  • By the development team @ Chat & Share.
  • Used in production by the Woof Discord bot.