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

YouTubeapi

About

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

Documentation

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

[中文]

⚠️ 推荐使用 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

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

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

Test this model in the Sandbase Playground with your own prompts.

Open in Playground

Related Models