Sand AISand AI MAGI-2ตอนนี้ MAGI-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.015USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
1 จำเป็น · 0 ไม่บังคับ

Playground

อินพุต
q
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

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 News SearchAPI นี้
Baidu
$0.015 ต่อการเรียกJSON
Baidu$0.03 ต่อการเรียกJSON
Baidu$0.03 ต่อการเรียกJSON
Baidu$0.01 ต่อการเรียกJSON
Baidu$0.03 ต่อการเรียกJSON
Baidu$0.03 ต่อการเรียกJSON

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Baidu News Search API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/baidu/news โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Baidu News Search API ราคาเท่าไร?

$0.015 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Baidu News Search API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: q (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Baidu News Search API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Baidu ไหม?

ไม่จำเป็น Baidu News Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Baidu API แยกต่างหาก