{"id":24080394,"url":"https://github.com/sxmabel/lyricsfetchergenius","last_synced_at":"2025-04-30T15:27:08.845Z","repository":{"id":59516327,"uuid":"537662535","full_name":"SxMAbel/lyricsfetchergenius","owner":"SxMAbel","description":"A npm package to fetch lyrics from genius api","archived":false,"fork":false,"pushed_at":"2022-09-18T19:46:26.000Z","size":1669,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T17:23:28.373Z","etag":null,"topics":["genius","genius-api","genius-lyrics","genius-lyrics-api","genius-lyrics-search"],"latest_commit_sha":null,"homepage":"https://abelpurnwasy.ml","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SxMAbel.png","metadata":{"files":{"readme":"readMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-17T00:59:57.000Z","updated_at":"2025-01-22T17:49:49.000Z","dependencies_parsed_at":"2023-01-18T13:46:08.266Z","dependency_job_id":null,"html_url":"https://github.com/SxMAbel/lyricsfetchergenius","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SxMAbel%2Flyricsfetchergenius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SxMAbel%2Flyricsfetchergenius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SxMAbel%2Flyricsfetchergenius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SxMAbel%2Flyricsfetchergenius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SxMAbel","download_url":"https://codeload.github.com/SxMAbel/lyricsfetchergenius/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251730966,"owners_count":21634485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genius","genius-api","genius-lyrics","genius-lyrics-api","genius-lyrics-search"],"created_at":"2025-01-09T22:57:27.802Z","updated_at":"2025-04-30T15:27:08.820Z","avatar_url":"https://github.com/SxMAbel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lyrics Fetcher Genius\n\n# How to Use\n\n# Installation\n\n```\nnpm install --save lyricsfetchergenius@latest\n```\n\n# Methods and Examples in Javascript\n\n[Get the genius APIKey/Token here](https://genius.com/developers)\n\n**Using Typescript**\n\n```ts\nimport lyricsfetchergenius from \"lyricsfetchergenius\";\n```\n\n**Using Javascript**\n\nUsing GetLyrics:\n\n```js\nconst lyricsfetchergenius = require(\"lyricsfetchergenius\");\n// example of options 1\nvar options = {\n  APIKey: \"your-genius-api-key\",\n  Title: \"Late Night Trips\",\n  Artist: \"Alex1\",\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\n// example of options 2\nconst APIKey = process.env.APIKEY || \"your-genius-api-key\";\n// below player is erela.js || you can use anything.\nconst songTitle = player.queue.current.title;\nconst songArtist = player.queue.current.author;\nvar options = {\n  APIKey: APIKey,\n  Title: songTitle,\n  Artist: songArtist,\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\nasync () =\u003e {\n  try {\n    let lyrics = await lyricsfetchergenius.GetLyrics(options);\n    lyrics = lyrics.replace(/(\\[.+\\])/g, \"\"); // optional\n    console.log(lyrics); // you can do somthing else with it other than console.log\n  } catch (error) {\n    throw error;\n  }\n};\n```\n\nUsing GetAlbumArt:\n\n```js\nconst lyricsfetchergenius = require(\"lyricsfetchergenius\");\n// example of options 1\nvar options = {\n  APIKey: \"your-genius-api-key\",\n  Title: \"Late Night Trips\",\n  Artist: \"Alex1\",\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\n// example of options 2\nconst APIKey = process.env.APIKEY || \"your-genius-api-key\";\n// below player is erela.js || you can use anything.\nconst songTitle = player.queue.current.title;\nconst songArtist = player.queue.current.author;\nvar options = {\n  APIKey: APIKey,\n  Title: songTitle,\n  Artist: songArtist,\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\nasync () =\u003e {\n  try {\n    const albumArt = await lyricsfetchergenius.GetAlbumArt(options);\n    console.log(albumArt); // you can do somthing else with it other than console.log\n  } catch (error) {\n    throw error;\n  }\n};\n```\n\nUsing GetSong:\n\n```js\nconst lyricsfetchergenius = require(\"lyricsfetchergenius\");\n// example of options 1\nvar options = {\n  APIKey: \"your-genius-api-key\",\n  Title: \"Late Night Trips\",\n  Artist: \"Alex1\",\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\n// example of options 2\nconst APIKey = process.env.APIKEY || \"your-genius-api-key\";\n// below player is erela.js || you can use anything.\nconst songTitle = player.queue.current.title;\nconst songArtist = player.queue.current.author;\nvar options = {\n  APIKey: APIKey,\n  Title: songTitle,\n  Artist: songArtist,\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\nasync () =\u003e {\n  try {\n    const albumArt = await lyricsfetchergenius.GetSong(options); // returns an object\n    console.log(albumArt); // you can do somthing else with it other than console.log\n  } catch (error) {\n    throw error;\n  }\n};\n```\n\nUsing GetSongByID:\n\n```js\nconst lyricsfetchergenius = require(\"lyricsfetchergenius\");\nconst songID = \"368385\"; // just an example\nconst APIKey = process.env.APIKEY || \"your-genius-api-key\";\nasync () =\u003e {\n  try {\n    const song = await lyricsfetchergenius.GetSongByID(ID, APIKey); // returns an object\n    console.log(song); // you can do somthing else with it other than console.log\n  } catch (error) {\n    throw error;\n  }\n};\n```\n\nUsing SearchSong:\n\n```js\nconst lyricsfetchergenius = require(\"lyricsfetchergenius\");\n// example of options 1\nvar options = {\n  APIKey: \"your-genius-api-key\",\n  Title: \"Late Night Trips\",\n  Artist: \"Alex1\",\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\n// example of options 2\nconst APIKey = process.env.APIKEY || \"your-genius-api-key\";\n// below player is erela.js || you can use anything.\nconst songTitle = player.queue.current.title;\nconst songArtist = player.queue.current.author;\nvar options = {\n  APIKey: APIKey,\n  Title: songTitle,\n  Artist: songArtist,\n  OptimizeQuery: true, // optimizes the query for best results. default is false\n  AuthHeader: true, // include auth header in the search request. default is false\n};\n\nasync () =\u003e {\n  try {\n    let song = await lyricsfetchergenius.SearchSong(options);\n    console.log(song); //returns a object. you can do somthing else with it other than console.log\n  } catch (error) {\n    throw error;\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxmabel%2Flyricsfetchergenius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsxmabel%2Flyricsfetchergenius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxmabel%2Flyricsfetchergenius/lists"}