The Lyrics and LavaSearch Plugins Explained
What the Lyrics and LavaSearch plugins add to Lavalink — synced lyrics for the current track and rich multi-type search — how they work and how to use them from your bot.
On this page
Two Lavalink plugins make music bots feel more polished: a lyrics plugin that fetches lyrics — often time-synced — for the playing track, and LavaSearch, which returns rich search results across tracks, albums, artists and playlists in one request. This article explains what each adds and how bots use them.
LavaSearch: search that returns more than tracks
Lavalink’s standard track loading (/v4/loadtracks) is built for playing: give it a URL or a search like ytsearch:query, and it returns tracks. That’s enough for “play the first result”, but it’s limited for search interfaces where users want to browse.
LavaSearch adds a dedicated search endpoint that can return several result types at once:
- tracks
- albums
- artists
- playlists
- text suggestions
A request asks for the types you want:
GET /v4/loadsearch?query=spsearch:daft punk&types=track,album,artist
Authorization: your-password
The response groups results by type, each with its metadata. It works with sources that support rich search — notably those provided by LavaSrc, such as Spotify, Apple Music and Deezer — as well as YouTube Music and others, depending on plugin support.
Where LavaSearch shines
- Autocomplete. Discord slash command autocomplete can show a mix of tracks and albums as the user types. Keep results short (Discord allows up to 25 choices) and cache them briefly, because autocomplete fires on nearly every keystroke.
- Search menus. A
/searchcommand can present tracks, albums and playlists as select menus, letting users queue a whole album in one pick. - Artist browsing. “Show me this artist’s albums” flows become possible.
Using it from your bot
Not every client library wraps LavaSearch. When yours doesn’t, call the endpoint directly with your node’s host, port and password:
async function richSearch(query) {
const url = new URL(`http://${process.env.LAVALINK_HOST}:${process.env.LAVALINK_PORT}/v4/loadsearch`);
url.searchParams.set('query', query);
url.searchParams.set('types', 'track,album,playlist');
const res = await fetch(url, { headers: { Authorization: process.env.LAVALINK_PASSWORD } });
if (res.status === 204) return null; // no results
if (!res.ok) throw new Error(`LavaSearch failed: ${res.status}`);
return res.json(); // { tracks: [...], albums: [...], playlists: [...], ... }
}
Albums and playlists in the response can then be loaded for playback with your normal track-loading call using their URL.
Lyrics: showing words as the music plays
A lyrics plugin lets your bot fetch lyrics for a track through Lavalink, instead of integrating a separate lyrics API in your bot. Community plugins such as LavaLyrics provide this, pulling lyrics from sources configured on the node — for example LRCLib, along with sources provided by LavaSrc.
Kerit Cloud’s managed Elite, Apex and Enterprise plans include a Lyrics plugin that supports LRCLib and Musixmatch and returns timestamped lines your bot can display in real time.
Plain vs synced lyrics
- Plain lyrics are the full text. Easy to show in an embed or a paginated message.
- Synced lyrics come as lines with timestamps. Your bot can show the current line and update it as the song progresses — a “karaoke” display.
Not every track has synced lyrics; many have only plain text, and some have none. Handle all three cases.
How bots request lyrics
Lyrics plugins expose REST endpoints — typically one for an arbitrary track (passing its encoded track string) and one for a player’s currently playing track. Check the plugin’s README for the exact paths and parameters on your version. The response includes the source, the plain text and, where available, a list of timed lines.
Displaying synced lyrics responsibly
A live-updating lyrics message is a lovely feature and an easy way to hit Discord’s rate limits:
- Edit on a timer, not per line. Update every 3–5 seconds and show a few lines around the current position, rather than editing for every line.
- Stop when the track changes or the player stops, and clean up timers.
- Use the player’s position from Lavalink’s player updates to stay in sync after seeks and pauses.
- Offer plain lyrics as the default and live lyrics as an option.
See handling Discord API rate limits for the patterns.
A note on rights
Lyrics are copyrighted works. Lyrics providers license them under their own terms, and showing lyrics in your bot doesn’t change that. Display them for your users’ personal enjoyment, attribute the source where the plugin provides it, and avoid bulk exporting or republishing lyrics.
Installing the plugins yourself
On a self-managed node, add both to lavalink.plugins in application.yml with their Maven coordinates and repository, using versions that support Lavalink v4, then restart. LavaSearch relies on sources that support search — install LavaSrc too if you want Spotify, Apple Music or Deezer results. Lyrics plugins need their sources configured in the plugins section. Each plugin’s README lists the exact configuration. LavaSrc explained covers the source side.
Which Kerit Cloud plans include them
On managed Lavalink:
| Plan | LavaSrc | SponsorBlock | LavaSearch | Lyrics |
|---|---|---|---|---|
| Starter (₹59) | Yes | Yes | — | — |
| Premium (₹79) | Yes | Yes | Yes | — |
| Elite (₹149) | Yes | Yes | Yes | Yes |
| Apex (₹299) | Yes | Yes | Yes | Yes, plus custom plugin support |
| Enterprise (₹499) | Yes | Yes | Yes | Yes, plus custom plugin installs |
On self-managed plans, you can install any plugin from the Lavalink ecosystem yourself. Lavalink plans compared goes through each tier.
Summary
LavaSearch adds a /v4/loadsearch endpoint that returns tracks, albums, artists, playlists and text suggestions in one request — ideal for autocomplete and search menus. Lyrics plugins fetch plain or time-synced lyrics for any track or the current player, sourced from providers like LRCLib. Call their endpoints directly if your client doesn’t wrap them, update live lyrics on a timer to respect rate limits, and respect lyrics licensing.