
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
A simple package to fetch lyrics from Genius API.
This package was originally used only for my personal needs to fetch lyrics from Genius API using my discord bot, but then I decided to make this package open source and let everyone use it.
$ npm install llyrics
$ yarn add llyrics
const { find } = require('llyrics');
client.on(Events.InteractionCreate, async interaction => {
if (!interaction.isChatInputCommand()) return;
const response = await find({
song: 'Bohemian Rhapsody',
engine: 'youtube'
forceSearch: true,
});
if (interaction.commandName === 'lyrics') {
await interaction.reply({ content: response.lyrics, ephemeral: true });
}
});
client.login('token');
Function parameters
{
song: string, // The title of the song
artist?: string, // Optional: Use this for more accurate lyrics results on the Musixmatch endpoint
geniusApiKey?: string, // Optional: API key for the Genius search engine
engine?: 'musixmatch' | 'genius' | 'youtube', // Specify the desired search engine: 'musixmatch', 'genius', or 'youtube'
forceSearch?: boolean // Optional: If true and the search fails on the first specified search engine, llyrics automatically retries the search on another available search engine
}
Response format
{
artist: string, // Artist's name
title: string, // Song title
id: number, // Musixmatch track ID (only for Musixmatch endpoint)
engine: string, // Search engine used
artworkURL: string, // Artwork URL
lyrics: string, // Song lyrics
}
Note: the id is only available if the request was made with Musixmatch. This corresponds to the Musixmatch identifier of the song.
The default search engine is YouTube. If you prefer not to use YouTube, you can specify your desired search engine.
FAQs
A simple package to fetch lyrics from Genius API
The npm package llyrics receives a total of 412 weekly downloads. As such, llyrics popularity was classified as not popular.
We found that llyrics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.