YouTube-Web-V2-API

获取频道短视频列表/Get channel shorts

Changed on

[中文]

用途:

  • 获取YouTube频道的短视频(Shorts)列表
  • 支持分页获取更多短视频

参数:

  • channel_id: 频道ID(推荐,如 UCuAXFkgsw1L7xaCfnd5JJOw)
  • channel_url: 频道URL(可选,如果提供channel_id则忽略)
  • continuation_token: 分页token(可选,用于获取下一页)
  • need_format: 是否格式化数据(默认 true)
    • true: 返回格式化的结构化数据(推荐)
    • false: 返回原始的 YouTube API 结构(用于调试)

返回数据包含:

当 need_format=true 时:

  • channel_id: 频道ID
  • shorts: 短视频列表
    • video_id: 短视频的ID
    • title: 标题
    • view_count_text: 观看次数文本(如 "1.2M views")
    • thumbnails: 缩略图列表
    • accessibility_text: 无障碍文本描述
    • video_url: 短视频链接
  • continuation_token: 下一页的分页token
  • has_more: 是否还有更多短视频
  • total_count: 当前页短视频数量

当 need_format=false 时:

  • channel_id: 频道ID
  • shorts: 原始的 reelItemRenderer 对象列表
  • continuation_token: 下一页的分页token
  • has_more: 是否还有更多短视频
  • total_count: 当前页短视频数量

使用流程:

  1. 首次请求:只传 channel_id 参数
  2. 获取响应中的 continuation_token
  3. 下次请求:传入 channel_id 和 continuation_token
  4. 重复步骤 2-3 直到 has_more 为 false

注意事项:

  • 每页通常返回 30 个左右的短视频
  • ⚠️ 目前暂不支持 @username 格式,请使用频道ID(UCxxxx 格式)

价格:

  • $0.001 USD / 请求

[English]

Purpose:

  • Get YouTube channel's Shorts (short videos) list
  • Supports pagination to get more shorts

Parameters:

  • channel_id: Channel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
  • channel_url: Channel URL (optional, ignored if channel_id is provided)
  • continuation_token: Pagination token (optional, for next page)
  • need_format: Whether to format data (default true)
    • true: Return formatted structured data (recommended)
    • false: Return raw YouTube API structure (for debugging)

Returns:

When need_format=true:

  • channel_id: Channel ID
  • shorts: Shorts list
    • video_id: Short video ID
    • title: Title
    • view_count_text: View count text (e.g., "1.2M views")
    • thumbnails: Thumbnail list
    • accessibility_text: Accessibility description text
    • video_url: Short video URL
  • continuation_token: Next page pagination token
  • has_more: Whether there are more shorts
  • total_count: Current page shorts count

When need_format=false:

  • channel_id: Channel ID
  • shorts: Raw reelItemRenderer object list
  • continuation_token: Next page pagination token
  • has_more: Whether there are more shorts
  • total_count: Current page shorts count

Usage Flow:

  1. First request: Only pass channel_id parameter
  2. Get continuation_token from response
  3. Next request: Pass channel_id and continuation_token
  4. Repeat steps 2-3 until has_more is false

Notes:

  • Each page typically returns around 30 shorts
  • ⚠️ Currently does not support @username format, please use channel ID (UCxxxx format)

Price:

  • $0.001 USD / request

[示例/Example]

获取短视频列表: channel_id = "UCuAXFkgsw1L7xaCfnd5JJOw"

get/api/v1/youtube/web_v2/get_channel_shorts

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

channel_idstring

频道ID/Channel ID (e.g., UCuAXFkgsw1L7xaCfnd5JJOw)

channel_urlstring

频道URL/Channel URL (如果提供channel_id则忽略/Ignored if channel_id is provided)

continuation_tokenstring

分页token/Pagination token

need_formatboolean

是否格式化数据/Whether to format data

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      the response's property default value changed from This request will be cached. You can access the cached result directly using the URL below valid for 24 hours. Accessing the cache will not incur additional charges. to This response is cached and accessible via the URL below for 24 hours at no extra cost. The cache is for request tracing only — it doesn't affect the API's data freshness and won't be returned through the API again. for the status

    • info

      the response's property default value changed from 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 to 本次响应已缓存,可通过下方 URL 直接查看,有效期 24 小时,访问缓存链接无额外费用。缓存仅用于请求溯源,不影响接口数据的时效性,也不会再次通过接口返回。 for the status