InnerTube’sDocumentation 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.
player endpoint returns a PlayerResponse that contains streaming formats and all metadata needed to play a track. This guide covers client selection, signature decryption, throttle parameter deobfuscation, and queue management.
Call
YouTubeExtractor.ensureInitialized() once at application startup before making any player requests. This pre-fetches the JavaScript needed for signature decryption and n-parameter deobfuscation, avoiding a delay on the first playback.Overview
PlayerResponse.streamingData.adaptiveFormats— a list of audio and video formats, each with a directurlor asignatureCipher/cipherthat must be decrypted before use.PlayerResponse.videoDetails— title, author, duration, and thumbnail.PlayerResponse.playbackTracking— URLs used to report playback events to YouTube.PlayerResponse.playerConfig.audioConfig— loudness normalisation data.
Choosing a Client
DifferentYouTubeClient values behave differently with respect to PoToken requirements, signature timestamps, audio quality, and login support. The recommended client for most playback scenarios is ANDROID_VR_1_43_32:
| Client | Notes |
|---|---|
ANDROID_VR_1_43_32 | Recommended primary client. Non-adaptive bitrate prevents audio stutter. No PoToken required. Does not support AV1. |
WEB_REMIX | Full feature set: login, signature timestamps, PoTokens. Required for authenticated history tracking. |
TVHTML5_SIMPLY_EMBEDDED_PLAYER | Embedded player that bypasses age-restrictions without login. |
TVHTML5 | Requires login and PoToken. Good fallback for web-style clients. |
ANDROID_CREATOR | Plays kids/children content; requires signature timestamp. |
ANDROID_VR_1_61_48 | Alternative VR client; can only be used logged-out. |
ANDROID_VR_NO_AUTH | No auth; no signature timestamp. |
IOS / IPADOS | Apple clients; no login or signature timestamp required. |
MOBILE | Android YouTube client; supports login and signature timestamps. |
WEB / WEB_CREATOR | Web clients; login required for WEB_CREATOR. |
YTPlayerUtils defines the full fallback chain used internally. ANDROID_VR_1_43_32 is the primary client (MAIN_CLIENT). If it fails, the STREAM_FALLBACK_CLIENTS array is tried in order:
Signature Timestamps
Clients withuseSignatureTimestamp = true (including WEB_REMIX, TVHTML5, and ANDROID_CREATOR) require a signatureTimestamp integer that is embedded in the player request body. It must be fetched from YouTube’s player JavaScript:
YouTube.player(). For clients where useSignatureTimestamp = false (such as ANDROID_VR_1_43_32), simply pass null.
PoTokens
WEB_REMIX and TVHTML5 set useWebPoTokens = true. These clients require a Proof-of-Origin Token to be included in the player request body, and a separate streaming token to be appended to each stream URL. See the Bot Detection guide for full PoToken generation details.
Pass the player token as the fifth argument:
Decrypting Stream URLs
Formats returned byadaptiveFormats fall into two categories:
Direct URL — the url field is present and non-null. Use it as-is (after deobfuscating the n parameter).
SignatureCipher — the signatureCipher (or cipher) field is present. This is a URL-encoded string that contains an obfuscated signature. Decrypt it before use:
n parameter to avoid bandwidth throttling by YouTube’s CDN:
Basic Playback Example
The next() Method
YouTube.next() returns the playback queue for a given video or playlist endpoint. It is the correct way to find the current track’s position in a queue and to load related tracks for continuous playback:
continuation back to YouTube.next() to page through the queue.
To bulk-fetch metadata for a set of video IDs (for example, to pre-populate a queue):
Playback Tracking
YouTube expects clients to report playback events so that listening history and recommendations are updated correctly. After playback begins, call:registerPlayback(playlistId: String?, playbackTracking: String) takes the tracking base URL string directly (not the PlaybackTracking object). The library appends a random client playback nonce (cpn) and rewrites the host to music.youtube.com automatically. Both the ANDROID_VR and WEB_REMIX player responses include playbackTracking. When both are fetched in parallel (as YTPlayerUtils does), prefer the WEB_REMIX tracking URLs for authenticated sessions to ensure history is recorded server-side.