Skip to content

Search Prefixes

Ryanlink supports a wide range of search platforms. Pass a URL or a query string prefixed with one of the identifiers below to manager.search() or player.search().

These are built into Lavalink and available without plugins:

| Prefix | Platform | | :--- | :--- | | ytsearch: | YouTube search | | ytmsearch: | YouTube Music search | | scsearch: | SoundCloud search | | local: | Local files |

LavaSrc Plugin Sources lavasrc-plugin required

Section titled “LavaSrc Plugin Sources ”

| Prefix | Platform | | :--- | :--- | | spsearch: | Spotify search | | sprec: | Spotify recommendations | | amsearch: | Apple Music search | | dzsearch: | Deezer search | | dzisrc: | Deezer by ISRC | | tdsearch: | Tidal search | | jssearch: | JioSaavn search | | ymsearch: | Yandex Music search | | vksearch: | VK Music search | | qbsearch: | Qobuz search | | pdsearch: | Pandora search | | ftts: | Flowery TTS | | ytmsearch: | YouTube Music (via LavaSrc) |

DuncteBot Plugin Sources skybot-lavalink-plugin required

Section titled “DuncteBot Plugin Sources ”

| Prefix | Platform | | :--- | :--- | | speak: | Text-to-speech (max 100 chars) | | phsearch: | PornHub search | | mixcloud: | Mixcloud | | getyarn: | GetYarn.io | | clypit: | Clyp.it | | reddit: | Reddit audio | | ocremix: | OverClocked ReMix | | tiktok: | TikTok | | soundgasm: | Soundgasm |

Ryanlink automatically detects the source from direct URLs. Supported URL patterns include:

  • https://open.spotify.com/track/...
  • https://music.apple.com/...
  • https://www.deezer.com/track/...
  • https://tidal.com/browse/track/...
  • https://soundcloud.com/...
  • https://youtube.com/watch?v=... / https://youtu.be/...
  • https://www.jiosaavn.com/...
  • https://music.yandex.ru/...
  • https://vk.com/...
  • https://www.qobuz.com/...
  • https://www.pandora.com/...
  • https://bandcamp.com/...
const manager = new RyanlinkManager({
playerOptions: {
defaultSearchPlatform: 'spsearch', // Spotify as default
},
});

Any query that isn’t a direct URL will automatically use this prefix.

Register custom prefix aliases per-node using the SourceRegistry:

// After node connects
node.sourceRegistry.registerMapping('yt', 'ytsearch');
node.sourceRegistry.registerMapping('sp', 'spsearch');
// Now 'yt:daft punk' resolves to 'ytsearch:daft punk'
const result = await manager.search('yt:daft punk', user);

Register regex matchers for automatic source detection from URLs:

node.sourceRegistry.registerMatcher('spotify', /open\.spotify\.com/);
node.sourceRegistry.registerMatcher('youtube', /youtube\.com|youtu\.be/);

When a URL matches a registered matcher, Ryanlink validates that the node has the corresponding source manager enabled (if autoChecks.sourcesValidations is true).

When autoChecks.sourcesValidations: true (default), Ryanlink validates that the node has the required source manager enabled before sending the request. Disable to skip validation:

nodes: [{
id: 'main',
host: 'localhost',
port: 2333,
authorization: 'youshallnotpass',
autoChecks: {
sourcesValidations: false,
pluginValidations: false,
},
}]

Or set allowCustomSources: true in playerOptions to allow any source without validation:

playerOptions: {
allowCustomSources: true,
}

When a node doesn’t have the bandcamp source manager enabled, player.search() automatically falls back to Bandcamp’s autocomplete API to find tracks:

// Works even without bandcamp in node.info.sourceManagers
const result = await player.search('bcsearch:daft punk', user);

This returns UnresolvedTrack objects that resolve lazily when played.