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.001 每次调用JSON
YouTube$0.001 每次调用JSON
YouTube$0.001 每次调用JSON
YouTube$0.001 每次调用JSON
YouTube$0.001 每次调用JSON
YouTube$0.001 每次调用JSON

指南:Best YouTube API in 2026: Pricing Compared

问题

常见问题

如何使用 YouTube Channel Shorts API?

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

YouTube Channel Shorts API 的价格是多少?

每次调用 $0.001。每个组织在每个 UTC 日可获得 100 次免费调用,适用于包括此接口在内的所有符合条件的 SandBase APIs;超过后,每次调用将按此价格从您的 SandBase 余额中扣费。无需订阅。

YouTube Channel Shorts API 接受哪些参数?

发送 channel_id 或 channel_url 以选择一个频道。已知时优先使用 channel_id;如果提供了 channel_id,则 channel_url 会被忽略。简化参考请使用 need_format true,并在首次请求中省略 continuation_token。单个字段可选并不意味着空的首次请求就能识别频道。

YouTube Channel Shorts API 返回什么?

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

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

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

我应该同时发送 channel_id 和 channel_url 吗?

已知时请选择 channel_id,或使用 channel_url。schema 说明当存在 channel_id 时会忽略 channel_url。简化形状时请使用 need_format true,并且一开始省略 continuation token;空请求体不会选中频道。

Channel Shorts 和 Shorts Search 的响应字段完全相同吗?

不相同。频道引用使用 video_url 和 view_count_text,而搜索使用 url 和 view_count。请让解析器保持对应的来源路由。频道页没有保存完整示例;其缩短的 README 值并不是新的实时结果。

total_count 能证明我拿到了频道完整的 Shorts 历史吗?

不能。它只是报告的计数,并不能证明返回列表包含了每个 Short,或者包括私密、已移除或不可用项目。请记录观察到的列表和频道标识;后续页面需要使用该路由返回的 token 和 has_more 检查。