channel_idstring
Channel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
https://api.sandbase.ai/v1/api/youtube/web-v2/channel-shortsReturns 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.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | No | Channel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw) |
channel_url | string | No | Channel URL (optional, ignored if channel_id is provided) |
continuation_token | string | No | Pagination token (optional, for next page) |
need_format | boolean | No | Whether to format data (default true) |
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
}
| Field | Meaning |
|---|---|
shorts[].video_id | The ID of the Short. |
shorts[].video_url | Direct link to the Short on YouTube, in the form https://www.youtube.com/shorts/<video_id>. |
shorts[].title | Title of the Short, including any hashtags. |
shorts[].view_count_text | View 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[].height | Thumbnail image link and its pixel size. |
shorts[].accessibility_text | Screen reader label that combines the title, the view count text and play Short. |
total_count | Number of Shorts reported for the channel. |
has_more | true when more Shorts are available on a next page. |
continuation_token | Token to request the next page of Shorts. |
channel_id | ID of the channel the Shorts belong to. |
channel_id when you have it. The API ignores channel_url if channel_id is present.continuation_token from the response in your next request, along with the same channel. Stop when has_more is false.channel_id.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
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.
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.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
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",
"need_format": true
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
channel_idstringChannel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
channel_urlstringChannel URL (optional, ignored if channel_id is provided)
continuation_tokenstringPagination token (optional, for next page)
need_formatbooleanWhether to format data (default true)
Mặc định: true
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
YouTube Channel ShortsAPI này YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
YouTube | $0.001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/web-v2/channel-shorts với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.001 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.
Gửi channel_id hoặc channel_url để chọn một kênh. Ưu tiên channel_id khi đã biết; nếu được cung cấp, channel_url sẽ bị bỏ qua. Dùng need_format true cho tham chiếu đơn giản và bỏ continuation_token ở yêu cầu đầu tiên. Các trường riêng lẻ tùy chọn không có nghĩa là yêu cầu đầu tiên rỗng xác định được một kênh.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. YouTube Channel Shorts chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của YouTube.
Hãy chọn channel_id khi đã biết, hoặc dùng channel_url. Schema cho biết channel_url sẽ bị bỏ qua khi có channel_id. Dùng need_format true cho dạng đơn giản và ban đầu không gửi continuation token; một body rỗng không chọn được kênh nào.
Không. Tham chiếu của kênh dùng video_url và view_count_text, còn tìm kiếm dùng url và view_count. Hãy giữ nguyên route nguồn trong parser của bạn. Trang kênh không có ví dụ đầy đủ đã lưu; các giá trị rút gọn trong README không phải kết quả trực tiếp mới.
Không. Đó là số lượng được báo cáo, không phải bằng chứng rằng danh sách trả về chứa mọi Short hoặc bao gồm các mục riêng tư, đã bị xóa hay không khả dụng. Ghi lại danh sách quan sát được và danh tính kênh; trang sau cần token được trả về từ route này và kiểm tra has_more.