Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

YouTube Shorts Search

API 文档
https://api.sandbase.ai/v1/api/youtube/search-shorts

Search YouTube Shorts by keyword and get matching Shorts (title, views, URL) with cursor pagination as normalized JSON.

价格
起价 $0.0012美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 3 个可选

Playground

输入
The keyword to search Shorts for.
Continuation token from a previous response for pagination.
Sort order: "relevance" (default) or "popular" (most-viewed).
Filter by upload recency. Omit for any time.
输出就绪

您的输出将显示在这里

完成输入,然后点击运行。

API README

YouTube Shorts Search API

Returns YouTube Shorts that match a keyword. Each result has an ID, title, URL and view count. You only need a query, and you can sort, filter by upload date and page through results.

Use cases

  • Find the most-viewed Shorts for a topic by setting sortBy to popular.
  • Track new Shorts about a brand or keyword by setting uploadDate to today or this_week.
  • Build a list of Short URLs and IDs to pass to a video details lookup.
  • Compare view counts across Shorts that cover the same topic.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-shorts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "cats"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesThe keyword to search Shorts for.
cursorstringNoContinuation token from a previous response for pagination.
sortBystringNoSort order: "relevance" (default) or "popular" (most-viewed).
uploadDatestringNoFilter by upload recency. Omit for any time.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "nextCursor": "cur_fPTLy4Ok3x74uh2aBTeYXQ",
    "shorts": [
      {
        "contentType": "short",
        "id": "M93h41hyPsM",
        "title": "Ranking Funny Cat Moment",
        "url": "https://www.youtube.com/watch?v=M93h41hyPsM",
        "views": 17000000,
        "viewsAvailable": true
      }
    ]
  },
  "found": true
}

Response fields

FieldMeaning
data.shorts[]List of Shorts that match the query.
data.shorts[].idYouTube video ID of the Short.
data.shorts[].titleTitle of the Short. It can include hashtags and emoji.
data.shorts[].urlWatch URL for the Short, in the form https://www.youtube.com/watch?v=<id>.
data.shorts[].viewsView count as a number.
data.shorts[].viewsAvailabletrue when a view count was found for the Short. Check it before you use views.
data.shorts[].contentTypeType of the result. The value is short for these results.
data.nextCursorToken for the next page of results. Send it as cursor in the next request.
foundtrue when the search returned results.

Notes

  • For the next page, repeat the same request and add cursor with the value of data.nextCursor.
  • Use the id value with YouTube Video Details to get more data about a single Short.
  • To list the Shorts of one channel instead of searching by keyword, use YouTube Channel Shorts.

Pricing

Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.

探索更多

相关 APIs

全部 APIs
API价格响应
YouTube每次调用从 $0.0012 起JSON
YouTube每次调用从 $0.00045 起JSON
YouTube每次调用从 $0.0012 起JSON
YouTube每次调用从 $0.0012 起JSON
YouTube每次调用从 $0.0012 起JSON
YouTube$0.014286 每次调用JSON

指南:Best YouTube API in 2026: Pricing Compared

问题

常见问题

如何使用 YouTube Shorts Search API?

向 https://api.sandbase.ai/v1/api/youtube/search-shorts 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

YouTube Shorts Search API 的价格是多少?

起价每次调用 $0.0012,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

YouTube Shorts Search API 接受哪些参数?

必填:query (string)。 可选:cursor (string), sortBy(relevance, popular 之一) 和 uploadDate(today, this_week, this_month, this_year 之一)。 Parameters 表和本页的 Playground 列出了每个字段。

YouTube Shorts Search API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 YouTube 开发者账户或 API key 吗?

不需要。YouTube Shorts Search 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 YouTube API 访问权限。