Web Search (query → web result list)
Platform search capability: you send a query, and you get back a list of web search results (title, link, snippet, source, publish date) — a synchronous call, billed per request.
Search is not web-grounded Q&A: this endpoint only returns search result items and does not generate answer text. When you need "search + AI summary", pass the search results as context to a chat endpoint (
/v1/chat/completionsand others) and let the chat model compose the answer.
The platform exposes a unified search endpoint: requests and responses use the platform-unified web_search format, and the search_engine field selects the search tier — all tiers return the same format, so a downstream integration only needs to implement one protocol.
Endpoint:
https://token.yaoshu.cc/api/paas/v4/web_search. Search uses API Key authentication; a console login account, password, or login token cannot substitute for an API Key.
1. Endpoint and Engines
| Method | Path |
|---|---|
| POST | /api/paas/v4/web_search |
Allowed values of search_engine (unit prices differ per tier, see Billing at the end):
| Value | Description |
|---|---|
search_pro | Pro |
search_std | Standard |
search_pro_sogou | Pro · Sogou source |
search_pro_quark | Pro · Quark source |
exa-search | Standalone search source tier (consumes only search_query / count; other parameters have no effect; search_intent is always an empty array) |
Engine selection guidance: for Chinese-language news, choose
search_std/search_pro/search_pro_sogou; for international and English-language technical communities and academic retrieval, chooseexa-search. The availability of WeChat Official Account results depends on engine index coverage; engines that do not index that domain (e.g.search_pro_sogou) return an empty array when filtered by it.
2. Authentication
The platform accepts both authentication headers below (either one):
| Request header | Description |
|---|---|
Authorization: Bearer sk-your-api-key | General purpose |
x-api-key: sk-your-api-key | Aligned with the default convention of some SDKs |
3. Request
search_engine and search_query are both required:
curl https://token.yaoshu.cc/api/paas/v4/web_search \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"search_engine": "search_std",
"search_query": "2026 new energy vehicle sales ranking"
}'Specify the Pro tier:
curl https://token.yaoshu.cc/api/paas/v4/web_search \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"search_engine": "search_pro",
"search_query": "2026 new energy vehicle sales ranking",
"count": 5
}'| Parameter | Type | Required | Description |
|---|---|---|---|
search_query | string | ✅ | Search content; 70 characters or fewer is recommended |
search_engine | string | ✅ | Search engine (see the table above) |
search_intent | boolean | No | Whether to run search intent recognition; default false (search directly). When true, the intent is recognized first and the search runs only if a search intent is detected |
count | int | No | Number of results to return, default 10; search_std / search_pro accept 1~50, the Sogou source documents specify the values 10/20/30/40/50 and using those values is recommended. When the Sogou source specifies both search_domain_filter and search_recency_filter, count has no effect. The actual number returned may be fewer than requested; exa-search accepts 1~100, and an invalid value is treated as the default 10 |
search_domain_filter | string | No | Domain allowlist (e.g. www.example.com); only content from the specified sites is returned. Not supported by the Quark source or the exa-search tier |
search_recency_filter | string | No | Time range: oneDay / oneWeek / oneMonth / oneYear / noLimit (unlimited by default). Not supported by the exa-search tier |
content_size | string | No | Content tier: medium (default) / high (requests more context); full text, or content longer than medium, is not guaranteed; the Sogou source may return identical content. Not supported by the exa-search tier; support for this parameter on the Quark source must be confirmed separately |
request_id | string | No | Unique request identifier (6~64 characters; a UUID is recommended); generated by the platform when omitted |
user_id | string | No | End-user identifier (6~128 characters), used by the platform for abuse intervention |
Searching WeChat Official Accounts via the Sogou source
When you need to strictly restrict results to the Official Account domain, use search_domain_filter; merely including "WeChat Official Account" in the query or using site:mp.weixin.qq.com does not guarantee that results are limited to the WeChat domain.
curl https://token.yaoshu.cc/api/paas/v4/web_search \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"search_engine": "search_pro_sogou",
"search_query": "2026 artificial intelligence policy WeChat Official Account",
"search_intent": false,
"search_domain_filter": "mp.weixin.qq.com",
"count": 10,
"content_size": "medium"
}'This example illustrates the Official Account search parameters; the request body alone cannot prove what result coverage you get — the availability of Official Account results depends on the selected engine's index coverage (see the engine selection guidance above).
When the Sogou source sets both the domain filter and the time filter, omit count and do not rely on that combination to control the number of results. An empty result means this query returned no items; it is not sufficient proof that no related articles exist in that time range. high may return exactly the same content as medium; callers should send only the parameter values listed in this document, and must not use "an invalid value also returns 200" as evidence that a parameter took effect.
4. Response (unified format)
Top-level structure:
| Field | Description |
|---|---|
created / id / request_id | Request identity |
search_intent | Intent recognition result array; each item contains query (the original query), intent (intent type: SEARCH_ALL / SEARCH_NONE / SEARCH_ALWAYS), and keywords (the rewritten keywords). Except for the exa-search tier, where the array is always empty, all other tiers always return this array (regardless of whether the search_intent parameter is enabled) |
search_result[] | Search result items |
search_result item fields:
| Field | Description |
|---|---|
title | Title |
link | Result URL |
content | Snippet body |
media | Source site |
icon | Site icon |
publish_date | Publish date (usually yyyy-MM-dd; some sources return yyyy/MM/dd; may be empty) |
refer | Reference number (ref_1, ref_2 …) |
Boundary of native search: native search returns the title, link, and content snippet; content_size: "high" requests more context and guarantees neither the full article nor that the result link can be opened by automated tools. Being able to retrieve a WeChat Official Account article does not mean its full text has been obtained; the reachability of long links and short links must be verified article by article in practice. The platform does not purchase article bodies or rewrite links — link and content are passed through as returned by the upstream search engine.
Response example (illustrative data):
{
"created": 1757949600,
"id": "4981601553541067586",
"request_id": "4981601553541067586",
"search_intent": [],
"search_result": [
{
"title": "H1 2026 new energy vehicle sales ranking released",
"link": "https://news.example-site.cn/article/12345",
"content": "According to the latest statistics from the industry association, new energy vehicle sales grew 32% year over year in H1 2026, with domestic brands taking eight of the top ten places...",
"media": "Example News",
"icon": "https://news.example-site.cn/favicon.ico",
"publish_date": "2026-07-15",
"refer": "ref_1"
},
{
"title": "New energy vehicle market analysis: rankings and trend interpretation",
"link": "https://www.example-auto.com/market-report",
"content": "This article reviews the shifts in the 2026 new energy vehicle sales ranking and the market drivers behind them...",
"media": "Example Auto",
"icon": "https://www.example-auto.com/favicon.ico",
"publish_date": "2026-08-02",
"refer": "ref_2"
}
]
}5. Limits and Billing
- Streaming is not supported yet: a request body containing
"stream": truereturns a structured400error (stream_not_supported) - Billed per request: each call is billed at the unit price of the selected tier, and the unit price follows the model pricing page in the Console; failed requests are not charged
