# YouTube详情 API

YouTube详情接口（detail）：每次成功调用 0.2 credits，支持 HTTP 与 Remote MCP，输入、数据来源和计费规则清晰。

规范地址: https://socialtoai.com/zh/youtube-detail-api/

## 一次请求

成功或空结果每次 0.2 credits，失败不计费。

把 PASTE_PUBLIC 占位符换成受支持的公开标识。这是请求模板，不会自动执行。

```
curl --request POST 'https://api.socialtoai.com/v1/detail' \
  --header "X-API-Key: $SOCIALTOAI_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: REPLACE_WITH_A_UNIQUE_REQUEST_ID' \
  --data '{"platform":"youtube","url_or_id":"PASTE_PUBLIC_ITEM_URL_OR_ID"}'
```

## 原生支持

结果类型：item。翻页：不支持。

以上取值来自参考卡。用户查找或特定内容类型可能还有额外限制。请以响应里的 applied_params 和 warnings 为准，不要假定不支持的筛选已生效。

## 经过结构校验的示例

示意结果，只含一条虚构数据和示例试用余额，用来展示响应结构，不是实时结果，也不代表线上可用率。

```
{
  "request_id": "example_only_not_a_live_call",
  "schema_version": "v1",
  "fetched_at": "2026-09-05T00:00:00Z",
  "status": "ok",
  "applied_params": {},
  "warnings": [],
  "items": [
    {
      "kind": "item",
      "id": "EXAMPLE_ITEM_ID",
      "author": {
        "name": "example_author"
      },
      "published_at": "2026-09-01T08:30:00Z",
      "metrics": {
        "likes": 412,
        "comments": 96
      },
      "title": "Illustrative post title",
      "text": "Illustrative excerpt, not real content."
    }
  ],
  "platform": "youtube",
  "billing": {
    "cost": 0.2,
    "balance": 1.8,
    "unit": "credits",
    "pricing": "standard"
  }
}
```

## 平台限制

内容搜索返回视频，用户搜索返回频道，不含播放列表和电影。用户查找支持 relevance/all；不支持的内容筛选会产生 warning。

作品请使用 11 位视频 ID 或标准 watch、shorts、youtu.be 链接。频道资料和作品需要 UC 开头的频道 ID 或 /channel/ 链接，不支持 @handle。

查看回复需要同时提供 reply_of 和该评论分支返回的 cursor。

热榜目前仅支持 Gaming 分类，不声明其他分类可用。

count 只裁剪投影后的结果。加密 cursor 会保留剩余条目，相邻重复条目会被省略并附带 warning。

[YouTube全部接口 →](https://socialtoai.com/zh/platforms/youtube/)
