Lyrics.ovh
MusicHey there,
Are you looking for a reliable and easy to use API for fetching lyrics? Look no further than Lyricsovh API. The Lyricsovh API is a public API that allows developers to grab lyrics for any song they want.
Here's how to get started:
First, navigate to http://docs.lyricsovh.apiary.io/ to explore the complete documentation of the API. Once you have gone through the endpoints and functionality, you need to generate an access key by visiting the Lyricsovh API page. This should allow you to access the data necessary to query the API with valid requests.
Once you have your API access key, you can start using the API using JavaScript code. Here are some sample code snippets for different API functionalities:
- Search lyrics by track name and artist name
const fetch = require("node-fetch");
function getLyrics() {
let trackName = "Shape of You",
artistName = "Ed Sheeran";
fetch(`https://api.lyrics.ovh/v1/${artistName}/${trackName}`)
.then((response) => response.json())
.then((data) => {
console.log(data);
});
}
- Search lyrics for a specific musical release
const fetch = require("node-fetch");
function getAlbumLyrics() {
let albumName = "The Black Album",
artistName = "Jay-Z";
fetch(`https://api.lyrics.ovh/v1/${artistName}/album/${albumName}`)
.then((response) => response.json())
.then((data) => {
console.log(data);
});
}
- Get a random lyrics
const fetch = require("node-fetch");
function getRandomLyrics() {
fetch("https://api.lyrics.ovh/v1/random")
.then((response) => response.json())
.then((data) => {
console.log(data);
});
}
That's it. Now you can play around with different code snippets and APIs offered by Lyricsovh API to fetch your choice lyrics.
Happy coding!