获取视频详情 V2/Get video information V2
About
获取视频详情 V2/Get video information V2
Documentation
获取视频详情 V2/Get video information V2
[中文]
用途:
- 获取 YouTube 视频详情(备用获取路径,字段提取更稳定)
- 适用场景: v1
/get_video_info返回 title/author 为空时 (年龄限制、未公开、部分音乐视频等)
参数详解:
📌 必选参数(二选一):
video_id (string)
- 作用: 视频ID
- 示例:
"dQw4w9WgXcQ"
video_url (string)
- 作用: 视频URL(如果提供 video_id 则忽略此参数)
- 示例:
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
⚙️ 可选参数:
need_format (bool, 可选)
- 作用: 是否返回清洗后的字段字典
- 默认值:
True True: 返回精简的字段字典(title / author / view_count 等)False: 返回完整原始数据
与 get_video_info 的区别:
- get_video_info: 字段更全(含 like_count_text / merchandise / endscreen / super_title / subscriber_count_text / is_verified 等),但部分场景下字段提取不稳定
- get_video_info_v2 (本接口): 核心字段更稳定,但 v1 独有的部分附加字段不再返回
返回字段(need_format=True):
video_id / title / author / channel_id / channel_url / publish_date /
description / length_seconds / view_count / rating / keywords /
thumbnail_url / playability_status / captions / chapters
[English]
Purpose:
- Fetch YouTube video details via an alternative extraction path (more stable field extraction)
- Use when v1
/get_video_inforeturns empty title/author (age-gated, unlisted, music videos, etc.)
Parameters:
📌 Required (one of):
video_id (string) - Video ID, e.g. "dQw4w9WgXcQ"
video_url (string) - Full video URL (ignored if video_id provided)
⚙️ Optional:
need_format (bool) - Whether to return cleaned payload. Default True
Difference from get_video_info:
- get_video_info: Richer field set (like_count_text / merchandise / endscreen / super_title / subscriber_count_text / is_verified, etc.), but less stable extraction in some scenarios
- get_video_info_v2 (this): More stable core fields, drops v1-only ancillary fields
[示例/Examples]
通过 video_id 获取 / Fetch by video_id
GET /youtube_web/get_video_info_v2?video_id=dQw4w9WgXcQ
通过 video_url 获取 / Fetch by video_url
GET /youtube_web/get_video_info_v2?video_url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
返回原始数据 / Return raw payload
GET /youtube_web/get_video_info_v2?video_id=dQw4w9WgXcQ&need_format=false
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.
Try 获取视频详情 V2/Get video information V2
Test this model in the Sandbase Playground with your own prompts.
Open in Playground