Skip to main content

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.

The InnerTube SDK identifies itself to YouTube’s servers using a YouTubeClient value. Each client encodes a name, version, numeric ID, HTTP User-Agent, device context, and a set of capability flags that control authentication, token handling, and embedded playback behaviour. The companion object exposes a curated set of predefined clients — from the standard web and Android clients to specialised VR and Apple platform clients — each tuned for a particular content type or playback scenario. YouTubeLocale carries the geolocation and language settings attached to every request context.

YouTubeClient data class

@Serializable
data class YouTubeClient(
    val clientName: String,
    val clientVersion: String,
    val clientId: String,
    val userAgent: String,
    val osName: String? = null,
    val osVersion: String? = null,
    val deviceMake: String? = null,
    val deviceModel: String? = null,
    val androidSdkVersion: String? = null,
    val buildId: String? = null,
    val cronetVersion: String? = null,
    val packageName: String? = null,
    val friendlyName: String? = null,
    val loginSupported: Boolean = false,
    val loginRequired: Boolean = false,
    val useSignatureTimestamp: Boolean = false,
    val isEmbedded: Boolean = false,
    val useWebPoTokens: Boolean = false,
    val requirePoToken: Boolean = false,
    val includeUserAgentInContext: Boolean = false,
)
clientName
String
required
YouTube client name string sent in the InnerTube context.client.clientName field (e.g., "WEB_REMIX", "ANDROID_VR").
clientVersion
String
required
Client version string sent in context.client.clientVersion (e.g., "1.20260114.03.00").
clientId
String
required
Numeric client ID sent as the X-YouTube-Client-Name HTTP request header (e.g., "67" for WEB_REMIX).
userAgent
String
required
HTTP User-Agent header value. Also included in the request context body when includeUserAgentInContext is true.
osName
String?
Operating system name for the client context (e.g., "Android", "visionOS", "iPadOS"). null for web-based clients.
osVersion
String?
Operating system version string sent in context.client.osVersion. null for web-based clients.
deviceMake
String?
Device manufacturer string (e.g., "Oculus", "Apple", "Google"). null for generic or web clients.
deviceModel
String?
Device model identifier (e.g., "Quest 3", "RealityDevice14,1", "Pixel 9 Pro Fold"). null for generic or web clients.
androidSdkVersion
String?
Android SDK version integer as a string (e.g., "32" for Android 12). Only present on Android clients.
buildId
String?
Android build fingerprint (e.g., "SQ3A.220605.009.A1"). Present on VR and Creator clients that use Cronet.
cronetVersion
String?
Cronet network library version string embedded in the User-Agent of some Android clients.
packageName
String?
Android or iOS application package name (e.g., "com.google.android.apps.youtube.vr.oculus"). null for web clients.
friendlyName
String?
Human-readable label used internally for logging and debugging (e.g., "Android VR 1.61", "Android No SDK"). Not sent to the API.
loginSupported
Boolean
true when the client sends SAPISIDHASH authorization headers and populates context.user.onBehalfOfUser with the data-sync ID. Required for library, history, and playlist management calls.
loginRequired
Boolean
true when the client will not function without an active login session (e.g., WEB_CREATOR). A subset of loginSupported.
useSignatureTimestamp
Boolean
true when the client includes a signatureTimestamp field in player request bodies. Required by clients that use player signature verification.
isEmbedded
Boolean
true when the client uses an embedded player context (sets context.thirdParty.embedUrl to https://www.reddit.com/). Embedded clients can bypass age-restriction without requiring login.
useWebPoTokens
Boolean
true when the client should attach a PoToken in serviceIntegrityDimensions of the player request. Used by web-stack clients to pass bot-detection checks.
requirePoToken
Boolean
true when requests from this client will fail or return degraded streams if a PoToken is not supplied. A subset of useWebPoTokens.
includeUserAgentInContext
Boolean
true when the userAgent string is also embedded in the context.client.userAgent request body field (in addition to the HTTP header). Required by TV and VR clients.

Predefined client constants

All constants are accessible as YouTubeClient.<NAME> from the companion object. The table below shows key properties for every predefined client.
ConstantclientIdclientNameLoginEmbeddedPoTokenNotes
WEB1WEBGeneric web client
WEB_REMIX67WEB_REMIXYouTube Music web — primary client
WEB_CREATOR62WEB_CREATOR✓ (required)Requires login; used for creator endpoints
TVHTML57TVHTML5Smart TV client; good fallback for most content
TVHTML5_SIMPLY75TVHTML5_SIMPLY✓ (required)Must be used with a PoToken
TVHTML5_SIMPLY_EMBEDDED_PLAYER85TVHTML5_SIMPLY_EMBEDDED_PLAYER✓ (optional)Bypasses age-restriction; no PoToken needed
IOS5IOSiPhone YouTube client
MOBILE3ANDROIDStandard Android YouTube client
ANDROID_NO_SDK3ANDROIDAuthorization header must be excluded; cannot play paid/private/age-restricted content
ANDROID_VR_NO_AUTH28ANDROID_VRVersion 1.61.48, no auth, context includes user-agent
ANDROID_VR_1_65_1028ANDROID_VROculus Quest 3 — version 1.65; context includes user-agent
ANDROID_VR_1_61_4828ANDROID_VRCannot play Kids/Paid/Private/Age-restricted; logged-out only
ANDROID_VR_1_43_3228ANDROID_VRNon-adaptive bitrate; no AV1; fixes audio stuttering with YT Music
ANDROID_CREATOR14ANDROID_CREATORCan play kids content and music-licensed videos; no HDR or livestreams
VISIONOS101VISIONOSInternal/unreleased Apple Vision Pro client; may stop working
IPADOS5IOSiPad 6th Gen model; no AV1 hardware decoding

Detailed client notes


YouTubeLocale

Attached to every InnerTube request context to control response language and regional content.
@Serializable
data class YouTubeLocale(
    val gl: String, // geolocation
    val hl: String, // host language
)
gl
String
required
ISO 3166-1 alpha-2 country code for geolocation (e.g., "US", "GB", "JP"). Controls region-specific charts, new releases, and content availability.
hl
String
required
BCP-47 language tag for the host language (e.g., "en", "en-US", "ja"). Controls the language of titles, labels, and UI strings returned by the API.

ContentHints

A lightweight description of a piece of content passed to ContentAwareFallbackStrategy to select the most appropriate client for playback. All fields default to null (unknown).
data class ContentHints(
    val isExplicit: Boolean? = null,
    val isKidsContent: Boolean? = null,
    val isLive: Boolean? = null,
    val isUploaded: Boolean? = null,
)
isExplicit
Boolean?
true when the content carries an explicit badge. Triggers the explicitClients list in the fallback strategy.
isKidsContent
Boolean?
true when the video is tagged “Made for Kids”. Triggers the kidsClients list. Has higher priority than isExplicit.
isLive
Boolean?
true for live-stream content. Triggers the liveClients list. Has higher priority than isKidsContent.
isUploaded
Boolean?
true when the content is a user-uploaded video rather than a YouTube Music catalogue track. Triggers the uploadedClients list. Has the highest priority of all hints.

ContentAwareFallbackStrategy

Selects an ordered list of YouTubeClient instances to try for playback based on ContentHints. The caller should attempt each client in order, moving to the next if the previous attempt returns a non-playable response.
class ContentAwareFallbackStrategy {
    fun resolveClients(hints: ContentHints): List<YouTubeClient>
}

resolveClients

fun resolveClients(hints: ContentHints): List<YouTubeClient>
Returns an ordered List<YouTubeClient> for the given content hints. Priority is evaluated top-down: isUploadedisLiveisKidsContentisExplicit → default.
ConditionClients returned (in order)
isUploaded == trueTVHTML5, WEB_REMIX, WEB_CREATOR
isLive == trueTVHTML5, WEB_REMIX, WEB_CREATOR, TVHTML5_SIMPLY
isKidsContent == trueTVHTML5, WEB_REMIX, TVHTML5_SIMPLY, WEB_CREATOR
isExplicit == trueVISIONOS, TVHTML5, WEB_REMIX
(default)VISIONOS, ANDROID_VR_1_65_10, ANDROID_VR_1_43_32, WEB_REMIX, TVHTML5, TVHTML5_SIMPLY
Usage example:
val strategy = ContentAwareFallbackStrategy()

// For a regular catalogue track
val clients = strategy.resolveClients(ContentHints())
// → [VISIONOS, ANDROID_VR_1_65_10, ANDROID_VR_1_43_32, WEB_REMIX, TVHTML5, TVHTML5_SIMPLY]

// For a user-uploaded track
val uploadClients = strategy.resolveClients(ContentHints(isUploaded = true))
// → [TVHTML5, WEB_REMIX, WEB_CREATOR]

// For a live stream
val liveClients = strategy.resolveClients(ContentHints(isLive = true))
// → [TVHTML5, WEB_REMIX, WEB_CREATOR, TVHTML5_SIMPLY]

Build docs developers (and LLMs) love