The account API provides methods for fetching the authenticated user’s account details, obtaining visitor data required by unauthenticated requests, managing the music taste profile shown during onboarding, submitting generic feedback tokens, and resolving missing artist IDs across item lists. AllDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/innertube-v1/llms.txt
Use this file to discover all available pages before exploring further.
suspend functions return Result<T>.
YouTube.accountInfo
Fetches the signed-in user’s display name, handle, and avatar from the account menu endpoint.
YouTube.visitorData
Fetches a fresh visitor data string from music.youtube.com/sw.js_data. Visitor data is a short Base64-encoded token that must be attached to every unauthenticated InnerTube request. After obtaining it, assign it to YouTube.visitorData.
The visitor data string, which begins with
"Cgt" or "Cgs".YouTube.getTasteProfile
Browses the FEmusic_tastebuilder page to retrieve the user’s taste profile. Currently returns an empty profile (TasteProfile(artists = emptyMap())); full parsing requires additional model support for musicTastebuilderShelfRenderer.
YouTube.setTasteProfile
Submits the user’s artist selections and impression tokens for all displayed artists to the feedback endpoint. Typically called after the user completes the taste-builder onboarding flow.
Names of the artists the user selected. Each name must be a key in
allArtists.The complete artist map from
TasteProfile.artists, used to look up selectionValue and impressionValue feedback tokens.Succeeds when the feedback endpoint accepted all tokens. A no-op (does not call
feedback()) when selectedArtists maps to zero valid tokens.YouTube.feedback
Generic low-level method that submits one or more feedback tokens to the InnerTube feedback endpoint. Higher-level functions such as addSongToLibrary(), removeHistoryItems(), and setTasteProfile() all delegate to this method.
One or more opaque feedback token strings. Token sources include
SongItem.libraryAddToken, SongItem.libraryRemoveToken, SongItem.historyRemoveToken, TasteArtist.selectionValue, and TasteArtist.impressionValue.true when all feedbackResponse entries in the API response have isProcessed = true.YouTube.resolveArtistIds
For any YTItem in the list whose artist(s) have a null id, performs a parallel artist search (up to 8 concurrent requests) to fill in the missing IDs. Returns the updated list with the same ordering.
Any mix of
SongItem, AlbumItem, PlaylistItem, EpisodeItem, and PodcastItem values. Items of other types are passed through unchanged.A new list with the same elements and ordering. For items where an artist name matched a search result exactly (case-insensitive), the
Artist.id field is now populated.YouTube.resolveArtistIdMap
Same resolution logic as resolveArtistIds() but returns a Map<artistName, artistId> instead of the modified item list. Use this when you need to apply resolved IDs across multiple independently-fetched sections without running duplicate searches.
Items to collect missing artist names from. The same concurrency limit of 8 parallel searches applies.
A map of
artistName to resolved artistId. Only entries where a match was found are included. Returns an empty map when all artists already have IDs.