获取视频详情 /Get video information
YouTubeapi
About
获取视频详情 /Get video information
Documentation
获取视频详情 /Get video information
[中文]
用途:
- 获取YouTube视频详情信息
- 返回原始完整数据(包含 playerResponse 和 initialData)
参数详解:
📌 必选参数:
video_id (string)
- 作用: 视频ID
- 获取方式: 从视频URL中提取,例如
https://www.youtube.com/watch?v=oaSNBz4qMQY,video_id 就是oaSNBz4qMQY - 示例:
"oaSNBz4qMQY"
⚙️ 可选参数:
language_code (string, 可选)
- 作用: 设置语言偏好
- 默认值:
"zh-CN" - 可用值:
"zh-CN","en-US","ja-JP","ko-KR"等
返回数据结构:
{
"playerResponse": {
"videoDetails": {},
"streamingData": {
"formats": [],
"adaptiveFormats": []
},
"microformat": {},
...
},
"initialData": {
"contents": {
"twoColumnWatchNextResults": {
"results": {
"results": {
"contents": [
{
"videoPrimaryInfoRenderer": {...},
"videoSecondaryInfoRenderer": {...}
}
]
}
}
}
},
...
}
}
主要字段说明:
playerResponse: YouTube 播放器响应数据videoDetails: 视频基本信息(可能为空,取决于YouTube的返回)streamingData: 视频流数据(包含 formats 和 adaptiveFormats,包含 googlevideo.com 的URL)microformat: 元数据信息
initialData: YouTube 页面初始化数据videoPrimaryInfoRenderer: 主要信息(标题、观看次数、点赞数等)videoSecondaryInfoRenderer: 次要信息(频道信息、描述等)
[English]
Purpose:
- Get YouTube video details
- Returns raw complete data (includes playerResponse and initialData)
Parameters:
📌 Required:
video_id (string)
- Purpose: Video ID
- How to get: Extract from video URL, e.g.,
https://www.youtube.com/watch?v=oaSNBz4qMQY, video_id isoaSNBz4qMQY - Example:
"oaSNBz4qMQY"
⚙️ Optional:
language_code (string, optional)
- Purpose: Set language preference
- Default:
"zh-CN" - Values:
"zh-CN","en-US","ja-JP","ko-KR", etc.
Response Structure:
{
"playerResponse": {
"videoDetails": {},
"streamingData": {
"formats": [],
"adaptiveFormats": []
},
"microformat": {},
...
},
"initialData": {
"contents": {
"twoColumnWatchNextResults": {
"results": {
"results": {
"contents": [
{
"videoPrimaryInfoRenderer": {...},
"videoSecondaryInfoRenderer": {...}
}
]
}
}
}
},
...
}
}
Key Fields:
playerResponse: YouTube player response datavideoDetails: Basic video info (may be empty depending on YouTube's response)streamingData: Video stream data (includes formats and adaptiveFormats with googlevideo.com URLs)microformat: Metadata information
initialData: YouTube page initialization datavideoPrimaryInfoRenderer: Primary info (title, view count, like count, etc.)videoSecondaryInfoRenderer: Secondary info (channel info, description, etc.)
[示例/Examples]
获取视频详情数据 / Get video details
GET /youtube_web/get_video_info?video_id=oaSNBz4qMQY
指定语言 / Specify language
GET /youtube_web/get_video_info?video_id=oaSNBz4qMQY&language_code=en-US
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.
Try 获取视频详情 /Get video information
Test this model in the Sandbase Playground with your own prompts.
Open in PlaygroundRelated Models
获取频道帖子列表/Get channel community postsYouTubeapi获取频道描述信息/Get channel descriptionYouTubeapi从频道URL获取频道ID /Get channel ID from URLYouTubeapi获取频道短视频列表/Get channel shortsYouTubeapi从频道ID获取频道URL/Get channel URL from channel IDYouTubeapi获取频道视频 /Get channel videosYouTubeapi综合搜索(原始数据,推荐使用V2)/General search (raw data, recommend V2)YouTubeapi综合搜索V2/General search V2YouTubeapi