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/SpotifyMobileLyricsAPIREADME
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
-
The Spotify mobile app sends a request to the Mobile Spotify API to get the lyrics for the currently playing song.
-
The official Mobile Spotify API endpoint is overridden in the app code to point to the modified API.
-
The modified API fetches the lyrics from the WEB API of Spotify, which doesn't require a Premium account.
-
The lyrics are returned in the correct format (Protobuf) to the Spotify mobile app.
-
The mobile app displays the lyrics.

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:
--serverthe lyrics API host (see Public servers list).--apkthe 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_DCthesp_dccookie 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 ifDATABASE_TYPEis set tomysqlorpostgres.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
- Pull the image:
docker pull ghcr.io/natoune/spotify-mobile-lyrics-api:latest
- 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:
- Click the "Deploy with Vercel" button.
- Set the
SP_DCenvironment variable to thesp_dccookie value from the Spotify Web Player (see Finding sp_dc). - Set up the database integration.
- Deploy the API.
Cloudflare Workers
You can deploy the API to Cloudflare Workers with the following steps:
- Install the Wrangler CLI.
- Clone the repository:
git clone https://github.com/Natoune/SpotifyMobileLyricsAPI.git
cd SpotifyMobileLyricsAPI
- Install the dependencies:
npm install
- Copy the
wrangler.example.tomlfile towrangler.toml:
cp wrangler.example.toml wrangler.toml
- (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)
- Add an
SP_DCsecret
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
- Deploy the API:
npx wrangler deploy
Node.js / Bun
You can run the API on your own server with Node.js or Bun.
- Clone the repository:
git clone https://github.com/Natoune/SpotifyMobileLyricsAPI.git
cd SpotifyMobileLyricsAPI
- Install the dependencies:
npm install
or
bun install
- 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
- 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.keyandcerts/cert.pem.
- Place the certificate and key at
- Build and start the API:
npm run build
npm start
or
bun build
bun start
Contributors
- Natan Chiodi - Creator
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.
