OpenAPI 文档/YouTubeGET

YouTube — 综合搜索

SpiderHubs OpenAPI 文档:YouTube — 综合搜索,分类 YouTube。接口 GET /openapi/v1/contentcreator/youtube/web_v2/get_general_search_v2。搜索视频、Shorts、频道和播放列表,返回已整理的结果。首次传 key...

OpId: yt-search · 最近更新: 2026-11-19

说明

搜索视频、Shorts、频道和播放列表,返回已整理的结果。首次传 keyword。下一页只传上次的 continuation_token。

基础信息

Endpoint:
GET /openapi/v1/contentcreator/youtube/web_v2/get_general_search_v2
计费:
1 积分 / 次
限流:
300 次 / 分钟 / 用户

请求参数说明

参数类型必填说明
keywordstring否关键词。首次请求必填,最长 200 字
continuation_tokenstring否翻页令牌
upload_datestring否last_hour / today / this_week / this_month / this_year
typestring否video / channel / playlist / movie
durationstring否short 短于 4 分钟,medium 4–20 分钟,long 长于 20 分钟
featuresstring否逗号分隔:live、4k、hd、subtitles、creative_commons、360、vr180、3d、hdr
sort_bystring否relevance / upload_date / view_count / rating

响应字段说明

字段类型说明
codeint业务状态码,200 表示成功
request_idstring本次请求唯一标识,排查问题时可提供
dataobject业务数据容器,具体字段见下
data.videosarray视频结果:标题、时长、播放量、作者、频道 ID、封面
data.shortsarrayShorts 结果
data.channelsarray频道结果
data.playlistsarray播放列表结果
data.continuation_tokenstring下一页令牌
请求示例 · cURL
curl 'https://api.spiderhubs.com/openapi/v1/contentcreator/youtube/web_v2/get_general_search_v2?keyword=python&type=video&sort_by=relevance' \
  -H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx'
响应示例
{
  "code": 200,
  "request_id": "e10a77c2-2d44-4a90-b618-33f9c0ab7712",
  "data": {
    "videos": [
      {
        "title": "Python tutorial",
        "video_id": "ZFEnfscZpAU",
        "url": "https://www.youtube.com/watch?v=ZFEnfscZpAU",
        "author": "Example channel"
      }
    ],
    "shorts": [],
    "channels": [],
    "playlists": [],
    "continuation_token": ""
  }
}

开始调用 SpiderHubs API

使用账户中心生成的 API Key,通过 Authorization: Bearer sk_live_xxx 调用接口。