Yuanbao Search API compatible
Change the host, keep the code.
SpecStream answers the Tencent Yuanbao Search (元宝搜索) API's POST /SearchPro in Tencent's own JSON. A search of up to 10 results costs $0.001. Tencent Cloud lists 14, 20 and 26 yuan per 1,000 calls for its three editions.
The switch is one address: https://api.specstream.ai/wsa in place of https://api.wsa.cloud.tencent.com, with a SpecStream key as the Bearer token. Your code parses Response.Pages 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.
Yuanbao Search to SpecStream, parameter by parameter and field by field
| SpecStream | Tencent Yuanbao Search | |
|---|---|---|
| Search address | POST https://api.specstream.ai/wsa/SearchPro | POST https://api.wsa.cloud.tencent.com/SearchPro |
| The key | A SpecStream key as Authorization: Bearer | An API key from Tencent Cloud as Authorization: Bearer |
| `Cnt` | Any whole number from 1 to 50, 10 when you send none | 10, 20, 30, 40 or 50. The Lite edition (极速版) does not take it |
| `Site` | One site to search, or exclude: and up to five sites to leave out | One domain to search, or exclude: and up to five domains to leave out |
| `Freshness` | d1 to d30, m1 to m12, y1 to y5, one day, or two days with a comma between them | d[N] with N from 1 to 30, m[N] from 1 to 12, y[N] from 1 to 5, one day, or two days with a comma between them |
| `Industry` | news runs the news search. gov, acad and finance are accepted and search the web | gov, news, acad and finance. The Lite edition does not take it |
| The reply | Response.Pages, each page a JSON string with title, date, url, passage, content, site, score and favicon | Response.Pages, each page a JSON string. content and score are left out on the Lite edition |
| Price | $0.001 a search of up to 10 results. 50 results cost $0.0058 | 14 yuan per 1,000 calls on Lite, 20 on Standard and 26 on Flagship. More than 10 results need Standard or Flagship |
| Free to start | $10 of credit once, no card: 10,000 searches | 2,000 free calls a month for a limited time, in a Zhidongxi report of October 2026 |
The Yuanbao Search API reference, on SpecStream
The call, before and after
# Before
curl -X POST https://api.wsa.cloud.tencent.com/SearchPro \
-H "Authorization: Bearer $TENCENTCLOUD_WSA_APIKEY" -H "Content-Type: application/json" \
-d '{"Query": "Who founded Mistral AI and when?", "Cnt": 10, "Freshness": "y2"}'
# After
curl -X POST https://api.specstream.ai/wsa/SearchPro \
-H "Authorization: Bearer $SPECSTREAM_API_KEY" -H "Content-Type: application/json" \
-d '{"Query": "Who founded Mistral AI and when?", "Cnt": 10, "Freshness": "y2"}'The body and the parser stay. The base address changes to https://api.specstream.ai/wsa, and the key changes. Every parameter and field below is what the route answers on November 13, 2026.
A client that sets only the host
Code that keeps the host and the path apart needs one change too. Set the host to api.specstream.ai and leave the path as /SearchPro: the route answers at the root of the host as well as under /wsa.
from http.client import HTTPSConnection
import json, os
host = "api.specstream.ai" # was api.wsa.cloud.tencent.com
headers = {
"Authorization": "Bearer " + os.environ["SPECSTREAM_API_KEY"],
"Content-Type": "application/json; charset=utf-8",
}
req = HTTPSConnection(host)
req.request("POST", "/SearchPro", headers=headers, body=json.dumps({"Query": "Who founded Mistral AI and when?"}).encode("utf-8"))
print(req.getresponse().read().decode("utf-8"))Every parameter the route uses
Used in the search: Query (required), Cnt (1 to 50), Site (one site, or exclude: and up to five sites with | between them), Freshness and Industry set to news, which runs the news search.
Freshness counts as Tencent's does. d2 is today and yesterday, m2 is this calendar month and the one before, y2 is this year and the last. A single yyyy-mm-dd is that day, and yyyy-mm-dd,yyyy-mm-dd is every day from the first to the second.
Accepted without changing the search: Mode, Deeplinks, and the Industry values gov, acad and finance. Every reply holds public web pages. An Industry outside Tencent's four values, a Cnt above 50 or a Freshness in another form answers 400 with InvalidParameter.
Every field that comes back
The reply is Response with Pages, Query, Version and RequestId. Pages is a list of strings, each one a JSON object, as on Tencent: parse each string to read title, date, url, passage (the snippet), content, site, score, favicon, pics and images.
date is 2026-11-13 09:30:00 in UTC when the page gives a time, the day alone when it gives only a day, and an empty string for an undated page. score is a number between 0 and 1, highest for the first result, so a client that sorts by score keeps the order. Version is standard. favicon is an empty string, and pics and images are empty lists.
One field is added beside Response: specstream, with what the Search API returns beyond Tencent's fields, including the call's price_usd. A parser that reads Response never sees it.
Errors in Tencent's form
A refusal answers Response.Error with Tencent's Code and a Message, plus RequestId. A missing or wrong key is UnauthorizedOperation with HTTP 401. A bad parameter is InvalidParameter with 400. An empty balance is ResourceUnavailable with 402. A busy minute is RequestLimitExceeded with 429 and Retry-After. None of them is charged.
The HTTP status is kept on every refusal, so raise_for_status() and a check of Response.Error both catch it.
The key form, in place of the signed SDK call
Tencent Cloud's SDK signs each SearchPro call with a key pair and sends it to wsa.tencentcloudapi.com. That signed form has no route here. Move the call to the key form above, one POST with a Bearer token: the body's fields and the Response you parse are the same in both.
$1 per 1,000 searches, and one price for every parameter
A search of up to 10 results costs $0.001, with or without Site, Freshness and Industry. Each started block of 10 more results adds $0.0012: Cnt 20 costs $0.0022, Cnt 30 costs $0.0034 and Cnt 50 costs $0.0058. A call stopped by a 429 charges nothing.
Tencent Cloud's product page lists 14 yuan per 1,000 calls for the Lite edition, 20 for Standard and 26 for Flagship. Cnt, Industry, content and score are on Standard and Flagship. Here they are on every call.
The most accurate web search API
On SimpleQA Verified the SpecStream Search API scores 97.9 F-score on all 1,000 official questions, 978 of them correct. On WideSearch it scores 64.0 item F1 and 43.4 row F1 on all 200 official tasks. The Extract API scores 0.908 F1 on WCXB. Every score and its method is on the benchmarks page.
You decide what is kept, on each key
Create the key with zero_retention and a search made with it keeps no request text and no answer after the reply: it is not in the history, its answer is not reused for another call, and its log lines carry neither. spend_cap_cents is the most the key can spend.
curl -X POST https://api.specstream.ai/v1/account/keys \
-H "Authorization: Bearer $SPECSTREAM_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "production", "scopes": ["account:read", "finds:spend"], "spend_cap_cents": 500000, "zero_retention": true}'Search, pages and rows on one key
The same key reads up to 20 pages or documents a call with the Extract API at $0.80 per 1,000 pages, and a page with no text is not charged. Deep Search returns every match for a request in plain words as structured rows, at 5¢, 15¢ or $1 a row, with a source URL on every value. The most a run can cost is approved before it starts.
What else Yuanbao Search API users price
Exa
A search API on Exa's own index, at $7 per 1,000 requests on auto and $4 on lite for up to 10 results, with its own request and reply. SpecStream answers Exa's call as well, at https://api.specstream.ai/exa, for $0.001 a search.
Tavily
A search API sold in credits at $0.008 each pay as you go: a basic search takes 1 credit and an advanced search 2. SpecStream answers Tavily's POST /search at https://api.specstream.ai/tavily for $0.001 a basic search.
Brave Search API
A search API on Brave's own index at $5 per 1,000 requests and 50 queries per second. SpecStream answers Brave's call at https://api.specstream.ai/res/v1/web/search at $1 per 1,000, a fifth of Brave's rate.
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 base address to https://api.specstream.ai/wsa where your code has https://api.wsa.cloud.tencent.com, and send the SpecStream key as the Bearer token. In Python:
import json
import requests
BASE = "https://api.specstream.ai/wsa" # was https://api.wsa.cloud.tencent.com
reply = requests.post(
f"{BASE}/SearchPro",
headers={"Authorization": f"Bearer {SPECSTREAM_KEY}"},
json={"Query": "Who founded Mistral AI and when?", "Cnt": 10, "Freshness": "y2"},
timeout=30,
)
reply.raise_for_status()
for raw in reply.json()["Response"]["Pages"]:
page = json.loads(raw)
print(page["title"], page["url"], page["date"])3. In JavaScript:
const res = await fetch("https://api.specstream.ai/wsa/SearchPro", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SPECSTREAM_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ Query: "Who founded Mistral AI and when?", Cnt: 10 }),
});
const data = await res.json();
for (const raw of data.Response.Pages) {
const page = JSON.parse(raw);
console.log(page.title, page.url);
}4. Read 401 as a refused key, 402 as an empty balance and 429 as a call to send again after Retry-After. None of them 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 Tencent Yuanbao Search API compatible API?
POST /SearchPro at https://api.specstream.ai/wsa in Tencent's JSON, for $0.001 a search of up to 10 results.How do I migrate from the Yuanbao Search API?
https://api.specstream.ai/wsa in place of https://api.wsa.cloud.tencent.com, and a SpecStream key as the Bearer token. The body and the code that parses Response.Pages stay as they are.How much does the Yuanbao Search API cost?
Which SearchPro parameters work?
Query, Cnt from 1 to 50, Site, Freshness and Industry set to news. Mode, Deeplinks and the other Industry values are accepted and the reply holds public web pages.How many results can one call return?
Cnt takes any whole number from 1 to 50 and is 10 when you send none. 10 results cost $0.001, 20 cost $0.0022 and 50 cost $0.0058.Does the Tencent Cloud SDK work with SpecStream?
wsa.tencentcloudapi.com, and that form has no route here. The key form does: one POST to /SearchPro with a Bearer token, with the same body and the same Response.Do I need a Tencent Cloud account?
Sources
SpecStream wrote this page. Each Yuanbao Search fact comes from Tencent Cloud's product page, its API documents and the source of its Python SDK, the free allowance from a Zhidongxi report carried by ifeng and 36Kr, and each other provider's figure from that company's own page. The route's behavior is taken from its code, read on November 13, 2026.
- Tencent Cloud: Yuanbao Search product pagecloud.tencent.com/product/wsa, read Nov 13, 2026
- Tencent Cloud: the service API key formcloud.tencent.com/document/product/1806/130615, read Nov 13, 2026
- Tencent Cloud: SearchPro referencecloud.tencent.com/document/api/1806/121811, read Nov 13, 2026
- Tencent Cloud Python SDK: SearchPro modelsraw.githubusercontent.com/TencentCloud/tencentcloud-sdk-python/master/tencentcloud/wsa/v20250508/models.py, read Nov 13, 2026
- Zhidongxi report on ifengtech.ifeng.com/c/8xPUO0IuX2L, read Nov 13, 2026
- Zhidongxi report on 36Kr, in Englisheu.36kr.com/en/p/4035586826785668, read Nov 13, 2026
- Exa pricingexa.ai/docs/admin/pricing.md, read Nov 13, 2026
- Tavily API creditsdocs.tavily.com/documentation/api-credits.md, read Nov 13, 2026
- Brave Search APIbrave.com/search/api/, read Nov 13, 2026
- SpecStream benchmarksspecstream.ai/benchmarks, read Nov 13, 2026
- SpecStream pricingspecstream.ai/pricing, read Nov 13, 2026
- SpecStream for agentsspecstream.ai/agents.md, read Nov 13, 2026




