SkillAgentSearch skills...

SpotifyMobileLyricsAPI

This API overrides the Spotify API endpoint used in the Spotify mobile app to fetch lyrics for the currently playing song.

Install / Use

/learn @Natoune/SpotifyMobileLyricsAPI
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Spotify Mobile Lyrics API

[!IMPORTANT] ReVanced has received a DMCA takedown.
Read the full announcement of ReVanced here: ⚖️ Spotify DMCA notice - Seeking legal help
Read what I have to say about this here: - READ ME : ReVanced DMCA takedown - #97

This API overrides the Spotify API endpoint used in the Spotify mobile app to fetch lyrics for the currently playing song.

You can use this API in xManager to fetch lyrics without having a Spotify Premium account.

How it works

  1. The Spotify mobile app sends a request to the Mobile Spotify API to get the lyrics for the currently playing song.

  2. The official Mobile Spotify API endpoint is overridden in the app code to point to the modified API.

  3. The modified API fetches the lyrics from the WEB API of Spotify, which doesn't require a Premium account.

  4. The lyrics are returned in the correct format (Protobuf) to the Spotify mobile app.

  5. The mobile app displays the lyrics.

How it works

ReVanced

You can use this API with ReVanced to fetch lyrics without having a Spotify Premium account.

Use the patch "Change lyrics provider" in the ReVanced Manager and set the host to lyrics.natanchiodi.fr or to your own server.

xManager

Patch xManager (Not maintained)

[!NOTE]
I stopped working on the xManager patch script for lyrics since ReVanced included the "Change lyrics provider" patch.
The script I make available in this repo will not work on newer versions of Spotify.

Download the pre-patched releases

Go to the releases page and download the latest release of Spotify patched with xManager and the Spotify Mobile Lyrics API.

Manually patch xManager release

The script patch:xmanager will automatically download the latest release of xManager and apply the lyrics patch.

npm run patch:xmanager -- --server "lyrics.natanchiodi.fr" --apk "Spotify v8.9.84.594 [xManager] (Merged).apk" --ks-file "keystore.jks" --ks-pass "******"

Script arguments:

  • --server the lyrics API host (see Public servers list).
  • --apk the path to the Spotify APK. If not provided, the script will download the latest release (user input required).
  • --ks-file (optional) the path to the keystore file.
  • --ks-pass (optional) the keystore password.

If no keystore is provided, the script will sign the APK with your username.

Public servers list

| Server name | Host | Owner | | ------------------ | ------------------------------------------------------------------------------ | ------------------------------------------ | | Default | lyrics.natanchiodi.fr | Natan Chiodi | | Team xManager | xmanager-lyrics.dev | xC3FFF0E | | - | - | - | | ➕ Add your server | See Adding a public server | |

Server setup

Docker

You can run the API in a Docker container.

The container will expose the API on port 3000. You can change the port by changing the -p argument.

Environment variables:

  • SP_DC the sp_dc cookie value from the Spotify Web Player (see Finding sp_dc).
  • DATABASE_TYPE (optional) the type of database to use. Supported values: sqlite, mysql, postgres.
  • DATABASE_URL (optional) the database connection URI. Required if DATABASE_TYPE is set to mysql or postgres.
  • SSL_CERT (optional) the SSL certificate string.
  • SSL_KEY (optional) the SSL key string.

You can also mount a volume to /usr/src/app/certs to provide the SSL certificate and key (cert.pem and private.key).

Example

  1. Pull the image:
docker pull ghcr.io/natoune/spotify-mobile-lyrics-api:latest
  1. Run the container:
docker run -d -p 443:3000 -e SP_DC=spotify-cookie  -v /path/to/certs:/usr/src/app/certs ghcr.io/natoune/spotify-mobile-lyrics-api:latest

Vercel

[!WARNING] The Free plan of Vercel is rate-limited (see Limits).
It should be enough for personal use, but consider upgrading to a paid plan or using another provider if you need more requests.

You can deploy the API to Vercel with the following steps:

Deploy with Vercel

  1. Click the "Deploy with Vercel" button.
  2. Set the SP_DC environment variable to the sp_dc cookie value from the Spotify Web Player (see Finding sp_dc).
  3. Set up the database integration.
  4. Deploy the API.

Cloudflare Workers

You can deploy the API to Cloudflare Workers with the following steps:

  1. Install the Wrangler CLI.
  2. Clone the repository:
git clone https://github.com/Natoune/SpotifyMobileLyricsAPI.git
cd SpotifyMobileLyricsAPI
  1. Install the dependencies:
npm install
  1. Copy the wrangler.example.toml file to wrangler.toml:
cp wrangler.example.toml wrangler.toml
  1. (Optional) Set up the database integration:
npx wrangler secret put DATABASE_TYPE
npx wrangler secret put DATABASE_URL

(Set the value of DATABASE_TYPE to postgres or mysql)

  1. Add an SP_DC secret

Get the sp_dc cookie value from the Spotify Web Player (see Finding sp_dc) and set it as a secret:

npx wrangler secret put SP_DC
  1. Deploy the API:
npx wrangler deploy

Node.js / Bun

You can run the API on your own server with Node.js or Bun.

  1. Clone the repository:
git clone https://github.com/Natoune/SpotifyMobileLyricsAPI.git
cd SpotifyMobileLyricsAPI
  1. Install the dependencies:
npm install

or

bun install
  1. Set the environment variables:

.env:

# The API must be available over HTTPS on port 443.
# Change this value only if you are behind a reverse proxy.
PORT=443

# Find a detailed guide on how to get your Spotify SP_DC cookie here: https://github.com/akashrchandran/syrics/wiki/Finding-sp_dc
SP_DC=your-spotify-cookie

# Enable this for debugging purposes.
LOG_REQUESTS=false

# The database is optional.
# Use SQLite if you can use the filesystem, or MySQL/Postgres if you have a remote database.
DATABASE_TYPE=sqlite

# DATABASE_TYPE=mysql or postgres
# DATABASE_URL=your-database-uri
  1. Set up SSL [REQUIRED]

You have multiple options to set up SSL:

  • Use a reverse proxy like Nginx or Caddy.
  • Use a service like Cloudflare.
  • Use a certificate
    • Place the certificate and key at certs/private.key and certs/cert.pem.
  1. Build and start the API:
npm run build
npm start

or

bun build
bun start

Contributors

If you want to contribute, please see the CONTRIBUTING.md file.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

View on GitHub
GitHub Stars250
CategoryDevelopment
Updated11d ago
Forks17

Languages

TypeScript

Security Score

95/100

Audited on Mar 13, 2026

No findings