综合搜索(原始数据,推荐使用V2)/General search (raw data, recommend V2)
Changed on[中文]
⚠️ 推荐使用 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
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
搜索关键字/Search keyword
语言代码(如zh-CN, en-US等)/Language code
国家代码(如US, CN等)/Country code
时区(如America/Los_Angeles, Asia/Shanghai等)/Time zone
YouTube上传时间过滤 - API显示版本
上传时间过滤 | Upload time filter
YouTube视频时长过滤 - API显示版本
视频时长过滤 | Duration filter
YouTube内容类型过滤 - API显示版本
内容类型过滤 | Content type filter
YouTube特征过滤 - API显示版本
特征过滤 | Feature filter
YouTube搜索排序方式 - API显示版本
排序方式 | Sort by
翻页令牌/Pagination token
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