# Lyrics

This method allows you to fetch lyrics of songs from YouTube Music using two different methods: by YouTube music ID and by looking up the song title. Note that the second method requires a more specific search query.

# Installation

To use this module, you need to import YoutubeMusic from youtubemusic.js.

import YoutubeMusic from "youtubemusic.js";

# Usage

# Get Lyrics by YouTube Music ID

You can obtain lyrics by providing the YouTube music ID of the song.

YoutubeMusic.getLyrics("g6_2Rygz38Y")
  .then((response) => console.log(response))
  .catch((error) => console.error(error));

In this example, "qCNbdYd9K30" is the video ID of the song. Change Get.Track to other options like Get.Playlist if you want information about a playlist.

Query Parameter Description Default Required
id The id of the track undefined True
So I got my boots on,
Got the right amount of leather
And I'm doing me up with a black color liner
And I'm working my strut but I know it don't matter
All we need in this world is some love

There's a thin line between the dark side and the light side baby tonight
It's a struggle gotta rumble, tryin' to find it
But if I had you, that would be the only thing I'd ever need
Yeah if I had you, then money fame and fortune never could compete
If I had you, life would be a party, it'd be ecstasy
Yeah if I had you
You y-y-y-y-y-you, y-y-y-y-y-you, y-y-y-y-you
If I had you

From New York to LA getting high rock and rolling
Get a room trash it up 'till it's ten in the morning
Girls in stripper heels, boys rolling in Maserati's
What they need in this world is some love
There's a thin line between the wild time and a flat-line baby tonight
It's a struggle gotta rumble tryin' to find it

But if I had you, that would be the only thing I'd ever need
Yeah if I had you, then money fame and fortune never could compete
If I had you, life would be a party, it'd be ecstasy
Yeah if I had you
You y-y-y-y-y-you, y-y-y-y-y-you, y-y-y-y-you
If I had

The flashing of the lights
It might feel so good but I got you stuck on my mind, yeah
The flashing and the stage it might get me high
But it don't mean a thing tonight

That would be the only thing I'd ever need
Yeah if I had you, then money fame and fortune never could compete
If I had you, life would be a party, it'd be ecstasy
Yeah if I had you
You y-y-y-y-y-you, y-y-y-y-y-you, y-y-y-y-you
If I had you

That would be the only thing I'd ever need
Yeah if I had you, then money fame and fortune never could compete
(never could compete with you)
If I had you, life would be a party, it'd be ecstasy (it'd be ecstasy with you)
Yeah if I had you
You y-y-y-y-y-you, y-y-y-y-y-you, y-y-y-y-you
If I had you

# Get Lyrics by Song Title

To get lyrics by song title, you need to be more specific with the query.

YoutubeMusic.getLyricsViaTitle("If i had you adam lambert")
  .then((response) => console.log(response))
  .catch((error) => console.error(error));
Query Parameter Description Default Required
title The title of the track undefined True

# Important Note

When using the method to get lyrics via the song title, make sure to provide a detailed and accurate title for better search results.

# Example Usage

import YoutubeMusic from "youtubemusic.js";

// Get lyrics by YouTube Music ID
YoutubeMusic.getLyrics("g6_2Rygz38Y")
  .then((response) => console.log(response))
  .catch((error) => console.error(error));

// Get lyrics by song title
YoutubeMusic.getLyricsViaTitle("If i had you adam lambert")
  .then((response) => console.log(response))
  .catch((error) => console.error(error));