librelyrics-spotify
June 20, 2026 · View on GitHub
Spotify lyrics provider plugin for LibreLyrics.
Features
- Fetch synced and unsynced lyrics from Spotify
- Support for track, album, and playlist URLs
- TOTP-based authentication with Spotify's internal API
Installation
pip install librelyrics-spotify
Configuration
Requires a Spotify sp_dc cookie. The TOTP secret dictionary URL is built in
as the default, and you can override it in configuration if that source is
blocked in your environment. The configured value takes priority when set.
Set it up via:
librelyrics config edit
Or set it directly:
librelyrics config set plugins.Spotify.sp_dc "YOUR_SP_DC_COOKIE"
To override the TOTP secret source, set:
librelyrics config set plugins.Spotify.totp_secret_cipher_dict_url "https://github.com/xyloflake/spot-secrets-go/blob/main/secrets/secretDict.json?raw=true"
Getting your sp_dc cookie
- Open Spotify Web Player in your browser
- Log in to your account
- Open Developer Tools (F12) → Application → Cookies
- Find the
sp_dccookie and copy its value
Supported URLs
https://open.spotify.com/track/<id>https://open.spotify.com/album/<id>https://open.spotify.com/playlist/<id>
Usage
Once installed, the plugin is automatically discovered by LibreLyrics:
librelyrics "https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8"
License
GPL-3.0-or-later