{"id":20574812,"url":"https://github.com/scf4/lyricist","last_synced_at":"2025-08-21T20:33:15.209Z","repository":{"id":9245236,"uuid":"61377578","full_name":"scf4/lyricist","owner":"scf4","description":"Genius.com API client with lyrics scraping 🎶🎤👨‍🎤","archived":false,"fork":false,"pushed_at":"2022-03-19T10:59:10.000Z","size":96,"stargazers_count":100,"open_issues_count":1,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-13T21:56:34.820Z","etag":null,"topics":["album","artists","fetch-lyrics","genius","lyricist","lyrics","songs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scf4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-06-17T13:58:14.000Z","updated_at":"2024-02-18T17:52:53.000Z","dependencies_parsed_at":"2022-08-07T05:00:45.710Z","dependency_job_id":null,"html_url":"https://github.com/scf4/lyricist","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scf4%2Flyricist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scf4%2Flyricist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scf4%2Flyricist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scf4%2Flyricist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scf4","download_url":"https://codeload.github.com/scf4/lyricist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532448,"owners_count":18240792,"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":["album","artists","fetch-lyrics","genius","lyricist","lyrics","songs"],"created_at":"2024-11-16T05:37:12.767Z","updated_at":"2024-12-20T04:08:08.843Z","avatar_url":"https://github.com/scf4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lyricist 🎤\n⭐️ Genius.com API client with lyric scraping\n\n## Installation\n```\nyarn add lyricist\n```\n\nor\n\n```\nnpm install lyricist\n```\n\n## API Key\nGet an access token at https://genius.com/api-clients\n\n```js\nconst lyricist = new Lyricist(accessToken);\n```\n\n## Look up a song by ID\nUse `song()` to fetch a song by ID:\n```js\nconst song = await lyricist.song(714198);\nconsole.log(song.title);\n\n// output: Death with Dignity\n```\n\n#### or with promises\n```js\nlyricist.song(714198).then(song =\u003e console.log(song.title));\n```\n\n## Get song lyrics\nThe Genius API doesn't offer lyrics, but Lyricist can scrape Genius.com for you. Simply provide the `fetchLyrics` option like this:\n```js\nconst song = await lyricist.song(714198, { fetchLyrics: true });\nconsole.log(song.lyrics);\n\n// output: Spirit of my silence I can hear you...\n```\n## Look up an album\n\nUse `album()` to look up an album by ID. The Genius API doesn't allow you to search an album by title, but song() will return an `album.id`:\n\n```js\nconst album = await lyricist.album(56682);\nconsole.log(`${album.name} by ${album.artist.name}`);\n\n// output: Lanterns by Son Lux\n```\n\n## Get an album's tracklist\nThe Genius API doesn't provide tracklists, but Lyricist can scrape Genius.com and return the tracklist for you. Simply provide the `fetchTracklist` option like this:\n\n```js\nconst album = await lyricist.album(56682, { fetchTracklist: true });\nconsole.log(album.songs);\n\n// output: [{ id: 502102, title: 'Alternate World', ... }, { id: 267773, title: 'Lost It To Trying', ... }, ...]\n\n```\n## Look up an artist\nUse `artist()` to look up an artist by ID:\n```js\nconst artist = await lyricist.artist(2);\nconsole.log(artist.name);\n\n// output: Jay Z\n```\n\n## Get songs by an artist\nUse `songsByArtist()` to list an artist's songs. Example usage:\n```js\nconst songs = await lyricist.songsByArtist(2);\n```\n`songsByArtist()` will show  **20 results per page** by default, and can be as high as 50.\n\nYou can provide options as a second parameter. The available options are:\n\n* `perPage`: Number (default: 20)\n* `page`: Number (default: 1)\n* `sort` String: 'title' or 'popularity' (default: 'title')\n\nExample:\n```js\nconst songs = await lyricist.songsByArtist(2, { page: 2, perPage: 50 });\n```\n\n## Search songs by artist name/title\nUse `search()` to search for songs:\n```js\nconst songs = await lyricist.search('Virtual Insanity - Jamiroquai');\nconsole.log(songs);\n\n/* output: (Array of all matching songs)\n[\n  {\n    annotation_count: 1,\n    api_path: '/songs/1952220',\n    full_title: 'Virtual insanity - remastered by Jamiroquai',\n    header_image_thumbnail_url: 'https://images.genius.com/cd9bd5e1d6d23c9a8b044843831d4b3c.300x300x1.png',\n    header_image_url: 'https://images.genius.com/cd9bd5e1d6d23c9a8b044843831d4b3c.820x820x1.png',\n    id: 1952220,\n    ...\n  },\n  ...\n]\n*/\n```\n\n## Set text_format\nThe Genius API lets you specify how the response text is formatted. Supported formatting options are `dom` (default), `plain` and `html`. See https://docs.genius.com/#/response-format-h1 for further information. The `textFormat` option is supported by `song()`, `album()` and `artist()`.\n```js\nconst song = lyricist.song(714198, { textFormat: 'html' });\nconsole.log(song.description.html);\n\n// output: \u003cp\u003eThe first track off of Sufjan’s 2015 album...\n```\n\n## Warning ⚠️\nTake care when fetching lyrics. This feature isn't officially supported by the Genius API, so use caching and rate-limit your app's requests as much as possible.\n\n## Node 6\nNode 6 doesn't support async/await and will need to use the transpiled version (lyricist/node6) along with promises:\n```js\nconst Lyricist = require('lyricist/node6');\n```\n\n\u003e Future updates will likely remove this support for old versions of Node\n\n## Genius API Docs\n\nCheck the [Genius.com API docs](https://docs.genius.com) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscf4%2Flyricist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscf4%2Flyricist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscf4%2Flyricist/lists"}