All Projects β†’ farshed β†’ genius-lyrics-api

farshed / genius-lyrics-api

Licence: MIT License
A library for fetching song lyrics & album art from genius.com 🎢🌈

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to genius-lyrics-api

lyrics-finder
🎀 | Search the lyrics to your music with Lyrics Finder
Stars: ✭ 20 (-84.5%)
Mutual labels:  lyrics, genius, genius-api
geniusr
work with data & lyrics from Genius
Stars: ✭ 43 (-66.67%)
Mutual labels:  lyrics, genius, genius-api
Spotify Downloader
Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
Stars: ✭ 6,957 (+5293.02%)
Mutual labels:  song, song-lyrics
py-simple-lyric-generator
A simple Markov chains lyric generator written in Python.
Stars: ✭ 17 (-86.82%)
Mutual labels:  lyrics, song
glyrics
A terminal thingy to get lyrics from genius.com
Stars: ✭ 16 (-87.6%)
Mutual labels:  lyrics, genius
Hikari
simple discord.js music bot using distube 🎡 | Stage channel support!
Stars: ✭ 19 (-85.27%)
Mutual labels:  genius, genius-lyrics
JiosaavnAPI
Unofficial JioSaavn API Written in Javascript
Stars: ✭ 68 (-47.29%)
Mutual labels:  lyrics, song
awesome-interface
AngularJS SPA interface for awesome lists. Awesome lists parsed using python.
Stars: ✭ 25 (-80.62%)
Mutual labels:  scraper
covid-19
Current and historical coronavirus covid-19 confirmed, recovered, deaths and active case counts segmented by country and region. Includes csv, json and sqlite data along with an interactive website explorer.
Stars: ✭ 15 (-88.37%)
Mutual labels:  scraper
opensea-scraper
Scrapes nft floor prices and additional information from opensea. Used for https://nftfloorprice.info
Stars: ✭ 129 (+0%)
Mutual labels:  scraper
arxiv leaks
Whisper of the arxiv: read comments in tex of papers
Stars: ✭ 22 (-82.95%)
Mutual labels:  scraper
Instagram-Comments-Scraper
Instagram comment scraper using python and selenium. Save the comments into excel.
Stars: ✭ 73 (-43.41%)
Mutual labels:  scraper
metacritic api
PHP Metacritic API - Mirrored by my GitLab
Stars: ✭ 31 (-75.97%)
Mutual labels:  scraper
newsemble
API for fetching data from news websites.
Stars: ✭ 42 (-67.44%)
Mutual labels:  scraper
kick-off-web-scraping-python-selenium-beautifulsoup
A tutorial-based introduction to web scraping with Python.
Stars: ✭ 18 (-86.05%)
Mutual labels:  scraper
plugin.video.covenant
Covenant Kodi Addon Development - Kodi is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi - DMCA: [email protected]
Stars: ✭ 24 (-81.4%)
Mutual labels:  scraper
Coinsta
A Python package for acquiring both historical and current data of cryptocurrencies
Stars: ✭ 47 (-63.57%)
Mutual labels:  scraper
Captcha-Tools
All-in-one Python (And now Go!) module to help solve captchas with Capmonster, 2captcha and Anticaptcha API's!
Stars: ✭ 23 (-82.17%)
Mutual labels:  scraper
ammobin-client
client for https://ammobin.ca
Stars: ✭ 18 (-86.05%)
Mutual labels:  scraper
Scraper-Projects
πŸ•Έ List of mini projects that involve web scraping πŸ•Έ
Stars: ✭ 25 (-80.62%)
Mutual labels:  scraper

genius-lyrics-api npm version

A JavaScript package that leverages Genius API to search and fetch song lyrics and album art.
It doesn't use any native node dependencies and therefore, can be used on the client-side.

Installation

Install with npm

npm install --save genius-lyrics-api

Or install with Yarn

yarn add genius-lyrics-api

Usage

Get the Genius Developer Access Token

import { getLyrics, getSong } from 'genius-lyrics-api';
const options = {
	apiKey: 'XXXXXXXXXXXXXXXXXXXXXXX',
	title: 'Blinding Lights',
	artist: 'The Weeknd',
	optimizeQuery: true
};

getLyrics(options).then((lyrics) => console.log(lyrics));

getSong(options).then((song) =>
	console.log(`
	${song.id}
	${song.title}
	${song.url}
	${song.albumArt}
	${song.lyrics}`)
);

⚠️ You may get a CORS block error while testing on localhost. To bypass this, you need to disable Same-Origin Policy in your browser. You may follow the instructions here.


Types

type options {
	title: string;
	artist: string;
	apiKey: string;		// Genius developer access token
	optimizeQuery?: boolean; // Setting this to true will optimize the query for best results
	authHeader?: boolean; // Whether to include auth header in the search request. 'false' by default.
}

🚨 All properties in the options object are required except optimizeQuery and authHeader. If title or artist is unknown, pass an empty string.

type song {
	id: number;		// Genius song id
	title: string;          // Song title
	url: string;		// Genius webpage URL for the song
	lyrics: string;		// Song lyrics
	albumArt: string;	// URL of the album art image (jpg/png)
}

type searchResult {
	id: number;		// Genius song id
	url: string;		// Genius webpage URL for the song
	title: string;		// Song title
	albumArt: string;	// URL of the album art image (jpg/png)
}

Methods

genius-lyrics-api exposes the following methods:

getLyrics(options | url)

Accepts options or the url to a Genius song.
Returns a promise that resolves to a string containing lyrics. Returns null if no lyrics are found.

getAlbumArt(options)

Accepts an options object.
Returns a promise that resolves to a url (string) to the song's album art. Returns null if no url is found.

getSong(options)

Accepts an options object.
Returns a promise that resolves to an object of type song. Returns null if song is not found.

searchSong(options)

Accepts an options object.
Returns a promise that resolves to an array of type searchResult. Returns null if no matches are found.

getSongById(id: (number | string))

Accepts a valid Genius song ID. IDs can be found using the searchSong method.
Returns a promise that resolves to an object of type song.

Support

If you find this package useful, hit that sweet sweet ⭐️ button.

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].