The Playlists API covers reading playlist content as well as creating, editing, and deleting playlists and their tracks. Read operations work without authentication; all mutation methods require a validDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/innertube-v2/llms.txt
Use this file to discover all available pages before exploring further.
YouTube.cookie.
YouTube.playlist()
Fetches a playlist page including header metadata, songs, and related playlists.
The playlist ID (without the
VL prefix). Example: "PLxxxxxxxxxxxxxxxx".Returns
Result<PlaylistPage>
Playlist header metadata.
First page of tracks. Each
SongItem carries a setVideoId field needed for mutation operations.Continuation token for loading more tracks via
playlistContinuation().Continuation token for loading additional related content sections.
Related playlists, albums, or artists surfaced in the right-hand column.
YouTube.playlistContinuation()
Fetches the next page of tracks for a playlist.
Continuation token from
PlaylistPage.songsContinuation or a previous PlaylistContinuationPage.continuation.Returns
Result<PlaylistContinuationPage>
Next page of tracks.
Token for the following page.
null when all tracks have been loaded.YouTube.createPlaylist()
Creates a new empty playlist and returns its ID.
Display name for the new playlist.
Returns
String — the newly created playlist ID (e.g. "PLxxxxxxxxxxxxxxxx").
createPlaylist() is a blocking function implemented with runBlocking. Call it from a background thread or coroutine dispatcher that supports blocking — never from the main thread.YouTube.renamePlaylist()
Renames an existing playlist.
The ID of the playlist to rename.
The new display name.
Returns
Result<Unit> — succeeds silently on success.
YouTube.deletePlaylist()
Permanently deletes a playlist.
The ID of the playlist to delete.
Returns
Result<Unit> — succeeds silently on success.
YouTube.addToPlaylist()
Adds a single video to a playlist.
The target playlist ID.
The video ID to add.
Returns
Result<Unit>
YouTube.addPlaylistToPlaylist()
Appends all tracks from one playlist into another.
The target playlist ID.
The source playlist whose tracks will be copied in.
Returns
Result<Unit>
YouTube.removeFromPlaylist()
Removes a specific track from a playlist using both the video ID and its playlist-level setVideoId.
The playlist to remove from.
The video ID of the track to remove.
The per-occurrence unique identifier for this track within the playlist. Obtain from
SongItem.setVideoId returned by playlist() or playlistContinuation(). This is not the same as videoId — a track that appears twice in a playlist has two different setVideoId values.Returns
Result<Unit>
YouTube.moveSongPlaylist()
Moves a track to a new position within a playlist by specifying which track it should appear before.
The playlist containing the track to move.
The
setVideoId of the track being moved.The
setVideoId of the track that the moved track should appear before. Pass null to move the track to the end of the playlist.Returns
Result<Unit>
Thumbnail Management
YouTube.uploadCustomThumbnailLink()
Uploads a custom JPEG/PNG thumbnail for a playlist.
The playlist ID.
Raw image bytes (JPEG or PNG recommended). The implementation performs a two-stage upload: first an initiating request that returns a GUploader upload ID, then the actual blob upload.
Result<String?> — the new thumbnail URL on success, or null if the response header doesn’t contain one.
YouTube.removeThumbnailPlaylist()
Removes the custom thumbnail from a playlist, reverting to the auto-generated one.
The playlist ID.
Result<String?> — the resulting thumbnail URL (the auto-generated one), or null.
Social Actions
YouTube.likeVideo()
Likes or unlikes a video.
The video ID.
true to like, false to unlike.YouTube.likePlaylist()
Saves or unsaves a playlist to the authenticated user’s library.
The playlist ID.
true to save, false to unsave.YouTube.subscribeChannel()
Subscribes to or unsubscribes from a YouTube channel.
The channel ID (obtainable from
ArtistItem.channelId).true to subscribe, false to unsubscribe.Library Song Management
YouTube.addSongToLibrary()
Adds a song to the authenticated user’s library by fetching fresh feedback tokens via next().
The video ID of the song to add.
Result<Boolean> — true when the feedback endpoint confirms the action was processed.
YouTube.removeSongFromLibrary()
Removes a song from the authenticated user’s library. Uses fresh tokens from next() for reliability.
The video ID of the song to remove.
Result<Boolean>
YouTube.toggleSongLibrary()
Convenience wrapper that adds or removes a song based on the addToLibrary flag.
The video ID.
true to add, false to remove.YouTube.feedback()
Low-level feedback endpoint. Send one or more opaque feedback tokens to trigger server-side actions (e.g. library add/remove, history removal).
Feedback tokens. Obtain
SongItem.libraryAddToken and SongItem.libraryRemoveToken from search, browse, or next results.Result<Boolean> — true when all feedback responses report isProcessed = true.