YouTube Unified API
v3Use this 技能 when an 代理 needs to call YouTube Data API v3, YouTube 分析 API v2, or YouTube 报告ing API v1 through the hosted proxy at mcp.imagine应用.co. Covers videos, channels, play列出s, comments, live 流ing, captions, 分析 报告s, and 报告ing jobs — all via a single X-API-KEY header (no YouTube OAuth flow required).
运行时依赖
安装命令
点击复制本土化适配说明
YouTube Unified API 安装说明: 安装命令:["openclaw skills install youtube-unified-api"]
技能文档
YouTube Unified API 技能 ⚠️ Authentication — 检查 First
Before making any API call, 验证 the user has provided an Mybrand指标 API-KEY.
If no key has been provided, say:
To use the YouTube API, I need your Mybrand指标 API-KEY. You can find this key in your Mybrand指标 仪表盘. Please 分享 it and I'll proceed with the 请求.
Once you have the key, pass it as:
X-API-KEY:
Do not ask the user for a YouTube API key or OAuth 令牌 — the proxy handles authentication internally.
Hosted Proxy Base URL https://mcp.imagine应用.co 路由 prefix /youtube_API Full example https://mcp.imagine应用.co/youtube_API/youtube/v3/videos How to Call the API (Step-by-Step) Step 1 — Find the right 端点
For most tasks, read references/端点s_summary.md first. It 列出s all 99 端点s grouped by domAIn (Videos, Channels, 分析, etc.) with their required and optional parameters inline. This is the fastest path — you can construct a 请求 from this file alone without touching the discovery 缓存.
Use references/youtube_端点_cata记录.json when you need the full parameter 模式 (types, enums, defaults) for a specific method.
Only fall back to references/discovery_缓存/.json if you need the full 请求/响应 body 模式s.
Step 2 — Construct the 请求 获取 端点s: all parameters go in the 查询 string POST / PUT 端点s: use params for 查询 params, 请求Body for the JSON body (the 请求_模式_ref field in the cata记录 tells you the body 模式 name) part parameter: only 请求 the parts you actually need (see Part Strategy below) Path parameters: substitute {id}, {channelId} etc. directly into the URL Step 3 — 发送 to the proxy curl -G "https://mcp.imagine应用.co/youtube_API/youtube/v3/videos" \ -H "X-API-KEY: USER_KEY" \ --data-urlencode "part=snippet,statistics" \ --data-urlencode "id=VIDEO_ID"
Step 4 — Handle pagination
If the 响应 contAIns nextPa获取oken, pass it back as pa获取oken on the next call to 获取 the next page. Use max结果s (max 50) to control page size.
Part Parameter Strategy
Only 请求 the part values you actually need — each 添加s quota cost:
part ContAIns id Resource ID only (cheapest) snippet Title, description, thumbnAIls, dates, tags statistics Views, likes, comment counts contentDetAIls Duration, definition, caption avAIlability 状态 隐私, 上传 状态, license localizations Translated titles / descriptions player Embedded player HTML 令牌 / LLM Efficiency Tips Read 端点s_summary.md once per task, not per API call — it contAIns everything needed to build most 请求s. Do not load openAPI_proxy.json unless you need OpenAPI-格式化ted 工具 模式s — it is large (242 KB) and the summary is faster to work from. Do not load discovery_缓存/.json unless you need full 请求 body 模式s — these files are very large. Batch related reads: if you need 信息 on two 端点s in the same domAIn, read the relevant section of the summary in one pass rather than two separate lookups. Infer part values from the user's 请求 rather than asking a clarification question — if the user wants "video titles and view counts", that maps directly to part=snippet,statistics. Quick 端点 索引 Task Method Proxy path 获取 video detAIls 获取 /youtube_API/youtube/v3/videos 搜索 videos/channels 获取 /youtube_API/youtube/v3/搜索 获取 channel 信息 获取 /youtube_API/youtube/v3/channels 列出 play列出s 获取 /youtube_API/youtube/v3/play列出s 列出 play列出 items 获取 /youtube_API/youtube/v3/play列出Items 列出 comments 获取 /youtube_API/youtube/v3/commentThreads 获取 subscriptions 获取 /youtube_API/youtube/v3/subscriptions 列出 live broadcasts 获取 /youtube_API/youtube/v3/liveBroadcasts 上传 and publish video (simple multipart) POST /youtube_API/上传/youtube/v3/videos 上传 video (resumable) POST /youtube_API/resumable/上传/youtube/v3/videos 查询 分析 获取 /youtube_API/v2/报告s 列出 报告 types 获取 /youtube_API/v1/报告Types 创建 报告ing job POST /youtube_API/v1/jobs
For the full 列出 with parameters, see references/端点s_summary.md.
Artifacts File Purpose When to read references/端点s_summary.md All 端点s with params, grouped by domAIn Default — read this first references/youtube_端点_cata记录.json Full param 模式s (type, enum, required) When you need precise param detAIls references/openAPI_proxy.json OpenAPI 3.1 spec for 工具/function calling Only when building 工具 模式s references/discovery_缓存/*.json Raw Google discovery documents Only for 请求/响应 body 模式s Re生成 Artifacts
When Google 更新s a discovery document, refresh all artifacts:
python scripts/同步_discovery.py
环境 overrides:
YOUTUBE_PROXY_BASE_URL — override the hosted base URL YOUTUBE_PROXY_路由_PREFIX — override the 路由 prefix (default /youtube_API)