---
title: "综合搜索（原始数据，推荐使用V2）/General search (raw data, recommend V2)"
method: GET
path: "/api/v1/youtube/web_v2/get_general_search"
tags: ["YouTube-Web-V2-API"]
---

# 综合搜索（原始数据，推荐使用V2）/General search (raw data, recommend V2)

`GET /api/v1/youtube/web_v2/get_general_search`

## 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_general_search`
- Auth: HTTP bearer

# [中文]
### ⚠️ 推荐使用 V2 版本:
- 本接口返回 YouTube 原始数据结构，需要自行解析
- **清洗过的数据版本请使用 `/get_general_search_v2` 接口**，返回结构化的视频、Shorts、频道、播放列表数据

### 用途:
- YouTube综合搜索，支持多种过滤条件，可以精确筛选搜索结果

### 参数详解:
- **search_query**: 搜索关键字
- **language_code**: 语言代码，推荐使用zh-CN（中文）或en-US（英文）
- **country_code**: 国家代码，影响搜索结果的地区相关性
- **time_zone**: 时区设置

### 过滤条件 (选择一个值即可):
#### 上传时间 (upload_time):
- `hour`: 过去1小时内上传
- `today`: 今天上传
- `week`: 本周上传
- `month`: 本月上传
- `year`: 今年上传

#### 视频时长 (duration):
- `short`: 短视频（少于4分钟）
- `medium`: 中等时长（4-20分钟）
- `long`: 长视频（超过20分钟）

#### 内容类型 (content_type):
- `video`: 视频
- `channel`: 频道
- `playlist`: 播放列表
- `movie`: 电影

#### 特征 (feature):
- `hd`: 高清视频
- `4k`: 4K视频
- `subtitles`: 包含字幕
- `live`: 直播
- `creative_commons`: 知识共享许可
- `360`: 360度视频
- `vr180`: VR180视频
- `3d`: 3D视频
- `hdr`: HDR视频
- `location`: 包含位置信息
- `purchased`: 已购买内容

#### 排序方式 (sort_by):
- `relevance`: 相关性（默认）
- `upload_date`: 上传日期
- `view_count`: 观看次数
- `rating`: 评分

### 返回:
- 包含过滤条件的搜索结果

# [English]
### Purpose:
- YouTube comprehensive search with multiple filter options for precise result filtering

### Parameters:
- **search_query**: Search keyword
- **language_code**: Language code (zh-CN for Chinese, en-US for English)
- **country_code**: Country code affecting regional relevance
- **time_zone**: Time zone setting

### Filter Options (select one value for each):
#### Upload Time (upload_time):
- `hour`: Uploaded in the past hour
- `today`: Uploaded today
- `week`: Uploaded this week
- `month`: Uploaded this month
- `year`: Uploaded this year

#### Duration (duration):
- `short`: Short videos (under 4 minutes)
- `medium`: Medium length (4-20 minutes)
- `long`: Long videos (over 20 minutes)

#### Content Type (content_type):
- `video`: Videos
- `channel`: Channels
- `playlist`: Playlists
- `movie`: Movies

#### Features (feature):
- `hd`: High definition
- `4k`: 4K videos
- `subtitles`: With subtitles
- `live`: Live streams
- `creative_commons`: Creative Commons licensed
- `360`: 360-degree videos
- `vr180`: VR180 videos
- `3d`: 3D videos
- `hdr`: HDR videos
- `location`: With location info
- `purchased`: Purchased content

#### Sort By (sort_by):
- `relevance`: Relevance (default)
- `upload_date`: Upload date
- `view_count`: View count
- `rating`: Rating

### ⚠️ Recommend using V2 version:
- This endpoint returns raw YouTube data structure that requires manual parsing
- **For cleaned/structured data, use `/get_general_search_v2` endpoint**, which returns structured videos, Shorts, channels, and playlists data

### Returns:
- Filtered search results

# [示例/Examples]
## 基础搜索
GET /youtube_web/get_general_search?search_query=Python编程

## 搜索本周上传的Python编程短视频
GET /youtube_web/get_general_search?search_query=Python编程&upload_time=week&duration=short

## 搜索高清的Python教程视频，按观看次数排序
GET /youtube_web/get_general_search?search_query=Python tutorial&feature=hd&sort_by=view_count

## 搜索今天上传的4K编程直播
GET /youtube_web/get_general_search?search_query=programming&upload_time=today&feature=4k&content_type=video

## Query parameters

- `search_query` string, required: 搜索关键字/Search keyword
- `language_code` string: 语言代码（如zh-CN, en-US等）/Language code
- `country_code` string: 国家代码（如US, CN等）/Country code
- `time_zone` string: 时区（如America/Los_Angeles, Asia/Shanghai等）/Time zone
- `upload_time` 'hour' | 'today' | 'week' | 'month' | 'year': YouTube上传时间过滤 - API显示版本
- `duration` 'short' | 'medium' | 'long': YouTube视频时长过滤 - API显示版本
- `content_type` 'video' | 'channel' | 'playlist' | 'movie': YouTube内容类型过滤 - API显示版本
- `feature` 'live' | '4k' | 'hd' | 'subtitles' | 'creative_commons' | '360' | 'vr180' | '3d' | 'hdr' | 'location' | 'purchased': YouTube特征过滤 - API显示版本
- `sort_by` 'relevance' | 'upload_date' | 'view_count' | 'rating': YouTube搜索排序方式 - API显示版本
- `continuation_token` string, nullable: 翻页令牌/Pagination token

## 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`: 2 info
  - the `cache_message` response's property default value changed from `This request will be cached. You can access the cached result directly using the URL below, valid for 24 hours. Accessing the cache will not incur additional charges.` to `This 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 `200`
  - the `cache_message_zh` response's property default value changed from `本次请求将被缓存，你可以使用下面的 URL 直接访问缓存结果，有效期为 24 小时，访问缓存不会产生额外费用。` to `本次响应已缓存，可通过下方 URL 直接查看，有效期 24 小时，访问缓存链接无额外费用。缓存仅用于请求溯源，不影响接口数据的时效性，也不会再次通过接口返回。` for the status `200`
- **2026-04-14** `ee5b7c9c88f5`: 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_general_search/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)
