Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

YouTube Channel Shorts

API 文件
https://api.sandbase.ai/v1/api/youtube/web-v2/channel-shorts

Returns a list of YouTube Shorts from a specified channel. Supports lookups by channel identifier or URL, optional response formatting, and pagination tokens for next-page results.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
0 個必填 · 4 個選填
每天 100 次免費呼叫每天前 100 次呼叫免費(按組織共用)· 於 UTC 00:00 重設。之後按次收費。

Playground

輸入
Channel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
Channel URL (optional, ignored if channel_id is provided)
Pagination token (optional, for next page)
Whether to format data (default true)
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

YouTube Channel Shorts API

Returns a page of YouTube Shorts for one channel, with each Short's title, video ID, URL, thumbnail and view count text. It needs a channel_id or a channel_url.

Use cases

  • Read a returned Shorts page for one selected creator; retain observation time before comparing later snapshots.
  • Build a feed of a channel's Shorts with titles, thumbnails and links.
  • Compare the view counts shown on Shorts across several channels.
  • Read the reported total_count alongside the observed page; it does not establish a complete channel archive.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/channel-shorts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw", "channel_url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"}'

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

Parameters

NameTypeRequiredDescription
channel_idstringNoChannel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
channel_urlstringNoChannel URL (optional, ignored if channel_id is provided)
continuation_tokenstringNoPagination token (optional, for next page)
need_formatbooleanNoWhether to format data (default true)

Example response

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

{
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "continuation_token": "4qmFsgK5…",
  "has_more": true,
  "shorts": [
    {
      "accessibility_text": "This version of Never Gonna Give You Up still gets to us 😭 #nevergonnagiveyouup,…",
      "thumbnails": [
        {
          "height": 1920,
          "url": "https://i.ytimg.com/vi/TIRgIY2nwOk/frame0.jpg",
          "width": 1080
        }
      ],
      "title": "This version of Never Gonna Give You Up still gets to us 😭 #nevergonnagiveyouup",
      "video_id": "TIRgIY2nwOk",
      "video_url": "https://www.youtube.com/shorts/TIRgIY2nwOk",
      "view_count_text": "4.9 thousand views"
    }
  ],
  "total_count": 48
}

Response fields

FieldMeaning
shorts[].video_idThe ID of the Short.
shorts[].video_urlDirect link to the Short on YouTube, in the form https://www.youtube.com/shorts/<video_id>.
shorts[].titleTitle of the Short, including any hashtags.
shorts[].view_count_textView count as display text, for example 4.9 thousand views. It is a rounded string, not a number.
shorts[].thumbnails[].url / shorts[].thumbnails[].width / shorts[].thumbnails[].heightThumbnail image link and its pixel size.
shorts[].accessibility_textScreen reader label that combines the title, the view count text and play Short.
total_countNumber of Shorts reported for the channel.
has_moretrue when more Shorts are available on a next page.
continuation_tokenToken to request the next page of Shorts.
channel_idID of the channel the Shorts belong to.

Notes

  • Send channel_id when you have it. The API ignores channel_url if channel_id is present.
  • To get the next page, send the continuation_token from the response in your next request, along with the same channel. Stop when has_more is false.
  • If you only have a channel URL, use YouTube Channel ID from URL to get the channel_id.
  • For regular uploads instead of Shorts, call YouTube Channel Videos.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Read Shorts from one selected channel

Send channel_id when known, or channel_url when it is the identifier you have. The contract says channel_url is ignored when channel_id is present, so choose one instead of supplying two conflicting identities. Use need_format true and omit continuation_token for the first request. The schema marks both identifier fields optional but the described task still needs a channel selector.

The simplified README describes shorts with video_id, video_url, title and view_count_text. Search uses url and view_count instead; do not reuse its parser blindly. The selected page has no saved full example. Its shortened README shows one Short, total_count 48, has_more true and a truncated token. Those are reference values, not a newly queried channel total or proof that one item is the whole returned page.

Keep the requested channel and returned channel_id with each video ID. Preserve view_count_text and retrieval time; rounded strings such as 4.9 thousand views remain approximate after conversion. An accessibility label combines presentation text and is not a second independent count. A reported total_count does not prove you downloaded that many Shorts or that the sample includes private, removed or unavailable items.

For a separately selected later page, keep the same channel and use this route's complete returned continuation_token while checking has_more. No such continuation was tested for this revision. Do not reuse a Shorts Search token, infer a cursor from total_count, download thumbnails or open every video's comments. One channel page cannot establish a platform-wide trend.

Need discovery beyond a known channel? Start a separate Shorts Search with a defined keyword and filters.

Give your agent one Shorts sample task

Choose one keyword or one known channel before running. A connected agent needs that input, the selected endpoint and the result you want. For a new project, share the setup Skill, Markdown quickstart and your task. Keep SANDBASE_API_KEY locally and use POST /v1/api/ with Bearer authentication. Review one response before starting more pages, enrichment or scheduled comparisons.

Check completed SandBase status and an object at outputs[0].data, then require a shorts list for the selected simplified reference. A present empty list is a valid observation; missing or malformed data is an error. Do not silently turn provider failure into an empty result or retry the same business request automatically. Search and channel responses use different field names, so keep the source route with each saved record.

Pricing checked on 2026-11-08: Shorts Search lists $0.002 per call and Channel Shorts $0.001 per call. Both show eligibility for 100 daily calls shared across eligible data APIs in the organization, resetting at 00:00 UTC. Eligibility does not measure remaining allowance. Check current pricing before execution. No new business call was made for this revision. The YouTube Shorts Python guide retains its dated October experiment separately from current reference checks.

探索更多

相關 APIs

所有 APIs
API價格回應
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON

指南:Best YouTube API in 2026: Pricing Compared

問題

常見問題

我要如何使用 YouTube Channel Shorts API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/youtube/web-v2/channel-shorts。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

YouTube Channel Shorts API 的費用是多少?

每次 $0.001。每個組織每個 UTC 日可免費呼叫 100 次,並可在包含此 API 在內的所有符合資格之 SandBase APIs 間共用;超過後,每次呼叫都會從您的 SandBase 餘額中以此價格計費。沒有訂閱方案。

YouTube Channel Shorts API 接受哪些參數?

請傳送 channel_id 或 channel_url 來選取一個頻道。已知時建議優先使用 channel_id;若同時提供,channel_url 會被忽略。簡化參考請使用 need_format true,第一次請求不要帶 continuation_token。個別欄位可選,不代表第一次空請求就能識別頻道。

YouTube Channel Shorts API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 YouTube 開發者帳號或 API 金鑰嗎?

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

我應該同時傳送 channel_id 和 channel_url 嗎?

已知時請選擇 channel_id,或使用 channel_url。Schema 說明當存在 channel_id 時,channel_url 會被忽略。若要使用簡化格式,請將 need_format 設為 true,並一開始省略 continuation token;空白 body 不會選到頻道。

Channel Shorts 與 Shorts Search 的回應欄位一樣嗎?

不一樣。頻道參照使用 video_url 和 view_count_text,而搜尋使用 url 和 view_count。請讓解析器沿用對應的來源路由。頻道頁面沒有保存完整範例;其截短的 README 值不是新的即時結果。

total_count 能證明我已取得該頻道完整的 Shorts 歷史嗎?

不能。這只是回報的數量,不能證明回傳清單包含每個 Short,或包含私人、已移除或無法取得的項目。請記錄觀察到的清單與頻道識別;後續頁面需要此路由回傳的 token 與 has_more 檢查。