GET /v1/youtube/web/search_video
搜索视频
stable · 2 credits / 次(成功才计)
搜索视频。;search_query: 搜索关键字。;language_code: 语言代码,默认为en。;order_by: 排序方式,默认为this_month,可选值为this_week, this_month, this_year, last_hour, today。;country_code: 国家代码,默认为us。;continuation_token: 用于继续获取搜索结果的令牌。默认为None。;搜索结果。
请求参数
| 参数 | 类型 | 位置 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
| order_by | string | query | 否 | 排序方式 | this_month |
| country_code | string | query | 否 | 国家代码 | us |
| search_query | string | query | 是 | 搜索关键字 | Minecraft |
| language_code | string | query | 否 | 语言代码 | en |
| continuation_token | string | query | 否 | 翻页令牌 | demo |
响应字段
字段字典待补 —— 右侧可执行区可直接看到真实结构。
错误码
| code | HTTP | 含义 | 是否计费 |
|---|---|---|---|
| 40001 | 400 | 参数缺失或格式错误 | 否 |
| 40102 | 401 | API Key 无效或已吊销 | 否 |
| 40201 | 402 | 余额不足,请充值 | 否 |
| 40402 | 404 | 目标资源不存在 | 否 |
| 42201 | 422 | 质量门槛未通过 | 否 |
| 42901 | 429 | 超出速率限制 | 否 |
| 50401 | 504 | 上游超时 | 否 |
| 50201 | 502 | 上游返回异常 | 否 |
计费
成功扣 2 credits;任何失败(含返回 200 但未过质量门槛)扣 0。