news-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNews 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获取套餐:包含在Search套餐中。详情请见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/news/search?q=space+exploration" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"bash
curl -s "https://api.search.brave.com/res/v1/news/search?q=space+exploration" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"Recent News (Past 24 Hours)
近期新闻(过去24小时)
bash
curl -s "https://api.search.brave.com/res/v1/news/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=cybersecurity" \
--data-urlencode "country=US" \
--data-urlencode "freshness=pd" \
--data-urlencode "count=20"bash
curl -s "https://api.search.brave.com/res/v1/news/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=cybersecurity" \
--data-urlencode "country=US" \
--data-urlencode "freshness=pd" \
--data-urlencode "count=20"Date Range Filter
日期范围筛选
bash
curl -s "https://api.search.brave.com/res/v1/news/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=climate summit" \
--data-urlencode "freshness=2026-01-01to2026-01-31"bash
curl -s "https://api.search.brave.com/res/v1/news/search" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=climate summit" \
--data-urlencode "freshness=2026-01-01to2026-01-31"Endpoint
接口地址
http
GET https://api.search.brave.com/res/v1/news/search
POST https://api.search.brave.com/res/v1/news/searchAuthentication: header
X-Subscription-Token: <API_KEY>Note: Both GET and POST are supported. POST is useful for long queries or complex Goggles.
http
GET https://api.search.brave.com/res/v1/news/search
POST https://api.search.brave.com/res/v1/news/search身份验证: 请求头
X-Subscription-Token: <API_KEY>注意:同时支持GET和POST方法。当查询内容较长或使用复杂Goggles规则时,推荐使用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 | - | Up to 5 additional excerpts per result |
| string or array | No | - | Custom ranking filter (URL or inline; repeat param for multiple) |
| bool | No | | Apply search operators |
| bool | No | | Include fetch timestamps in results |
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | - | 搜索查询词(1-400字符,最多50个单词) |
| string | 否 | | 搜索国家(两位国家代码或 |
| string | 否 | | 搜索内容语言偏好(两位及以上字符的语言代码) |
| string | 否 | | UI界面语言(例如:"en-US") |
| int | 否 | | 结果数量(1-50) |
| int | 否 | | 分页偏移量(0-9) |
| string | 否 | | 成人内容过滤( |
| string | 否 | - | 时间筛选( |
| bool | 否 | | 自动纠正查询词拼写 |
| bool | 否 | - | 每个结果最多返回5条额外摘要 |
| string 或 array | 否 | - | 自定义排序规则(URL或内联规则;可重复参数添加多个规则) |
| bool | 否 | | 是否启用搜索运算符 |
| bool | 否 | | 是否在结果中包含抓取时间戳 |
Freshness Values
时效性参数值
| Value | Description |
|---|---|
| Past day (24 hours) - ideal for breaking news |
| Past week (7 days) |
| Past month (31 days) |
| Past year (365 days) |
| Custom date range |
| 值 | 描述 |
|---|---|
| 过去24小时 - 适合突发新闻 |
| 过去7天 |
| 过去31天 |
| 过去365天 |
| 自定义日期范围 |
Response Format
响应格式
json
{
"type": "news",
"query": {
"original": "space exploration"
},
"results": [
{
"type": "news_result",
"title": "New Developments in Space Exploration",
"url": "https://news.example.com/space-exploration",
"description": "Recent missions have advanced our understanding of...",
"age": "2 hours ago",
"page_age": "2026-01-15T14:30:00",
"page_fetched": "2026-01-15T15:00:00Z",
"meta_url": {
"scheme": "https",
"netloc": "news.example.com",
"hostname": "news.example.com",
"favicon": "https://imgs.search.brave.com/favicon/news.example.com",
"path": "/space-exploration"
},
"thumbnail": {
"src": "https://imgs.search.brave.com/..."
}
}
]
}json
{
"type": "news",
"query": {
"original": "space exploration"
},
"results": [
{
"type": "news_result",
"title": "New Developments in Space Exploration",
"url": "https://news.example.com/space-exploration",
"description": "Recent missions have advanced our understanding of...",
"age": "2 hours ago",
"page_age": "2026-01-15T14:30:00",
"page_fetched": "2026-01-15T15:00:00Z",
"meta_url": {
"scheme": "https",
"netloc": "news.example.com",
"hostname": "news.example.com",
"favicon": "https://imgs.search.brave.com/favicon/news.example.com",
"path": "/space-exploration"
},
"thumbnail": {
"src": "https://imgs.search.brave.com/..."
}
}
]
}Response Fields
响应字段说明
| Field | Type | Description |
|---|---|---|
| string | Always |
| string | The original search query |
| string? | Spellcheck-corrected query (if changed) |
| string? | Cleaned/normalized query from spellchecker |
| bool? | Whether spellcheck was disabled |
| bool? | True if strict safesearch blocked results |
| object? | Applied search operators |
| bool | Whether operators were applied |
| string? | Query after operator processing |
| list[str]? | Domains from |
| string | Always |
| string | Article title |
| string | Source URL of the article |
| string? | Article description/summary |
| string? | Human-readable age (e.g. "2 hours ago") |
| string? | Publication date from source (ISO datetime) |
| string? | When page was last fetched (ISO datetime) |
| int? | Fetch timestamp (only with |
| string? | URL protocol scheme |
| string? | Network location |
| string? | Lowercased domain name |
| string? | Favicon URL |
| string? | URL path |
| string | Served thumbnail URL |
| string? | Original thumbnail URL |
| list[str]? | Up to 5 additional excerpts per result |
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 固定为 |
| string | 原始搜索查询词 |
| string? | 拼写纠正后的查询词(若有修改) |
| string? | 经过拼写检查清理/标准化后的查询词 |
| bool? | 是否禁用了拼写检查 |
| bool? | 若严格模式SafeSearch屏蔽了结果则为True |
| object? | 已应用的搜索运算符 |
| bool | 是否应用了运算符 |
| string? | 经过运算符处理后的查询词 |
| list[str]? | 来自 |
| string | 固定为 |
| string | 文章标题 |
| string | 文章来源URL |
| string? | 文章描述/摘要 |
| string? | 易读的发布时长(例如:"2 hours ago") |
| string? | 来源提供的发布日期(ISO格式时间) |
| string? | 页面最后一次被抓取的时间(ISO格式时间) |
| int? | 抓取时间戳(仅当 |
| string? | URL协议 |
| string? | 网络位置 |
| string? | 小写域名 |
| string? | 网站图标URL |
| string? | URL路径 |
| string | 提供的缩略图URL |
| string? | 原始缩略图URL |
| list[str]? | 每个结果最多5条额外摘要 |
Goggles (Custom Ranking) — Unique to Brave
Goggles(自定义排序)—— Brave专属功能
Goggles let you re-rank news results — boost trusted outlets or suppress unwanted sources.
| Method | Example |
|---|---|
| Hosted | |
| Inline | |
Hosted goggles must be on GitHub/GitLab, include,! name:,! description:headers, and be registered at https://search.brave.com/goggles/create. Inline rules need no registration.! author:
Syntax: / (1–10), , . Combine with commas: . Separate rules with ().
$boost=N$downrank=N$discard$site=example.com$site=example.com,boost=3\n%0AAllow list: — Block list:
$discard\n$site=docs.python.org\n$site=developer.mozilla.org$discard,site=pinterest.com\n$discard,site=quora.comGoggles允许你对新闻结果重新排序——优先展示可信来源或屏蔽不想要的来源。
| 方式 | 示例 |
|---|---|
| 托管式 | |
| 内联式 | |
托管式Goggles规则需托管在GitHub/GitLab,包含、! name:、! description:头部信息,并需在https://search.brave.com/goggles/create注册。**内联式**规则无需注册。! author:
语法: / (1–10)、、。可通过逗号组合规则:。使用(即)分隔多条规则。
$boost=N$downrank=N$discard$site=example.com$site=example.com,boost=3\n%0A白名单示例: —— 黑名单示例:
$discard\n$site=docs.python.org\n$site=developer.mozilla.org$discard,site=pinterest.com\n$discard,site=quora.comSearch Operators
搜索运算符
Use search operators to refine results:
- - Limit to specific news site
site:local-paper.com - - Match exact phrase
"exact phrase" - - Exclude term
-exclude
Set to disable operator parsing.
operators=false使用搜索运算符优化搜索结果:
- - 限定结果来自特定新闻网站
site:local-paper.com - - 匹配精确短语
"exact phrase" - - 排除指定词汇
-exclude
设置可禁用运算符解析。
operators=falseUse Cases
使用场景
- Breaking news monitoring: Use for the most recent articles on a topic.
freshness=pd - Custom news feeds with Goggles: Boost trusted sources and discard other sources — unique to Brave.
- Historical news research: Use to find articles from specific time periods.
freshness=YYYY-MM-DDtoYYYY-MM-DD - Multilingual news: Combine ,
country, andsearch_langfor cross-locale results.ui_lang - Data pipelines: Set for
include_fetch_metadata=trueon each result.fetched_content_timestamp
- 突发新闻监控:使用获取某一主题的最新文章。
freshness=pd - 自定义新闻流:通过Goggles优先展示可信来源并屏蔽其他来源——Brave专属功能。
- 历史新闻研究:使用查找特定时间段的文章。
freshness=YYYY-MM-DDtoYYYY-MM-DD - 多语言新闻获取:组合、
country和search_lang参数获取跨地区多语言结果。ui_lang - 数据管道集成:设置获取每条结果的
include_fetch_metadata=true字段。fetched_content_timestamp
Notes
注意事项
- SafeSearch: Defaults to
strict - Pagination: Use (0-9) with
offsetcount - Extra snippets: Up to 5 additional excerpts when
extra_snippets=true
- SafeSearch:默认值为
strict - 分页:结合(0-9)和
offset参数实现分页count - 额外摘要:当时,每个结果最多返回5条额外摘要
extra_snippets=true