YouTube
Overview
Video content platform. InnerTube JSON API on www.youtube.com.
Workflows
Search and watch a video
searchVideos(query) → video titles, thumbnails, videoIds
getVideoDetail(videoId) → title, description, recommendations
getComments(videoId) → comment threads with author, text, likes, replies
getVideoPlayer(videoId) → stream URLs, formats, captions
Browse a channel or playlist
browseContent(browseId: "FEwhat_to_watch") → homepage video grid with videoIds
browseContent(browseId: "UC...") → channel page with tabs, videos
getPlaylist(playlistId) → playlist title, owner, full video list
Get a video transcript
getVideoDetail(videoId) → find engagementPanels[].engagementPanelSectionListRenderer with panelIdentifier: "engagement-panel-searchable-transcript" → extract params token
getTranscript(params) → timestamped transcript lines
Subscribe / unsubscribe a channel
searchVideos(query) or browseContent(browseId) → channel result → channelId (UC...)
subscribeChannel(channelIds: [channelId ← searchVideos]) → confirmation
unsubscribeChannel(channelIds: [channelId]) → reverses subscription
You cannot subscribe to your own channel. YouTube returns HTTP 400 ("you may not subscribe to yourself"). Pick a non-owned channel for verification (e.g. MKBHD UCBJycsmduvYEL83R_U4JriQ).
Comment on a video
searchVideos(query) → videoId
addComment(videoId, text) → commentId
deleteComment(videoId, commentId) → removes the comment
Note: getTranscript requires a params token from getVideoDetail, not a direct videoId. The params token is session-bound; the endpoint may return FAILED_PRECONDITION without valid session context.
Operations
| Operation |
Intent |
Key Input |
Key Output |
Notes |
| searchVideos |
search by keyword |
query |
videoId, title, channelName, viewCount, duration, thumbnail |
entry point |
| browseContent |
browse feeds/channels |
browseId (FEwhat_to_watch, FEtrending, UC..., VL...) |
video grids, channel tabs, metadata |
see browseId patterns below |
| getVideoDetail |
video metadata + recommendations |
videoId ← searchVideos |
title, description, viewCount, likes, publishDate, recommendations |
|
| getComments |
video comments |
videoId ← searchVideos |
commentId, author, text, likeCount, replyCount, publishedTime |
adapter — two-step continuation |
| getPlaylist |
playlist details + videos |
playlistId ← searchVideos/browseContent |
title, owner, videoCount, videos with videoId, duration |
adapter — wraps /browse with VL prefix |
| getVideoPlayer |
player + stream info |
videoId ← searchVideos |
streamingData, formats, captions, playabilityStatus |
stream URLs restricted without auth |
| getGuide |
sidebar navigation |
— |
subscriptions, explore categories, library links |
|
| getTranscript |
video transcript |
params ← getVideoDetail engagement panel |
timestamped transcript lines |
not in openapi.yaml — see Known Issues |
| getNotificationCount |
unseen notifications |
— |
unseenCount |
requires sapisidhash auth |
| likeVideo |
like a video |
videoId ← searchVideos |
confirmation |
requires sapisidhash auth, SAFE (reversible) |
| unlikeVideo |
remove like |
videoId ← searchVideos |
confirmation |
requires sapisidhash auth |
| subscribeChannel |
subscribe to channel |
channelIds |
confirmation |
requires sapisidhash auth, SAFE (reversible) |
| unsubscribeChannel |
unsubscribe from channel |
channelIds |
confirmation |
requires sapisidhash auth, reverses subscribeChannel |
| addComment |
post comment on video |
videoId, text |
commentId, text, author |
adapter — requires sapisidhash auth, reversible via deleteComment |
| deleteComment |
delete own comment |
videoId, commentId ← addComment/getComments |
confirmation (deleted: true) |
adapter — requires sapisidhash auth, reverses addComment |
browseId Patterns
- Home feed:
FEwhat_to_watch
- Trending:
FEtrending
- Subscriptions:
FEsubscriptions
- Channel:
UC... (e.g. UCsBjURrPoezykLs9EqgamOA)
- Playlist:
VL + playlist ID (e.g. VLPLWKjhJtqVAbkArDMaJhn2XB080UlFNRCt)
Quick Start
# Search videos
openweb youtube exec searchVideos '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "query": "machine learning tutorial"}'
# Get video detail (title, description, comments, recommendations)
openweb youtube exec getVideoDetail '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "videoId": "dQw4w9WgXcQ"}'
# Get video player info (stream URLs, formats, captions)
openweb youtube exec getVideoPlayer '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "videoId": "dQw4w9WgXcQ"}'
# Browse homepage
openweb youtube exec browseContent '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "browseId": "FEwhat_to_watch"}'
# Get comments on a video (adapter — only needs videoId)
openweb youtube exec getComments '{"videoId": "dQw4w9WgXcQ"}'
# Get playlist details and videos (adapter — only needs playlistId)
openweb youtube exec getPlaylist '{"playlistId": "PLWKjhJtqVAbkArDMaJhn2XB080UlFNRCt"}'
# Unsubscribe from a channel (requires auth)
openweb youtube exec unsubscribeChannel '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "channelIds": ["UCsBjURrPoezykLs9EqgamOA"]}'
# Add a comment to a video (adapter — requires auth)
openweb youtube exec addComment '{"videoId": "dQw4w9WgXcQ", "text": "Great video!"}'
# Delete own comment (adapter — requires auth)
openweb youtube exec deleteComment '{"videoId": "dQw4w9WgXcQ", "commentId": "UgzB1_kM5yz1Nv0nHdR4AaABAg"}'
1---2name: youtube3description: YouTube4---5# YouTube67## Overview8Video content platform. InnerTube JSON API on `www.youtube.com`.910## Workflows1112### Search and watch a video131. `searchVideos(query)` → video titles, thumbnails, `videoId`s142. `getVideoDetail(videoId)` → title, description, recommendations153. `getComments(videoId)` → comment threads with author, text, likes, replies164. `getVideoPlayer(videoId)` → stream URLs, formats, captions1718### Browse a channel or playlist191. `browseContent(browseId: "FEwhat_to_watch")` → homepage video grid with `videoId`s202. `browseContent(browseId: "UC...")` → channel page with tabs, videos213. `getPlaylist(playlistId)` → playlist title, owner, full video list2223### Get a video transcript241. `getVideoDetail(videoId)` → find `engagementPanels[].engagementPanelSectionListRenderer` with `panelIdentifier: "engagement-panel-searchable-transcript"` → extract `params` token252. `getTranscript(params)` → timestamped transcript lines2627### Subscribe / unsubscribe a channel281. `searchVideos(query)` or `browseContent(browseId)` → channel result → `channelId` (`UC...`)292. `subscribeChannel(channelIds: [channelId ← searchVideos])` → confirmation303. `unsubscribeChannel(channelIds: [channelId])` → reverses subscription3132> **You cannot subscribe to your own channel.** YouTube returns HTTP 400 ("you may not subscribe to yourself"). Pick a non-owned channel for verification (e.g. MKBHD `UCBJycsmduvYEL83R_U4JriQ`).3334### Comment on a video351. `searchVideos(query)` → `videoId`362. `addComment(videoId, text)` → `commentId`373. `deleteComment(videoId, commentId)` → removes the comment3839> **Note:** `getTranscript` requires a `params` token from `getVideoDetail`, not a direct videoId. The params token is session-bound; the endpoint may return FAILED_PRECONDITION without valid session context.4041## Operations4243| Operation | Intent | Key Input | Key Output | Notes |44|-----------|--------|-----------|------------|-------|45| searchVideos | search by keyword | query | videoId, title, channelName, viewCount, duration, thumbnail | entry point |46| browseContent | browse feeds/channels | browseId (FEwhat_to_watch, FEtrending, UC..., VL...) | video grids, channel tabs, metadata | see browseId patterns below |47| getVideoDetail | video metadata + recommendations | videoId ← searchVideos | title, description, viewCount, likes, publishDate, recommendations | |48| getComments | video comments | videoId ← searchVideos | commentId, author, text, likeCount, replyCount, publishedTime | adapter — two-step continuation |49| getPlaylist | playlist details + videos | playlistId ← searchVideos/browseContent | title, owner, videoCount, videos with videoId, duration | adapter — wraps /browse with VL prefix |50| getVideoPlayer | player + stream info | videoId ← searchVideos | streamingData, formats, captions, playabilityStatus | stream URLs restricted without auth |51| getGuide | sidebar navigation | — | subscriptions, explore categories, library links | |52| getTranscript | video transcript | params ← getVideoDetail engagement panel | timestamped transcript lines | not in openapi.yaml — see Known Issues |53| getNotificationCount | unseen notifications | — | unseenCount | requires sapisidhash auth |54| likeVideo | like a video | videoId ← searchVideos | confirmation | requires sapisidhash auth, SAFE (reversible) |55| unlikeVideo | remove like | videoId ← searchVideos | confirmation | requires sapisidhash auth |56| subscribeChannel | subscribe to channel | channelIds | confirmation | requires sapisidhash auth, SAFE (reversible) |57| unsubscribeChannel | unsubscribe from channel | channelIds | confirmation | requires sapisidhash auth, reverses subscribeChannel |58| addComment | post comment on video | videoId, text | commentId, text, author | adapter — requires sapisidhash auth, reversible via deleteComment |59| deleteComment | delete own comment | videoId, commentId ← addComment/getComments | confirmation (deleted: true) | adapter — requires sapisidhash auth, reverses addComment |6061### browseId Patterns62- **Home feed:** `FEwhat_to_watch`63- **Trending:** `FEtrending`64- **Subscriptions:** `FEsubscriptions`65- **Channel:** `UC...` (e.g. `UCsBjURrPoezykLs9EqgamOA`)66- **Playlist:** `VL` + playlist ID (e.g. `VLPLWKjhJtqVAbkArDMaJhn2XB080UlFNRCt`)6768## Quick Start6970```bash71# Search videos72openweb youtube exec searchVideos '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "query": "machine learning tutorial"}'7374# Get video detail (title, description, comments, recommendations)75openweb youtube exec getVideoDetail '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "videoId": "dQw4w9WgXcQ"}'7677# Get video player info (stream URLs, formats, captions)78openweb youtube exec getVideoPlayer '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "videoId": "dQw4w9WgXcQ"}'7980# Browse homepage81openweb youtube exec browseContent '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "browseId": "FEwhat_to_watch"}'8283# Get comments on a video (adapter — only needs videoId)84openweb youtube exec getComments '{"videoId": "dQw4w9WgXcQ"}'8586# Get playlist details and videos (adapter — only needs playlistId)87openweb youtube exec getPlaylist '{"playlistId": "PLWKjhJtqVAbkArDMaJhn2XB080UlFNRCt"}'8889# Unsubscribe from a channel (requires auth)90openweb youtube exec unsubscribeChannel '{"key": "YOUR_YOUTUBE_API_KEY", "context": {"client": {"clientName": "WEB", "clientVersion": "2.20260325.08.00"}}, "channelIds": ["UCsBjURrPoezykLs9EqgamOA"]}'9192# Add a comment to a video (adapter — requires auth)93openweb youtube exec addComment '{"videoId": "dQw4w9WgXcQ", "text": "Great video!"}'9495# Delete own comment (adapter — requires auth)96openweb youtube exec deleteComment '{"videoId": "dQw4w9WgXcQ", "commentId": "UgzB1_kM5yz1Nv0nHdR4AaABAg"}'97```