获取频道视频 /Get channel videos
Changed on[中文]
用途:
- 获取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
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
频道ID/Channel ID
语言代码(如zh-CN, en-US等)/Language code
国家代码(如US, JP等)/Country code
分页token,用于获取下一页/Pagination token for next page
是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
the
response's property default value changed fromThis request will be cached. You can access the cached result directly using the URL belowvalid for 24 hours. Accessing the cache will not incur additional charges.toThis 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
- info