User action methods onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/inner/llms.txt
Use this file to discover all available pages before exploring further.
YouTube require a valid session cookie. They cover liking content, subscribing to artists, managing playlists, and fetching account information. All methods are suspend functions returning Result<T>.
Liking content
likeVideo(videoId, like)
Likes or unlikes a video.
The YouTube video ID to like or unlike.
true to like the video; false to remove the like.likePlaylist(playlistId, like)
Likes or unlikes a playlist (saves or unsaves it to the user’s library).
The playlist ID.
true to like/save the playlist; false to remove it.Subscribing
subscribeChannel(channelId, subscribe)
Subscribes to or unsubscribes from a YouTube channel.
The YouTube channel ID (format:
UC...). This is distinct from the artist browse ID — use getChannelId() to resolve it.true to subscribe; false to unsubscribe.getChannelId(browseId)
Helper that resolves a channel ID from an artist page’s browse ID. Internally calls artist() and returns ArtistItem.channelId.
The artist’s InnerTube browse ID (format:
UC...).The channel ID string, or an empty string if the artist page could not be fetched or has no
channelId.getChannelId is a suspend function but does not return Result<T> — it returns a raw String. Errors are swallowed and an empty string is returned instead. Check for an empty result before calling subscribeChannel.Playlist management
createPlaylist(title)
Creates a new empty playlist in the user’s YouTube Music library.
Display name for the new playlist.
The newly created playlist’s ID.
renamePlaylist(playlistId, name)
Renames an existing playlist.
ID of the playlist to rename.
New display name.
deletePlaylist(playlistId)
Permanently deletes a playlist from the user’s library.
ID of the playlist to delete.
addToPlaylist(playlistId, videoId)
Adds a single video to a playlist and returns the setVideoId of the new entry (needed for removal and reordering).
Target playlist ID.
Video ID to add.
The
setVideoId assigned to the new playlist entry. Required for removeFromPlaylist and moveSongPlaylist.addPlaylistToPlaylist(playlistId, addPlaylistId)
Appends all songs from one playlist into another.
The destination playlist ID.
The source playlist whose songs will be appended.
removeFromPlaylist(playlistId, videoId, setVideoId)
Removes a specific playlist entry by its setVideoId.
The playlist to modify.
Video ID of the track to remove.
The unique entry identifier within the playlist. Returned by
addToPlaylist() or looked up via playlistEntrySetVideoIds().moveSongPlaylist(playlistId, setVideoId, successorSetVideoId)
Reorders a playlist entry, placing it immediately before the entry identified by successorSetVideoId.
The playlist to modify.
The
setVideoId of the entry to move.The
setVideoId of the entry that should follow the moved entry. Pass null to move the entry to the end of the playlist.playlistEntrySetVideoIds(playlistId, videoId)
Looks up all setVideoId values for occurrences of a given videoId within a playlist. Handles pagination automatically.
The playlist to search.
Video ID to look up.
Distinct
setVideoId values for all occurrences of videoId in the playlist.Library
library(browseId, tabIndex)
Fetches the user’s library for a given browse destination. The returned LibraryPage contains either grid-style items (playlists, albums) or list-style items (songs), depending on the browse destination.
InnerTube browse ID for the library section (e.g.
FEmusic_liked_playlists).Zero-based tab index when the browse destination has multiple tabs.
libraryContinuation(continuation)
Loads the next page of library items.
Continuation token from
LibraryPage.continuation.libraryRecentActivity()
Fetches the user’s recently interacted-with content using LibraryFilter.FILTER_RECENT_ACTIVITY. Also enriches any ArtistItem results with a proper playEndpoint by fetching each artist page individually.
Same shape as
library() but fetched via the recent-activity continuation filter.musicHistory()
Fetches the user’s play history page (FEmusic_history), grouped into time-based sections (Today, Yesterday, etc.).
accountInfo()
Fetches the display name, handle, and avatar for the currently signed-in account.
Account metadata parsed from the account menu response. Throws
IllegalStateException if the user is not signed in.LibraryFilter values
YouTube.LibraryFilter is a @JvmInline value class wrapping an encoded continuation string used to filter library browse requests.
| Constant | Description |
|---|---|
FILTER_RECENT_ACTIVITY | Items you have recently interacted with (plays, likes, saves). Used by libraryRecentActivity(). |
FILTER_RECENTLY_PLAYED | Items sorted by most recently played. |
FILTER_PLAYLISTS_ALPHABETICAL | Liked playlists sorted A → Z. |
FILTER_PLAYLISTS_RECENTLY_SAVED | Liked playlists sorted by most recently saved. |
LibraryFilter values are passed as continuation tokens to the browse endpoint rather than as query parameters. They are used internally by libraryRecentActivity() and can be passed directly to libraryContinuation() to trigger filtered library views.