The playback API resolves audio streams, manages the play queue, and fetches supplementary content like lyrics and transcripts. All functions are suspend functions returningDocumentation 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.
Result<T>. Token resolution (PoToken, GVS token) is handled automatically based on the configured authState.
player(...)
Resolves stream data for a single video ID using the specified client. This is the primary method for obtaining a playable stream URL.
The YouTube video ID to resolve.
Optional playlist context. Used by some clients to unlock radio or automix streams.
The InnerTube client to use. Different clients return different stream formats and quality levels. Common choices:
YouTubeClient.WEB_REMIX, YouTubeClient.ANDROID_MUSIC, YouTubeClient.TVHTML5.Required by clients where
useSignatureTimestamp = true (e.g. WEB_REMIX, TVHTML5). Obtained from the player JavaScript. Pass null for clients that do not need it.Explicit PoToken for this single call. Overrides the auth state’s
poTokenPlayer for this request. Set to null to use the value derived from the configured authState.Whether to attach the session cookie to this player request. Set to
false for anonymous stream resolution.Auth state snapshot to use for this call. Defaults to the current global state. Useful when you need to resolve a stream with a specific auth context without changing global state.
The raw InnerTube player response, including
streamingData (adaptive formats, HLS manifests), videoDetails, and playbackTracking URLs.PoToken resolution follows this precedence for player requests: explicit
poToken argument → authState.poTokenPlayer → authState.poToken. The token is only attached when webClientPoTokenEnabled = true and the client requires service integrity (web-family clients).registerPlayback(playlistId, playbackTracking, authState)
Reports a playback start event to YouTube’s analytics endpoint. Call this after a stream begins playing to satisfy YouTube Music’s playback tracking requirements.
Optional playlist context for the playback report.
The base URL from
PlayerResponse.playbackTracking.videostatsPlaybackUrl.baseUrl. Inner rewrites the domain to music.youtube.com automatically.Auth state snapshot used to resolve the GVS PoToken (
pot=) appended to the tracking URL.next(endpoint, continuation, followAutomixPreview)
Fetches the queue for a watch session — the list of upcoming songs — along with endpoints for lyrics and related content.
Contains
videoId and optional playlistId, playlistSetVideoId, index, and params fields that define the watch context.Continuation token to load the next page of queue items.
When
true, Inner automatically follows automix/radio preview endpoints at the end of the playlist panel, seamlessly extending the queue. Set to false if you want to page through a playlist’s own continuation first.queue(videoIds, playlistId)
Resolves track metadata for a list of video IDs or a playlist ID in a single request.
List of video IDs to resolve. Must not exceed
YouTube.MAX_GET_QUEUE_SIZE (1000).Playlist ID to resolve. At least one of
videoIds or playlistId must be non-null.YouTube.MAX_GET_QUEUE_SIZE = 1000 — passing more than 1000 videoIds triggers an assertion error. Split large lists into batches if needed.lyrics(endpoint)
Fetches the lyrics text for a track.
The lyrics browse endpoint. Obtain from
NextResult.lyricsEndpoint.Lyrics text as a single string, or
null if the track has no lyrics.related(endpoint)
Fetches the related content page for a track — similar songs, albums, artists, and playlists.
The related browse endpoint. Obtain from
NextResult.relatedEndpoint.transcript(videoId)
Fetches the full timestamped transcript for a video.
The YouTube video ID.
Transcript formatted as newline-separated
[mm:ss.mmm]text entries.getMediaInfo(videoId)
Fetches extended metadata for a video including author details, view count, like/dislike counts, and description.
The
dislike field is sourced from the third-party ReturnYouTubeDislike API, not from YouTube directly.visitorData()
Fetches a fresh visitorData token by parsing the YouTube Music service worker JavaScript.
A
visitorData token matching the pattern ^Cg[t|s].... Store this value in YouTube.visitorData to use it in subsequent requests.