Skip to main content

Playlists

Methods

getPlaylist

getPlaylist(requestParameters): Promise<Playlist[]>

Get a playlist by ID

Example:


const playlist = await audiusSdk.playlists.getPlaylist({
playlistId: "AxRP0",
});

Parameters

NameType
requestParametersGetPlaylistRequest

Returns

Promise<Playlist[]>


getPlaylistTracks

getPlaylistTracks(requestParameters): Promise<Track[]>

Fetch tracks within a playlist.

Example:


const tracks = await audiusSdk.playlists.getPlaylistTracks({
playlistId: "AxRP0",
});

Parameters

NameType
requestParametersGetPlaylistTracksRequest

Returns

Promise<Track[]>


getTrendingPlaylists

getTrendingPlaylists(requestParameters?): Promise<Playlist[]>

Gets trending playlists for a time period

Example:


const playlists = await audiusSdk.playlists.getTrendingPlaylists();

Parameters

NameType
requestParametersGetTrendingPlaylistsRequest

Returns

Promise<Playlist[]>


searchPlaylists

searchPlaylists(requestParameters): Promise<Playlist[]>

Search for a playlist

Example:


const playlists = await audiusSdk.playlists.searchPlaylists({
query: 'lo-fi',
});

Parameters

NameType
requestParametersSearchPlaylistsRequest

Returns

Promise<Playlist[]>