All Projects β†’ scf4 β†’ Lyricist

scf4 / Lyricist

Licence: mit
Genius.com API client with lyrics scraping πŸŽΆπŸŽ€πŸ‘¨β€πŸŽ€

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lyricist

Alltomp3
Node module to download and convert in MP3 with tags an online video
Stars: ✭ 120 (+29.03%)
Mutual labels:  lyrics, songs, album
sabda
πŸ“œ lyrics collection
Stars: ✭ 24 (-74.19%)
Mutual labels:  lyrics, songs
Swaglyrics For Spotify
πŸ“ƒ Get lyrics of currently playing Spotify song so you don't sing along with the wrong ones and embarrass yourself later. Very fast.
Stars: ✭ 235 (+152.69%)
Mutual labels:  lyrics, songs
ludacris
🎢 Get song lyrics. No BS. https://liyasthomas.github.io/ludacris
Stars: ✭ 37 (-60.22%)
Mutual labels:  lyrics, songs
pymusicdl
Download songs based on song name/ YouTube playlist/ Spotify playlist /album
Stars: ✭ 41 (-55.91%)
Mutual labels:  songs, album
larafy
Larafy is a Laravel package for Spotify API. It is more like a wrapper for the Spotify API.
Stars: ✭ 53 (-43.01%)
Mutual labels:  songs, album
Rapping Neural Network
Rap song writing recurrent neural network trained on Kanye West's entire discography
Stars: ✭ 951 (+922.58%)
Mutual labels:  lyrics, songs
Lyrics
πŸ“„ Open Lyrics Database
Stars: ✭ 106 (+13.98%)
Mutual labels:  lyrics, songs
JiosaavnAPI
Unofficial JioSaavn API Written in Javascript
Stars: ✭ 68 (-26.88%)
Mutual labels:  lyrics, album
Lyrics
Music is life. That's why our hearts have beats! This is an android application for all the music lovers who occasionally search for lyrics of various songs. This app makes this process easier and simpler.
Stars: ✭ 17 (-81.72%)
Mutual labels:  lyrics, songs
Appo-Music
A full-stack clone of the incredible Apple Music online streaming platform, with an aim to re-create it's core features, seamless design, and excellent user experience.
Stars: ✭ 82 (-11.83%)
Mutual labels:  songs, album
Lyricfier
a Spotify Lyrics alternative app | New updates at https://github.com/emilioastarita/lyricfier2 (a faster version in golang)
Stars: ✭ 598 (+543.01%)
Mutual labels:  lyrics, songs
Musicrepair
Fixes music metadata and adds album art.
Stars: ✭ 566 (+508.6%)
Mutual labels:  lyrics, album
Lyrics Corpora
An unofficial Python API that allows users to create a corpus of lyrical text from their favorite artists and billboard charts
Stars: ✭ 13 (-86.02%)
Mutual labels:  lyrics, songs
Lofi Player
🎧 A Lofi Player built with HTML, CSS and Javascript using Parcel as Module Bundler https://lakscastro.github.io/lofi-player
Stars: ✭ 38 (-59.14%)
Mutual labels:  songs
Saadhn
A desktop client for JioSaavn, based on the official JioSaavn web app. Built with Electron.
Stars: ✭ 60 (-35.48%)
Mutual labels:  songs
Alignmentduration
Lyrics-to-audio-alignement system. Based on Machine Learning Algorithms: Hidden Markov Models with Viterbi forced alignment. The alignment is explicitly aware of durations of musical notes. The phonetic model are classified with MLP Deep Neural Network.
Stars: ✭ 36 (-61.29%)
Mutual labels:  lyrics
Ytspotifydl
Youtube and Spotify music downloader with metadata.
Stars: ✭ 34 (-63.44%)
Mutual labels:  songs
Play.cash
🎢 Music lovers, rejoice.
Stars: ✭ 89 (-4.3%)
Mutual labels:  songs
Bpm Analyser
Analyser BPM in Swift for your music/sounds/records, whatever..
Stars: ✭ 60 (-35.48%)
Mutual labels:  songs

Lyricist 🎀

⭐️ Genius.com API client with lyrics scraper

v2.0

Version 2.0 is a complete rewrite with async/await.

Installation

yarn add lyricist

or

npm install lyricist --save

Node 6

Node 6 doesn't support async/await and will need to use the transpiled version (lyricist/node6), along with promises:

const Lyricist = require('lyricist/node6');

Note: Older versions of Node aren't currently supported. Open an issue if you'd like to see support for them

API Key

Get an access token at https://genius.com/api-clients.

const lyricist = new Lyricist(accessToken);

Look up a song

Use song() to fetch a song by ID:

const song = await lyricist.song(714198);
console.log(song.title);

// output: Death with Dignity

or with promises for node <= 6:

lyricist.song(714198).then(song => console.log(song.title));

Set text_format

The Genius API lets you specify how the response text is formatted. Supported formatting options are dom (default), plain and html. See https://docs.genius.com/#/response-format-h1 for further information. The textFormat option is supported by song(), album() and artist().

lyricist.song(714198, { textFormat: 'html' }).then(song => console.log(song.description.html));

// output: <p>The first track off of Sufjan’s 2015 album...

Get song lyrics

The Genius API doesn't offer lyrics, but Lyricist can scrape Genius.com for you. Simply provide the fetchLyrics option like this:

const song = await lyricist.song(714198, { fetchLyrics: true });
console.log(song.lyrics);

// output: Spirit of my silence I can hear you...

Look up an album

Use album() to look up an album by ID. The Genius API doesn't allow you to search an album by title, but song() will return an album.id:

const album = await lyricist.album(56682);
console.log(`${album.name} by ${album.artist.name}`);

// output: Lanterns by Son Lux

Get an album's tracklist

The Genius API doesn't provide tracklists, but Lyricist can scrape Genius.com and return the tracklist for you. Simply provide the fetchTracklist option like this:

const album = await lyricist.album(56682, { fetchTracklist: true });
console.log(album.songs);

// output: [{ id: 502102, title: 'Alternate World', ... }, { id: 267773, title: 'Lost It To Trying', ... }, ...]

Look up an artist

Use artist() to look up an artist by ID:

const artist = await lyricist.artist(2);
console.log(artist.name);
// output: Jay Z

Get songs by an artist

Use songsByArtist() to list an artist's songs. Example usage:

const songs = await lyricist.songsByArtist(2);

songsByArtist() will show 20 results per page by default, and can be as high as 50.

You can provide options as a second parameter. The available options are:

  • perPage: Number (default: 20)
  • page: Number (default: 1)
  • sort String: 'title' or 'popularity' (default: 'title')

Example:

const songs = await lyricist.songsByArtist(2, { page: 2, perPage: 50 });

Warning ⚠️

Take care when fetching lyrics. This feature isn't officially supported by the Genius API, so use caching and rate-limit your app's requests as much as possible.

Genius API Docs

Check the Genius.com API docs for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].