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.014286JSON

指南:Best YouTube API in 2026: Pricing Compared

問題

常見問題

我要如何使用 YouTube Shorts Search API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/youtube/search-shorts。您也可以直接在本頁的 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 金鑰嗎?

不需要。YouTube Shorts Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 YouTube API 存取權。