---
title: "获取视频详情 V2/Get video information V2"
method: GET
path: "/api/v1/youtube/web_v2/get_video_info_v2"
tags: ["YouTube-Web-V2-API"]
---

# 获取视频详情 V2/Get video information V2

`GET /api/v1/youtube/web_v2/get_video_info_v2`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/youtube/web_v2/get_video_info_v2`
- Auth: HTTP bearer

# [中文]
### 用途:
- 获取 YouTube 视频详情（备用获取路径，字段提取更稳定）
- 适用场景: v1 `/get_video_info` 返回 title/author 为空时
  （年龄限制、未公开、部分音乐视频等）

### 下载与代理:
- **调用本详情接口无需自带代理**，也不接受 `proxy_url`；原始数据中即使有媒体 URL，
  也不保证可从不同公网出口下载。
- 下载请使用 get_video_streams_v3：首选固定出口或粘性会话的美国住宅代理，
  或固定公网出口的静态住宅/ISP 代理；数据中心代理不作为首选。
  美国并非强制地区，地区受限视频应选择允许访问的国家/地区并保持同一下载出口。

### 参数详解:

#### 📌 必选参数（二选一）:
**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` / `video_url` / `embed_url` / `title` / `description`
- 频道: `author` / `channel_name` / `channel_id` / `channel_handle` / `channel_url` /
  `channel_follower_count` / `channel_is_verified`
- 时间与状态: `publish_date` / `published_at` / `upload_date` / `length_seconds` /
  `duration_string` / `availability` / `live_status` / `age_limit`
- 互动与分类: `view_count` / `like_count` / `comment_count` / `rating` /
  `keywords` / `categories` / `language`
- 媒体辅助: `thumbnail_url` / `thumbnails` / `playability_status` / `captions` /
  `caption_count` / `chapters`

# [English]
### Purpose:
- Fetch YouTube video details via an alternative extraction path (more stable field extraction)
- Use when v1 `/get_video_info` returns empty title/author (age-gated, unlisted, music videos, etc.)

### Download and proxy:
- **No proxy is required from you to call this detail endpoint**, and it does
  not accept `proxy_url`. Media URLs in raw data, if any, are not guaranteed
  to download from a different public exit.
- For downloading, use get_video_streams_v3. Prefer a US residential proxy
  with a fixed exit or sticky session, or a static residential/ISP proxy with
  a fixed public exit; datacenter proxies are not the first choice. The US is
  not mandatory: choose a region where the video is available and keep the
  same actual exit for downloading.

### 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

### Return fields (`need_format=True`):
Video identity, channel details, publish and duration values, availability and live status,
engagement counts, categories, thumbnails, captions, and chapters.

# [示例/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

## Query parameters

- `video_id` string: 视频ID/Video ID
- `video_url` string: 视频URL/Video URL (如果提供 video_id 则忽略此参数)
- `need_format` boolean: 是否需要清洗数据，提取关键字段/Whether to return cleaned payload

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/youtube/web_v2/get_video_info_v2/get.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
