YouTube 搜索 Shorts API
按关键词搜索 YouTube Shorts,以标准化 JSON 返回匹配的 Shorts(标题、观看次数、URL),支持游标分页。
US$1.20/千次请求,按请求付费,无需订阅。
cat discovers the box is too small
6.7M views
{"id": "gQ4wWy0TnAr","url": "https://www.youtube.com/shorts/gQ4wWy0TnAr","title": "cat discovers the box is too small","views": 6720000,"viewsAvailable": true,"contentType": "short"}
价格
YouTube 搜索 Shorts API 价格
试一试
一个请求获取 YouTube 搜索 Shorts
这个示例展示了 11 个字段中的 10 个。查看全部字段
{
"found": true,
"data": {
"nextCursor": "CBgSC2NhdHMgc2hvcnRz",
"shorts": [
{
"id": "gQ4wWy0TnAr",
"url": "https://www.youtube.com/shorts/gQ4wWy0TnAr",
"title": "cat discovers the box is too small",
"views": 6720000,
"viewsAvailable": true,
"contentType": "short"
},
{
"id": "hR5xXz1UoBs",
"url": "https://www.youtube.com/shorts/hR5xXz1UoBs",
"title": "when the treat bag crinkles",
"views": 2140000,
"viewsAvailable": true,
"contentType": "short"
},
{
"id": "iS6yYa2VpCt",
"url": "https://www.youtube.com/shorts/iS6yYa2VpCt",
"title": "my cat judging my life choices",
"views": 0,
"viewsAvailable": false,
"contentType": "short"
}
]
}
}完整的参数与响应参考:这个接口的每个字段、类型和示例。
参考
一个请求,一种响应结构。
你发送的每个字段和收到的每个字段,都附有真实示例。
最近验证于 2026-11-14 · 可用率和延迟按 30d 统计
请求体
JSON,POST 到这个接口。
- querystring
cats
用于搜索 Shorts 的关键词。
- cursorstring
上一次响应返回的续传令牌,用于分页。
- sortByenum
relevance
排序方式:"relevance"(默认)或 "popular"(观看次数最多)。
- uploadDateenum
按上传时间筛选。省略则不限时间。
响应
JSON,每个字段一个示例值。
- nextCursorstring
CBgSC2NhdHMgc2hvcnRz
Opaque cursor for the next page of results, or null when there are no more. Pass it back as cursor to continue.
Populated whenever the provider has data for the entity.
- contentTypestring
short
Always "short": every row here comes from YouTube's Shorts shelf.
- idstring
gQ4wWy0TnAr
YouTube video id of the Short. Populated whenever the provider has data for the entity.
- titlestring
cat discovers the box is too small
Title of the Short. Populated whenever the provider has data for the entity.
- urlstring
https://www.youtube.com/shorts/gQ4wWy0TnAr
Watch URL for the Short. Populated whenever the provider has data for the entity.
- viewsinteger
6720000
View count, or 0 when the source did not publish one. Read viewsAvailable before trusting a 0. Rounded as YouTube shows it on Shorts (8.9M, 875K), so counts of 1,000 or more are approximate.
- viewsAvailableboolean
true
False when the source published no view count, so views is a placeholder rather than a measured zero.
- foundboolean
true
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
常见问题
关于 YouTube 搜索 Shorts API
AnyAPI 的 YouTube 搜索 Shorts API 只需一次 POST 请求 /v1/run/youtube.search_shorts,就以统一格式的 JSON 返回 YouTube 数据。按关键词搜索 YouTube Shorts,以标准化 JSON 返回匹配的 Shorts(标题、观看次数、URL),支持游标分页。无论哪个数据源提供服务,AnyAPI 都返回同一套统一的 schema。费用:每千次请求 US$1.20 起,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 YouTube 搜索 Shorts API 调用中有 100.0% 成功,响应时间中位数为 1.6 秒,共测量 10,705 次调用。