YouTube API 数据接口
视频、评论、账号。
YouTube API(数据接口)可以搜视频,读视频详情、评论、账号资料和账号发布的视频,不用登录 YouTube 账号,也不用提供 Cookie。每次调用 2 积分(约 $0.004–$0.0067),失败不扣。YouTube 的内容不带作者粉丝数,这个字段返回 null。可以直接发 HTTP 请求,也可以通过 MCP 接到 AI 客户端里用。最近实测:2026-11-05。
最近实测:最近更新:
/v1/search200 OK2 积分platform: "youtube" · query: "meteor shower"nullcomments nullshares nullcollects nullviews 1,840textpublished_atauthor.verifiedauthor.followers+75 个动作。
外加 2 个 YouTube 独有的接口。
点开任意一行,看请求怎么写;完整的参数和返回字段在它自己的页面。
搜索按关键词找视频:正文、作者和播放或阅读数。/v1/search2 积分≈ $0.0067 · ¥0.05
platformquery另有 2 个选填参数type=user搜账号2 积分curl https://api.socialtoai.com/v1/search \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "query": "meteor shower" }'POST /v1/searchKey 放在 Authorization 请求头里详情用编号或链接取一条视频:正文、作者、点赞数、评论数、播放或阅读数和发布时间。/v1/detail2 积分≈ $0.0067 · ¥0.05
platformid 或 urlinclude=transcript视频的逐字稿2 积分curl https://api.socialtoai.com/v1/detail \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "dQw4w9WgXcQ" }'POST /v1/detailKey 放在 Authorization 请求头里评论一条视频下的评论:正文、点赞数和回复数。/v1/comments2 积分≈ $0.0067 · ¥0.05
platformid 或 url另有 1 个选填参数reply_of某条评论下的回复2 积分curl https://api.socialtoai.com/v1/comments \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "dQw4w9WgXcQ" }'POST /v1/commentsKey 放在 Authorization 请求头里账号资料一个账号:名称、简介、粉丝数和作品数。/v1/user_profile2 积分≈ $0.0067 · ¥0.05
curl https://api.socialtoai.com/v1/user_profile \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/user_profileKey 放在 Authorization 请求头里账号作品一个账号最近发布的视频。/v1/user_posts2 积分≈ $0.0067 · ¥0.05
platformid 或 username另有 2 个选填参数curl https://api.socialtoai.com/v1/user_posts \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/user_postsKey 放在 Authorization 请求头里YouTube 不提供:热榜。
和 TikTok 比,YouTube 的视频多给标题和图片,少给作者粉丝数、分享、收藏和话题标签;账号资料少给关注数。
频道帖子按频道编号或账号名取一页该 YouTube 频道“帖子”栏(原“社区”)里的帖子,从最新的开始。youtube.community_posts2 积分≈ $0.0067 · ¥0.05
按频道编号或账号名取一页该 YouTube 频道“帖子”栏(原“社区”)里的帖子,从最新的开始:正文、图片、点赞数、附带的视频。
id 或 usernamecurl https://api.socialtoai.com/v1/call/youtube.community_posts \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/call/youtube.community_postsKey 放在 Authorization 请求头里帖子详情按帖子编号或链接取一条 YouTube 频道帖子(原“社区”帖)。youtube.community_post2 积分≈ $0.0067 · ¥0.05
按帖子编号或链接取一条 YouTube 频道帖子(原“社区”帖):正文、频道、图片、点赞数、附带的视频。
id 或 urlcurl https://api.socialtoai.com/v1/call/youtube.community_post \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "id": "UgkxYEgmAc4YqqFhbP9FnxTlU0LxEi2TRKNT" }'POST /v1/call/youtube.community_postKey 放在 Authorization 请求头里办成一件事多少钱。
| 要做的事 | 怎么算 | 积分 | 约合 |
|---|---|---|---|
| 搜 1,000 条 YouTube 结果 | 每页通常 20 条,50 页 | 100 积分 | 约 ¥2.4($0.33) |
| 读 1,000 条 YouTube 评论 | 每页通常 20 条,50 页 | 100 积分 | 约 ¥2.4($0.33) |
| 回填一个 YouTube 账号:200 条视频列表加 20 条全文 | 7 页列表 + 20 次全文 | 54 积分 | 约 ¥1.3($0.18) |
| 每天盯 1 个 YouTube 账号,一个月最多 | 每次 10 积分 × 31 天 | 310 积分 | 约 ¥7.4($1.03) |
按 $10 档算,买得越多单价越低。监控只在你开启时运行,随时可以暂停,没有订阅。
也可以不管参数。
直接问。
通过 MCP 接一次 SocialToAI,之后该调哪些接口由 AI 决定,每一步花了多少积分你都看得到。
这周 YouTube 上,家用咖啡和抹茶哪个更火?
- search“home coffee”2 积分
- search“matcha”2 积分
读一下这条 YouTube 视频的评论,告诉我大家在抱怨什么。
- detail你贴的那条视频2 积分
- comments前 3 页6 积分
在 YouTube 上找 5 个发露营咖啡内容的账号,看看他们最近发了什么。
- search搜账号 · “camping coffee”2 积分
- user_posts5 个账号10 积分
每个平台,同一种结构。
学一次就够。
YouTube 的视频和小红书的笔记,返回的字段名一模一样。平台给不了的字段,返回 null。
{ "platform": "youtube", "id": "…", "ref": "…", "approx": [ { "field": "metrics.comments", "kind": "approximate" } ], "type": "content", "url": "https://example.com/…", "format": "video", "title": "…", "text": "…", "published_at": "2021-02-22T19:16:56.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": null }, "metrics": { "likes": 388123, "comments": 26000, "shares": null, "collects": null, "views": 17954533, "reposts": null }, "images": ["https://example.com/…"], "hashtags": null, "is_pinned": null}author.verifiedauthor.followersmetrics.sharesmetrics.collectsmetrics.repostshashtagsis_pinned{ "platform": "xiaohongshu", "id": "…", "ref": "…", "approx": [], "type": "content", "url": "https://example.com/…", "format": "image", "title": "…", "text": "…", "published_at": "2026-10-09T01:00:34.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": null }, "metrics": { "likes": 927, "comments": 122, "shares": 256, "collects": 59, "views": null, "reposts": null }, "images": ["https://example.com/…", "https://example.com/…"], "hashtags": ["…", "…"], "is_pinned": false}author.verifiedauthor.followersmetrics.viewsmetrics.reposts7 个工具能读 YouTube。
全部工具YouTube 有官方 API 吗?
YouTube 提供官方 YouTube Data API。开发者在 Google Cloud 项目中启用后,用 API Key 即可读取公开视频、频道、评论和搜索结果,有免费的每日配额;申请更多配额须通过合规审核。
来源:YouTube 官方开发者文档,核对于 2026-10-17。
| 谁能用 | 费用 | 限制 | 来源 | |
|---|---|---|---|---|
| YouTube Data API v3 | 有 Google Cloud 项目和 API Key 的开发者。 | 配额内免费:默认每天 100 次 search.list,其余接口合计 10,000 单位。 | 读一个列表通常 1 单位;要更多配额得填 Google 的配额扩展申请表。 | developers.google.com,核对于 2026-10-29 |
| 字幕下载(captions.download) | 对视频有编辑权限、已登录授权的用户。 | 每次 200 配额单位。 | 只能下载自己能编辑的视频的字幕,任意公开视频不行。 | developers.google.com,核对于 2026-10-29 |
| SocialToAI | 有 Key 就能用,不用你的 YouTube 账号,也不用审核。 | 每次 2 积分起(约 $0.0067),失败不扣。 | 只读公开可见的内容;一次调用最多 100 条。 | 价格 |
在这里读 1,000 条视频:约 50 次 youtube.search 调用(每页通常 20 条),共 100 积分,按第一档约 $0.33。 算一下要多少钱
- YouTube 字幕接口按链接取任意公开视频的完整字幕。
- 各平台评论接口对比哪些平台能取评论、每页多少条、多少积分。
- 各平台字幕接口对比哪些平台能取字幕、带不带时间。
- 视频评论分析:让 AI 读完评论,带上原话评论在说什么,带原话:用工具还是让 AI 读,各平台价格,一次录制
- 批量查几百条链接的互动数据一次查几百条链接的数字:各平台价格、赠送积分能跑多少、什么时候会停
- 每天盯竞品账号:发了什么,哪条比平时好每天盯竞品账号:新发了什么、哪条比平时好,每个账号 9 积分起
- 每天盯品牌口碑:新讨论和背后的原帖每天盯品牌口碑:态度占比和背后的原帖,每次 16 积分起
- YouTube MCP 服务器让你的 AI 直接读 YouTube。