The player API resolves the playback queue, retrieves streaming manifests, fetches rich video metadata, and manages playback telemetry.Documentation 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.
YouTube.next(), YouTube.player(), YouTube.queue(), and the helper methods below are all suspend functions that return Result<T>.
YouTube.next
Resolves the watch queue for a track or playlist, returning the ordered song list, the currently-playing index, and browse endpoints for lyrics and related content. If the queue contains an automix panel, next() resolves it recursively and merges the results.
Identifies the track or playlist to resolve.
Token from a prior
NextResult.continuation to page through a long queue. Defaults to null.YouTube.player
Fetches the PlayerResponse for a video, which contains stream URLs, adaptive format manifests, and playback status.
The video ID to retrieve streams for.
Optional playlist context. Some formats are only available in a playlist context.
The InnerTube client profile to use (e.g.
YouTubeClient.WEB_REMIX, YouTubeClient.ANDROID, YouTubeClient.IOS). Different clients expose different format sets.Signature timestamp required by clients that set
useSignatureTimestamp = true. Obtain from the player JavaScript.Proof-of-origin token for clients that set
useWebPoTokens = true.YouTube.getMediaInfo
Fetches rich metadata for a video — description, author details, view count, and like/dislike counts sourced from the Return YouTube Dislike API.
The video ID to retrieve metadata for.
YouTube.transcript
Fetches the timed transcript for a video as a formatted string. Each line is prefixed with a timestamp in [MM:SS.mmm] format.
The video ID to retrieve the transcript for.
A newline-separated string of timestamped cue lines, e.g.
"[00:04.080]Never gonna give you up".YouTube.queue
Resolves up to MAX_GET_QUEUE_SIZE video IDs or an entire playlist into a flat list of SongItems using the music/get_queue endpoint.
List of video IDs to resolve. Must not exceed
YouTube.MAX_GET_QUEUE_SIZE (1 000).A playlist ID to resolve all tracks for. Provide either
videoIds or playlistId, not both.Resolved song metadata for every requested video ID.
| Constant | Value | Meaning |
|---|---|---|
YouTube.MAX_GET_QUEUE_SIZE | 1000 | Maximum number of video IDs per queue() call. |
YouTube.registerPlayback
Sends a playback telemetry ping to the YouTube tracking URL returned in the player response. Call this once when a track starts to satisfy the API’s engagement requirements.
Optional playlist context for the playback event.
The playback-tracking URL from
PlayerResponse.playbackTracking. A random 16-character content playback nonce (cpn) is generated automatically.