No description
Find a file
2025-10-14 11:37:05 +07:00
controllers init: first commit 2025-07-30 19:14:41 +08:00
routes init: first commit 2025-07-30 19:14:41 +08:00
services chore: update secrets url 2025-10-14 11:37:05 +07:00
utils init: first commit 2025-07-30 19:14:41 +08:00
.gitignore init: first commit 2025-07-30 19:14:41 +08:00
.travis.yml init: first commit 2025-07-30 19:14:41 +08:00
Dockerfile init: first commit 2025-07-30 19:14:41 +08:00
index.js init: first commit 2025-07-30 19:14:41 +08:00
LICENSE update: new LICENSE 2025-07-30 19:21:12 +08:00
package.json init: first commit 2025-07-30 19:14:41 +08:00
README.md init: first commit 2025-07-30 19:14:41 +08:00
vercel.json init: first commit 2025-07-30 19:14:41 +08:00

Spotify Lyrics API

Unofficial API to fetch Spotify Lyrics data.

Warning

This project uses undocumented endpoints and may violate Spotify's Terms of Service. Use at your own risk.


Features

  • Retrieve Lyrics data by track ID or URI
  • Parses responses from the internal Spotify API by 2 format into lrc or srt.
  • Works with public or private tracks (as long as you're authenticated)

Example Request

GET /api/lyrics

https://localhost:3000/api/lyrics?url=https://open.spotify.com/track/4Q0qVhFQa7j6jRKzo3HDmP&format=lrc

Response:

{
  "syncType": "LINE_SYNCED",
  "lines": [
    {
      "timeTag": "00:00.48",
      "words": "You're glowing, you colour and fracture the light"
    },
    {
      "timeTag": "00:06.51",
      "words": "You can't help but shine"
    },
    ....
  ]
}

Setup

1. Clone the Repo

git clone https://github.com/Paxsenix0/Spotify-Lyrics-API.git
cd Spotify-Lyrics-API

2. Install Dependencies

npm install

3. Set Required Environment Variable

You must supply your sp_dc cookie from a logged-in Spotify session.

Create a .env file in the root:

SP_DC=your_sp_dc_cookie_here

This cookie is used to generate an access token to authenticate requests.


Deployment

You can deploy instantly with Vercel:

Deploy with Vercel


Notes

I'm developing this project entirely on my phone, without a PC or laptop. Also, I'm still learning — so feel free to send pull requests or suggestions if something looks off!


Reference

Shoutout to this helpful repo that inspired parts of this: https://github.com/akashrchandran/spotify-lyrics-api


License

This project is licensed under the MIT license. see LICENSE for details.


Contact

Telegram: @paxsenix0

Email: alex24dzn@proton.me

My Rest-API website: https://api.paxsenix.biz.id