Skip to content

benkaiser/similar-songs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Similar Songs

This library takes an artist and track title as parameters and using the youtube, lastfm and itunes APIs returns a list of related songs and their youtube video ids.

Process is as follows:

  1. request similar tracks from lastfm
  2. search youtube with that track title and artist and pick the first result to get the youtube video id (fingers crossed it's correct, also if we can't find any videos, just exclude this result)
  3. query the itunes api for the album name, disc number, track number and higher resolution cover art (if this fails which it normally does for neiche remixes and such, it just returns without this extra information)

Usage

var similarSongs = require('similar-songs');

similarSongs.find({
  title: 'Title',
  artist: 'Artist',
  limit: 50, // defaults to 50
  lastfmAPIKey: 'YOUR_LASFTM_KEY_HERE',
  lastfmAPISecret: 'YOUR_LASTFM_SECRET_HERE',
  youtubeAPIKey: 'YOUR_YOUTUBE_KEY_HERE',
}, function(err, songs) {
  console.log(songs); // will print out the 50 most similar tracks
});

License

MIT

About

Module to find similar songs and their youtube videos by track title and artist

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published