获取频道视频 /Get channel videos

YouTubeapi

About

获取频道视频 /Get channel videos

Documentation

获取频道视频 /Get channel videos

[中文]

用途:

  • 获取YouTube频道的视频列表
  • 支持分页获取,可通过 continuation_token 获取更多视频

参数详解:

📌 必选参数:

channel_id (string)

  • 作用: 频道ID
  • 获取方式:
    • 从频道URL中提取,例如 https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg
    • 或从 @用户名 格式的URL中,先访问频道页面获取真实的频道ID
  • 示例: "UCJHBJ7F-nAIlMGolm0Hu4vg"

⚙️ 可选参数:

language_code (string, 可选)

  • 作用: 设置语言偏好
  • 默认值: "zh-CN"
  • 可用值: "zh-CN", "en-US", "ja-JP", "ko-KR"

country_code (string, 可选)

  • 作用: 设置地区代码
  • 默认值: "US"
  • 可用值: "US", "JP", "GB"

continuation_token (string, 可选)

  • 作用: 分页token,用于获取下一页视频
  • 获取方式: 从上一次请求的响应中提取
  • 首次请求: 不传此参数或传 null

need_format (boolean, 可选)

  • 作用: 是否返回清洗后的精简数据
  • 默认值: true
  • 可用值:
    • false - 返回原始完整数据
    • true - 返回清洗后的精简数据(推荐,默认)

返回数据结构 (need_format=true):

{
  "channel": {
    "id": "UCJHBJ7F-nAIlMGolm0Hu4vg",
    "name": "Maizen",
    "description": "Thank you very much for watching our videos...",
    "handle_url": "http://www.youtube.com/@maizenofficial",
    "avatar": "https://yt3.googleusercontent.com/...=s900-...",
    "url": "https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg",
    "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=...",
    "keywords": "Minecraft",
    "is_family_safe": true,
    "is_verified": true
  },
  "videos": [
    {
      "video_id": "zd3yCa1bJCM",
      "title": "Minecraft: DREAM! - Asleep Custom Map",
      "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
      "thumbnails": [
        {"url": "...", "width": 168, "height": 94},
        {"url": "...", "width": 336, "height": 188}
      ],
      "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
      "duration": "16:57",
      "duration_accessibility": "16分钟57秒钟",
      "view_count": "343,369次观看",
      "short_view_count": "34万次观看",
      "published_time": "18小时前",
      "description": "",
      "is_live": false,
      "is_verified": true,
      "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
      "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
    }
  ],
  "continuation_token": "下一页token"
}

清洗后的字段说明:

channel (object, 频道级 metadata,整页 listing 共用):

⚠️ 仅首次请求(未传 continuation_token)返回此字段。分页请求的响应里 YouTube 不再下发频道级 metadata,此时返回里不包含 channel 字段,请缓存首页结果作为权威值。同理 videos[].is_verified 在分页响应里恒为 false(不可信)。

  • id: 频道ID(同请求参数 channel_id)
  • name: 频道名称
  • description: 频道简介(多行文本,常含联系方式 / 社媒链接 / 频道介绍)
  • handle_url: 频道 handle URL(如 http://www.youtube.com/@maizenofficial
  • avatar: 频道头像 URL(最大尺寸,最大 900×900)
  • url: 频道主页 URL
  • rss_url: 频道 RSS 订阅链接
  • keywords: 频道关键词
  • is_family_safe: 是否适合家庭观看
  • is_verified: 频道是否已通过 YouTube 蓝勾认证

videos[] (列表,每条视频):

  • video_id: 视频ID
  • title: 视频标题
  • thumbnail: 最高清晰度缩略图URL
  • thumbnails: 所有分辨率的缩略图列表
  • moving_thumbnail: 动态缩略图URL(webp格式,鼠标悬停预览)
  • duration: 视频时长(如"16:57")
  • duration_accessibility: 时长无障碍文本(如"16分钟57秒钟")
  • view_count: 完整观看次数(如"343,369次观看")
  • short_view_count: 简短观看次数(如"34万次观看"。注:lockup 格式下与 view_count 同值,仅保留以兼容旧调用方)
  • published_time: 发布时间(如"18小时前")
  • description: ⚠️ YouTube 自 2026 起的频道视频列表(lockup 格式)已不再下发视频描述片段,此字段恒为空字符串 "";如需频道整体简介请使用顶层 channel.description,单条视频描述请单独调用视频详情接口
  • is_live: 是否为直播
  • is_verified: 频道是否已认证(频道页下与顶层 channel.is_verified 同值)
  • url: 视频播放页URL
  • playback_url: 视频播放初始化URL(googlevideo.com)
  • continuation_token: 下一页的分页token

[English]

Purpose:

  • Get YouTube channel video list
  • Supports pagination via continuation_token

Parameters:

📌 Required:

channel_id (string)

  • Purpose: Channel ID
  • How to get:
    • Extract from channel URL, e.g., https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg
    • Or visit the channel page to get the real channel ID from @username format URLs
  • Example: "UCJHBJ7F-nAIlMGolm0Hu4vg"

⚙️ Optional:

language_code (string, optional)

  • Purpose: Set language preference
  • Default: "zh-CN"
  • Values: "zh-CN", "en-US", "ja-JP", "ko-KR", etc.

country_code (string, optional)

  • Purpose: Set region code
  • Default: "US"
  • Values: "US", "JP", "GB", etc.

continuation_token (string, optional)

  • Purpose: Pagination token for next page
  • How to get: Extract from previous response
  • First request: Omit or set to null

need_format (boolean, optional)

  • Purpose: Whether to return cleaned simplified data
  • Default: true
  • Values:
    • false - Return raw complete data
    • true - Return cleaned simplified data (recommended, default)

Response Structure (need_format=true):

{
  "channel": {
    "id": "UCJHBJ7F-nAIlMGolm0Hu4vg",
    "name": "Maizen",
    "description": "Thank you very much for watching our videos...",
    "handle_url": "http://www.youtube.com/@maizenofficial",
    "avatar": "https://yt3.googleusercontent.com/...=s900-...",
    "url": "https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg",
    "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=...",
    "keywords": "Minecraft",
    "is_family_safe": true,
    "is_verified": true
  },
  "videos": [
    {
      "video_id": "zd3yCa1bJCM",
      "title": "Minecraft: DREAM! - Asleep Custom Map",
      "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
      "thumbnails": [
        {"url": "...", "width": 168, "height": 94},
        {"url": "...", "width": 336, "height": 188}
      ],
      "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
      "duration": "16:57",
      "duration_accessibility": "16 minutes, 57 seconds",
      "view_count": "343,369 views",
      "short_view_count": "343K views",
      "published_time": "18 hours ago",
      "description": "",
      "is_live": false,
      "is_verified": true,
      "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
      "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
    }
  ],
  "continuation_token": "next page token"
}

Cleaned Data Field Descriptions:

channel (object, channel-level metadata, shared across the listing):

⚠️ Only returned on the first request (when continuation_token is not provided). Paginated responses do not include channel-level metadata from YouTube, so the channel field is omitted — cache the first-page value as the source of truth. Likewise, videos[].is_verified is always false on paginated responses (unreliable).

  • id: Channel ID (same as the channel_id query param)
  • name: Channel name
  • description: Channel bio (multi-line text, often contains contact info / social links / channel introduction)
  • handle_url: Channel handle URL (e.g., http://www.youtube.com/@maizenofficial)
  • avatar: Channel avatar URL (largest size, up to 900×900)
  • url: Channel home URL
  • rss_url: Channel RSS feed URL
  • keywords: Channel keywords
  • is_family_safe: Whether the channel is family-safe
  • is_verified: Whether the channel has a YouTube verified (blue check) badge

videos[] (list, per video):

  • video_id: Video ID
  • title: Video title
  • thumbnail: Highest resolution thumbnail URL
  • thumbnails: List of all resolution thumbnails
  • moving_thumbnail: Moving thumbnail URL (webp format, hover preview)
  • duration: Video duration (e.g., "16:57")
  • duration_accessibility: Duration accessibility text (e.g., "16 minutes, 57 seconds")
  • view_count: Full view count (e.g., "343,369 views")
  • short_view_count: Short view count (e.g., "343K views". Note: under the lockup format this is identical to view_count; kept only for backward compatibility)
  • published_time: Published time (e.g., "18 hours ago")
  • description: ⚠️ Since 2026, YouTube's channel video listings (lockup format) no longer include per-video description snippets. This field is always "". For the channel-wide bio use the top-level channel.description; for per-video descriptions call the video detail endpoint.
  • is_live: Whether it's a live stream
  • is_verified: Whether the channel is verified (same as top-level channel.is_verified in the channel-videos context)
  • url: Video playback page URL
  • playback_url: Video playback initialization URL (googlevideo.com)
  • continuation_token: Pagination token for next page

[示例/Examples]

获取频道首页视频 / Get first page of channel videos

GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg

获取清洗后的数据(推荐)/ Get cleaned data (recommended)

GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&need_format=true

获取下一页 / Get next page

GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&continuation_token=xxxxx&need_format=true

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

Try 获取频道视频 /Get channel videos

Test this model in the Sandbase Playground with your own prompts.

Open in Playground

Related Models