Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Brave News Search

Tài liệu API
https://api.sandbase.ai/v1/api/brave/news

News Search from Brave. Returns the official Brave API response unchanged.

Giá
$0.005USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 12 tùy chọn

Phòng thử nghiệm

Đầu vào
The user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
150
The number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results. Phạm vi: 1 đến 50.
The search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or ALL for worldwide.
A snippet is an excerpt from a page you get as a result of the query, and extra_snippets allow you to get up to 5 additional, alternative excerpts.
Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: pd - Pages aged 24 hours or less. pw - Pages aged 7 days or less. pm - Pages aged 31 days or less. p
Goggles act as a custom re-ranking on top of Brave’s search index. The parameter supports both a url where the Goggle is hosted or the definition of the Goggle. For more details, see the Goggles documentation . The parameter can be a single Goggle or a list of up to 3 Goggles.
Include fetch metadata.
09
The zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to paginate results use this parameter together with count. For example, if your u Phạm vi: 0 đến 9.
Whether to apply search operators.
Filters search results for adult content. The following values are supported: off - No filtering is done. moderate - Filter out explicit content. strict - Filter out explicit and suggestive content.
The search language preference. The 2 or more character language code for which the search results are provided.
Whether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
User interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 .
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Brave News Search API

Returns news search results from Brave for a text query. Each result has a title, URL, short description, source name, and age. The only required input is q, the search query.

Use cases

  • Track news coverage of a brand, product, or topic by running a query on a schedule.
  • Build a news feed for a city or subject using country, search_lang, and freshness filters.
  • Collect article titles, URLs, and snippets to feed a summarizer or research tool.
  • Check which publishers cover a topic by reading results[].profile.name and results[].meta_url.hostname.

Request

curl -X POST "https://api.sandbase.ai/v1/api/brave/news" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "best coffee in seattle"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
qstringYesThe user’s search query term. Query can not be empty. Maximum of 400 characters and 50 words in the query.
countintegerNoThe number of search results returned in response. The maximum is 50. The actual number delivered may be less than requested. Combine this parameter with offset to paginate search results.
countrystringNoThe search query country, where the results come from. The country string is limited to 2 character country codes of supported countries or ALL for worldwide.
extra_snippetsbooleanNoA snippet is an excerpt from a page you get as a result of the query, and extra_snippets allow you to get up to 5 additional, alternative excerpts.
freshnessstringNoFilters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. The following values are supported: pd - Pages aged 24 h
gogglesstringNoGoggles act as a custom re-ranking on top of Brave’s search index. The parameter supports both a url where the Goggle is hosted or the definition of the Goggle. For more details, see the Goggles documentation . The param
include_fetch_metadatabooleanNoInclude fetch metadata.
offsetintegerNoThe zero based offset that indicates number of search results per page (count) to skip before returning the result. The maximum is 9. The actual number delivered may be less than requested based on the query. In order to
operatorsbooleanNoWhether to apply search operators.
safesearchstringNoFilters search results for adult content. The following values are supported: off - No filtering is done. moderate - Filter out explicit content. strict - Filter out explicit and suggestive content.
search_langstringNoThe search language preference. The 2 or more character language code for which the search results are provided.
spellcheckbooleanNoWhether to spell check the provided query. If the spellchecker is enabled, the modified query is always used for search. The modified query can be found in altered key from the query response model.
ui_langstringNoUser interface language preferred in response. Usually of the format <language_code>-<country_code> . For more, see RFC 9110 .

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "query": {
    "original": "best coffee in seattle",
    "show_strict_warning": false,
    "spellcheck_off": false
  },
  "results": [
    {
      "age": "9 hours ago",
      "description": "Our favorite coffee spots in Seattle for sitting down and getting some work done…",
      "extra_snippets": [
        "All City Coffee is our favorite coffee shop in Georgetown for getting work done—…"
      ],
      "meta_url": {
        "favicon": "https://imgs.search.brave.com/3VTx1ykYSLM6wIkkWjezI6aUbxLh9fb82D4Ml5qPou4/rs:fit…",
        "hostname": "theinfatuation.com",
        "netloc": "theinfatuation.com",
        "path": "› seattle  › reviews  › all-city-coffee",
        "scheme": "https"
      },
      "page_age": "2026-11-02T22:39:38",
      "profile": {
        "name": "The Infatuation",
        "url": "https://theinfatuation.com/seattle/reviews/all-city-coffee"
      },
      "thumbnail": {
        "src": "https://imgs.search.brave.com/HCR-1mTmgRUuXT7KMPHvCK0NlhgVM3PVh4bWyvLmxYY/rs:fit…"
      },
      "title": "All City Coffee is the best spot to get work done in Georgetown - Review - Seatt…",
      "type": "news_result",
      "url": "https://theinfatuation.com/seattle/reviews/all-city-coffee"
    }
  ],
  "type": "news"
}

Response fields

FieldMeaning
results[].titleHeadline or page title of the news result.
results[].urlFull URL of the article.
results[].descriptionShort excerpt that describes the article.
results[].extra_snippets[]Additional excerpts from the same page. These appear in the response when the request sets extra_snippets to true.
results[].ageHuman-readable age of the result, such as 9 hours ago or February 17, 2026.
results[].page_agePage date as an ISO 8601 style timestamp, such as 2026-02-17T16:30:00.
results[].profile.name / results[].profile.urlName of the source publication and the URL tied to that source profile.
results[].meta_url.hostname / results[].meta_url.netlocDomain of the article. Use it to group or filter results by site.
results[].thumbnail.srcURL of a thumbnail image for the result.
query.originalThe query string as you sent it.

Notes

  • q is the only required parameter. It accepts up to 400 characters and 50 words.
  • To paginate, combine count (1 to 50, default 20) with offset (0 to 9). offset counts pages of count results.
  • Each item in results has type set to news_result. The top-level type is news.
  • For non-news results, call Brave Web Search. For pictures, call Brave Image Search.

Pricing

$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Brave$0.005 mỗi lần gọiJSON
Brave$0.01 mỗi lần gọiJSON
Brave$0.005 mỗi lần gọiJSON
Brave$0.005 mỗi lần gọiJSON
Brave$0.005 mỗi lần gọiJSON
Brave$0.005 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Brave News Search?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/brave/news với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Brave News Search có giá bao nhiêu?

$0.005 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Brave News Search chấp nhận những tham số nào?

Bắt buộc: q (string). Tùy chọn: count (integer), country (một trong số AR, AU, AT, BE, BR, CA, CL, DK, FI, FR, DE, GR, HK, IN, ID, IT, JP, KR, MY, MX, NL, NZ, NO, CN, PL, PT, PH, RU, SA, ZA, ES, SE, CH, TW, TR, GB, US, ALL), extra_snippets (boolean), freshness (string), goggles (string) và include_fetch_metadata (boolean) và 6 mục khác. Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Brave News Search trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Brave không?

Không. Brave News Search chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Brave.