videos-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVideos Search
视频搜索
Requires API Key: Get one at https://api.search.brave.comPlan: Included in the Search plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
需要API Key:可在 https://api.search.brave.com 获取套餐:包含在搜索套餐中,详情查看 https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Quick Start (cURL)
快速入门(cURL)
Basic Search
基础搜索
bash
curl -s "https://api.search.brave.com/res/v1/videos/search?q=python+tutorial" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"bash
curl -s "https://api.search.brave.com/res/v1/videos/search?q=python+tutorial" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"With Parameters
带参数搜索
bash
curl -s "https://api.search.brave.com/res/v1/videos/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=machine learning explained" \
--data-urlencode "country=US" \
--data-urlencode "search_lang=en" \
--data-urlencode "count=20" \
--data-urlencode "freshness=pm"bash
curl -s "https://api.search.brave.com/res/v1/videos/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=machine learning explained" \
--data-urlencode "country=US" \
--data-urlencode "search_lang=en" \
--data-urlencode "count=20" \
--data-urlencode "freshness=pm"Endpoint
接口端点
http
GET https://api.search.brave.com/res/v1/videos/search
POST https://api.search.brave.com/res/v1/videos/searchAuthentication: header
X-Subscription-Token: <API_KEY>Note: Both GET and POST methods are supported. POST is useful for long queries.
http
GET https://api.search.brave.com/res/v1/videos/search
POST https://api.search.brave.com/res/v1/videos/search认证方式:通过 请求头传递
X-Subscription-Token: <API_KEY>注意:同时支持GET和POST方法,POST适用于长查询场景。
Parameters
参数
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Search query (1-400 chars, max 50 words) |
| string | No | | Search country (2-letter country code or |
| string | No | | Language preference (2+ char language code) |
| string | No | | UI language (e.g., "en-US") |
| int | No | | Number of results (1-50) |
| int | No | | Page offset (0-9) |
| string | No | | Adult content filter ( |
| string | No | - | Time filter ( |
| bool | No | | Auto-correct query |
| bool | No | | Apply search operators |
| bool | No | | Include |
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | - | 搜索查询词(1-400字符,最多50个单词) |
| string | 否 | | 搜索国家(2位国家代码或 |
| string | 否 | | 搜索语言偏好(2位及以上语言代码) |
| string | 否 | | UI语言(例如 "en-US") |
| int | 否 | | 返回结果数量(1-50) |
| int | 否 | | 分页偏移量(0-9) |
| string | 否 | | 成人内容过滤( |
| string | 否 | - | 时间过滤( |
| bool | 否 | | 查询词自动纠错 |
| bool | 否 | | 启用搜索运算符解析 |
| bool | 否 | | 返回结果中包含 |
Freshness Values
新鲜度可选值
| Value | Description |
|---|---|
| Past day (24 hours) |
| Past week (7 days) |
| Past month (31 days) |
| Past year (365 days) |
| Custom date range |
| 值 | 描述 |
|---|---|
| 过去1天(24小时) |
| 过去1周(7天) |
| 过去1个月(31天) |
| 过去1年(365天) |
| 自定义日期范围 |
Response Format
响应格式
json
{
"type": "videos",
"query": {
"original": "python tutorial",
"spellcheck_off": false
},
"extra": {
"might_be_offensive": false
},
"results": [
{
"type": "video_result",
"title": "Python Tutorial for Beginners",
"url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
"description": "Learn Python programming from scratch...",
"age": "February 12, 2025",
"page_age": "2025-02-12T00:00:00",
"page_fetched": "2025-02-12T15:00:00Z",
"thumbnail": {
"src": "https://imgs.search.brave.com/...",
"original": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg"
},
"video": {
"duration": "03:45:00",
"views": 1523000,
"creator": "freeCodeCamp",
"publisher": "YouTube",
"requires_subscription": false,
"tags": ["python", "programming"],
"author": {
"name": "freeCodeCamp.org",
"url": "https://www.youtube.com/@freecodecamp"
}
},
"meta_url": {
"scheme": "https",
"netloc": "youtube.com",
"hostname": "www.youtube.com",
"favicon": "https://imgs.search.brave.com/...",
"path": "\u203a watch"
}
}
]
}json
{
"type": "videos",
"query": {
"original": "python tutorial",
"spellcheck_off": false
},
"extra": {
"might_be_offensive": false
},
"results": [
{
"type": "video_result",
"title": "Python Tutorial for Beginners",
"url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
"description": "Learn Python programming from scratch...",
"age": "February 12, 2025",
"page_age": "2025-02-12T00:00:00",
"page_fetched": "2025-02-12T15:00:00Z",
"thumbnail": {
"src": "https://imgs.search.brave.com/...",
"original": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg"
},
"video": {
"duration": "03:45:00",
"views": 1523000,
"creator": "freeCodeCamp",
"publisher": "YouTube",
"requires_subscription": false,
"tags": ["python", "programming"],
"author": {
"name": "freeCodeCamp.org",
"url": "https://www.youtube.com/@freecodecamp"
}
},
"meta_url": {
"scheme": "https",
"netloc": "youtube.com",
"hostname": "www.youtube.com",
"favicon": "https://imgs.search.brave.com/...",
"path": "\u203a watch"
}
}
]
}Response Fields
响应字段
| Field | Type | Description |
|---|---|---|
| string | Always |
| string | The original search query |
| string? | Spellcheck-corrected query (if changed) |
| string? | Cleaned/normalized query |
| bool? | Whether spellcheck was disabled |
| bool? | True if strict safesearch blocked adult results |
| object? | Applied search operators ( |
| bool | Whether results may contain offensive content |
| string | Always |
| string | Source URL of the video |
| string | Video title |
| string? | Video description |
| string? | Human-readable age (e.g. "6 months ago") or absolute date (e.g. "February 12, 2025") |
| string? | Page age from source (ISO datetime) |
| string? | ISO datetime when page was last fetched (e.g. |
| int? | Fetch timestamp (only with |
| string? | Time string (variable format) |
| int? | View count as integer |
| string? | Channel/creator name |
| string? | Platform (YouTube, Vimeo, etc.) |
| bool? | Whether video requires a subscription |
| list[str]? | Tags relevant to the video |
| object? | Author profile |
| string | Author name |
| string | Author profile URL |
| string? | Extended author name |
| string? | Author profile image URL |
| string | Served thumbnail URL |
| string? | Original thumbnail URL |
| string? | URL protocol scheme |
| string? | Network location |
| string? | Lowercased domain name |
| string? | Favicon URL |
| string? | URL path |
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| string | 原始搜索查询词 |
| string? | 拼写纠错后的查询词(如有修改) |
| string? | 清理/标准化后的查询词 |
| bool? | 拼写检查是否已禁用 |
| bool? | 严格安全搜索拦截了成人结果时返回true |
| object? | 已应用的搜索运算符( |
| bool | 结果是否可能包含冒犯性内容 |
| string | 固定为 |
| string | 视频源URL |
| string | 视频标题 |
| string? | 视频描述 |
| string? | 人类可读的发布时间(例如 "6 months ago")或绝对日期(例如 "February 12, 2025") |
| string? | 来源页的发布时间(ISO格式 datetime) |
| string? | 页面最后抓取的ISO时间(例如 |
| int? | 抓取时间戳(仅当 |
| string? | 时长字符串(格式不固定) |
| int? | 整数类型的播放量 |
| string? | 频道/创作者名称 |
| string? | 发布平台(YouTube、Vimeo等) |
| bool? | 视频是否需要订阅才能观看 |
| list[str]? | 视频关联的标签 |
| object? | 作者主页信息 |
| string | 作者名称 |
| string | 作者主页URL |
| string? | 作者全称 |
| string? | 作者头像URL |
| string | 服务返回的缩略图URL |
| string? | 原始缩略图URL |
| string? | URL协议 |
| string? | 网络位置 |
| string? | 小写域名 |
| string? | Favicon URL |
| string? | URL路径 |
Search Operators
搜索运算符
Use search operators to refine results:
- - Limit to specific site
site:youtube.com - - Match exact phrase
"exact phrase" - - Exclude term
-exclude
Set to disable operator parsing.
operators=false使用搜索运算符可优化搜索结果:
- - 限定搜索指定站点
site:youtube.com - - 精确匹配短语
"exact phrase" - - 排除指定关键词
-exclude
设置可禁用运算符解析。
operators=falseUse Cases
适用场景
- Video content research: Find tutorials, explainers, and reviews by topic. Use the ,
video.duration, andvideo.viewsmetadata to filter and rank results programmatically. Prefer videos-search over web-search when you need a dedicated video index with richer metadata (duration, views, creator, tags) and up to 50 results per request.video.creator - Fresh video monitoring: Use or
freshness=pdto track newly published video content on trending topics or specific subjects.freshness=pw - Platform-specific search: Use or
site:youtube.comoperators to target specific video platforms.site:vimeo.com - Video metadata extraction: Get view counts, durations, creator info, and tags for analytics, content curation, or recommendation systems.
- 视频内容调研:按主题查找教程、讲解视频、评测内容。可通过、
video.duration、video.views元数据编程筛选和排序结果。当你需要带有更丰富元数据(时长、播放量、创作者、标签)的专属视频索引,且单请求最多支持返回50条结果时,优先使用视频搜索而非网页搜索。video.creator - 最新视频监测:使用或
freshness=pd追踪热门话题或特定主题下新发布的视频内容。freshness=pw - 指定平台搜索:使用或
site:youtube.com运算符定向搜索特定视频平台。site:vimeo.com - 视频元数据提取:获取播放量、时长、创作者信息、标签用于数据分析、内容策划或推荐系统。
Notes
注意事项
- Pagination: Use (0-9) with
offsetfor more resultscount - Max results: Up to 50 results per request
- 分页:结合(0-9)和
offset参数获取更多结果count - 最大返回结果数:单请求最多返回50条结果