Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Baidu News Search

API 文件
https://api.sandbase.ai/v1/api/baidu/news

Baidu News results for a keyword: headline, source, date, snippet and link.

價格
$0.015美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 0 個選填

Playground

輸入
q
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Baidu News Search API

This API returns Baidu News search results for a keyword. Each result has a headline, source name, relative date, snippet, link and thumbnail. It needs one input, q, the search keyword.

Use cases

  • Track how Chinese media cover a brand or product by searching its name.
  • Collect recent headlines and article links on a topic for a news digest.
  • Find related queries to expand a keyword list for media monitoring.
  • Check which outlets publish stories about a subject by reading the source field.

Request

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

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

Parameters

NameTypeRequiredDescription
qstringYesq

Example response

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

{
  "organic_results": [
    {
      "date": "8天前",
      "link": "https://baijiahao.baidu.com/s?id=1880085169863886735&wfr=spider&for=pc",
      "position": 1,
      "snippet": "近日,《中国100咖啡指南(2026)》正式发布,贵阳4个咖啡品牌入选。其中,来自贵阳的咖啡品牌——Captain George 风味博物馆(上海太原路店)位列…",
      "source": "贵阳发布",
      "thumbnail": "https://t8.baidu.com/it/u=1035183366,940297393&fm=3035&app=3035&size=f242,162&n=…",
      "title": "全国百佳,贵阳占4席!"
    }
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.baidu.com/s?rtt=1&ie=utf-8&bsst=1&cl=2&wd=coffee&tn=news&x_bfe_rqs=0…",
    "other_pages": {
      "2": "https://www.baidu.com/s?rtt=1&ie=utf-8&bsst=1&cl=2&wd=coffee&tn=news&x_bfe_rqs=0…",
      "3": "https://www.baidu.com/s?rtt=1&ie=utf-8&bsst=1&cl=2&wd=coffee&tn=news&x_bfe_rqs=0…"
    }
  },
  "related_searches": [
    {
      "link": "https://www.baidu.com/s?rtt=1&ie=utf-8&bsst=1&cl=2&wd=luckincoffee&tn=news&x_bfe…",
      "query": "luckincoffee"
    }
  ],
  "search_information": {
    "total_results": 23
  },
  "top_searches": [
    {
      "link": "https://www.baidu.com/s?cl=2&wd=%E8%AE%A9%E6%AF%8D%E4%BA%B2%E6%B2%B3%E6%B0%B8%E7…",
      "position": 1,
      "text": "让母亲河永续惠泽子孙后代"
    }
  ]
}

Response fields

FieldMeaning
organic_results[].titleHeadline of the news article.
organic_results[].linkURL of the article.
organic_results[].snippetShort text excerpt from the article. Long text is cut with an ellipsis.
organic_results[].sourceName of the outlet that published the article.
organic_results[].datePublication time as shown on the page, in relative form such as 8天前 (8 days ago). It is not an absolute timestamp.
organic_results[].positionRank of the result in the list, starting at 1.
organic_results[].thumbnailURL of the article's thumbnail image.
pagination.current / pagination.next / pagination.other_pagesThe current page number, the link to the next page, and links to other pages keyed by page number.
related_searches[].query / related_searches[].linkA related search term and the Baidu link for it.
search_information.total_resultsTotal result count reported for the query.

Notes

  • Set q to any keyword. The example uses coffee, and Chinese keywords also fit the response, since results are in Chinese.
  • Page links in pagination.next and pagination.other_pages point to Baidu search pages. Page numbers appear as keys, such as 2 and 3.
  • date is relative text such as 6天前, so store the time you made the call if you need to work out the absolute date.
  • The response also has a top_searches list with position, text and link for each entry. It does not depend on your keyword in the sample.

Pricing

$0.015 per successful call. Failed calls are not charged.

探索更多

相關 APIs

所有 APIs
API價格回應
Baidu每次呼叫 $0.015JSON
Baidu每次呼叫 $0.03JSON
Baidu每次呼叫 $0.03JSON
Baidu每次呼叫 $0.01JSON
Baidu每次呼叫 $0.03JSON
Baidu每次呼叫 $0.03JSON

問題

常見問題

我要如何使用 Baidu News Search API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/baidu/news。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Baidu News Search API 的費用是多少?

每次 $0.015,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Baidu News Search API 接受哪些參數?

必要:q (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Baidu News Search API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Baidu 開發者帳號或 API 金鑰嗎?

不需要。Baidu News Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Baidu API 存取權。