Skip to the page

Baidu AI Search (Qianfan) compatible

Change one address.

Baidu's search API on Qianfan lists ¥0.036 a call on its standard edition, with 3 QPS by default and 100,000 calls a day before you must contact Baidu. SpecStream answers the same POST /v2/ai_search/web_search in Baidu's own JSON for $1 per 1,000 searches.

The switch is one address: https://api.specstream.ai/qianfan in place of https://qianfan.baidubce.com, and a SpecStream key as the Bearer token. Your code reads references[] with title, url, content and date as before.

SpecStream scores 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. New accounts get $10 of credit, no card.

New accounts get $10 of credit, no card. It covers 10,000 searches.

Baidu AI Search on Qianfan to SpecStream, parameter by parameter and field by field

SpecStreamBaidu AI Search (Qianfan)
AddressPOST https://api.specstream.ai/qianfan/v2/ai_search/web_searchPOST https://qianfan.baidubce.com/v2/ai_search/web_search
The keyA SpecStream key as Authorization: Bearer, or in X-Appbuilder-AuthorizationA Baidu API key as Authorization: Bearer
Price$1 per 1,000 searches of up to 10 results, the same for every edition¥0.036 a call on the standard edition, ¥0.04 on the enhanced edition and ¥0.072 on the flagship edition for content inside China. IT Home reports a promotion from October 30, 2026 with a lowest price of 4.9 yuan per 1,000 calls
Prepaid packsCredit you buy never expires10,000 calls for 352 yuan, 100,000 for 3,420 yuan and 1,000,000 for 30,600 yuan, each valid for 1 year
LimitNo limit per key and no daily limit3 QPS by default, and 100,000 requests a day before you contact Baidu
Free use$10 of credit on a new account, no card: 10,000 searches, with no end date1,500 calls a month, given out at about 50 a day
`resource_type_filter`web with top_k 0 to 50, 20 when you send no filter. image with top_k up to 30 when the call asks for no web resultweb up to 50, video up to 10, image up to 30 and aladdin up to 5. Default: web 20
Site filtersearch_filter.match.site at no extra cost, and block_websites to leave sites outUp to 100 sites. Baidu's reference calls it a paid feature that is free for a limited time
The replyrequest_id and references[] with id, title, url, web_anchor, website, snippet, content, date, type, icon, image, video and rerank_scorerequest_id and references[]

The Baidu AI Search reference, on SpecStream

What else Baidu AI Search users price

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to migrate, step by step

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 10,000 searches.

2. Set the host to https://api.specstream.ai/qianfan where your code has https://qianfan.baidubce.com, and send the SpecStream key as the Bearer token. In Python:

import requests

BASE = "https://api.specstream.ai/qianfan"  # was https://qianfan.baidubce.com

reply = requests.post(
    f"{BASE}/v2/ai_search/web_search",
    headers={"Authorization": f"Bearer {SPECSTREAM_KEY}"},
    json={
        "messages": [{"role": "user", "content": "Who founded Mistral AI and when?"}],
        "resource_type_filter": [{"type": "web", "top_k": 10}],
        "search_recency_filter": "year",
    },
    timeout=30,
)
reply.raise_for_status()
for ref in reply.json()["references"]:
    print(ref["id"], ref["title"], ref["url"], ref["date"])

3. In JavaScript:

const res = await fetch("https://api.specstream.ai/qianfan/v2/ai_search/web_search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SPECSTREAM_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    messages: [{ role: "user", content: "Who founded Mistral AI and when?" }],
    resource_type_filter: [{ type: "web", top_k: 10 }],
  }),
});
const data = await res.json();
for (const ref of data.references) console.log(ref.title, ref.url);

4. Read 402 as an empty balance and 429 as a call to send again after Retry-After. Neither is charged.

5. When your product needs every match in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

Frequently asked questions

Something we didn't answer? Talk to a human

Is there a Baidu AI Search compatible API?
Yes. SpecStream answers Baidu Qianfan's POST /v2/ai_search/web_search at https://api.specstream.ai/qianfan/v2/ai_search/web_search in Baidu's JSON, for $0.001 a search of up to 10 results.
How much does the Baidu search API cost?
Baidu's billing page lists ¥0.036 a call on the standard edition, ¥0.04 on the enhanced edition and ¥0.072 on the flagship edition, with 1,500 free calls a month. IT Home reports a promotion from October 30, 2026 with a lowest price of 4.9 yuan per 1,000 calls. SpecStream costs $1 per 1,000 searches.
How do I migrate from qianfan.baidubce.com?
Change one host: https://api.specstream.ai/qianfan in place of https://qianfan.baidubce.com, and a SpecStream key as the Bearer token. The body and the code that reads references[] stay as they are, and a search of up to 10 results costs $0.001.
What is the Baidu search API rate limit?
3 QPS by default, and 100,000 requests a day before you contact Baidu, by its billing page. SpecStream has no limit per key and no daily limit, and answers 429 with Retry-After at no charge when search is busy.
Are the results from Baidu's index?
No. The route returns results from the SpecStream Search API in Baidu's format, so the fields and the parser stay and the ranking is SpecStream's. It scores 97.9 F-score on all 1,000 SimpleQA Verified questions.
Do video and Aladdin results work?
No. video and aladdin in resource_type_filter are accepted and answered with 0 results. Web results come back up to 50 a call, and image results up to 30 when the call asks for images alone.
How much does a call with no resource_type_filter cost?
$0.0022, because it returns 20 web results, Baidu's own default. Send top_k 10 and the call costs $0.001.

Sources

SpecStream wrote this page. Each Baidu fact comes from Baidu's own API reference and billing page, the promotion price from IT Home's report of October 30, 2026, and each other provider's figure from that company's own page. Each SpecStream line describes the route as it answers on November 13, 2026.

  1. Baidu Qianfan, Baidu Search API referencecloud.baidu.com/doc/qianfan-api/s/Wmbq4z7e5, read Nov 13, 2026
  2. Baidu Qianfan, Baidu Search billingcloud.baidu.com/doc/qianfan/s/1mh4sv6c4, read Nov 13, 2026
  3. IT Home, Baidu search API promotion priceithome.com/1/020/165.htm, read Nov 13, 2026
  4. Alibaba Cloud IQS, billing for Web Searchhelp.aliyun.com/en/document_detail/2862023.html, read Nov 13, 2026
  5. Tavily API creditsdocs.tavily.com/documentation/api-credits.md, read Nov 13, 2026
  6. Brave Search APIbrave.com/search/api/, read Nov 13, 2026
  7. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 13, 2026
  8. SpecStream pricingspecstream.ai/pricing, read Nov 13, 2026
  9. SpecStream for agentsspecstream.ai/agents.md, read Nov 13, 2026