keywordstring必填
Search keyword (1-100 chars)
https://api.sandbase.ai/v1/api/wechat-search/v2/searchSearch WeChat with one endpoint: official account articles, accounts, Channels videos, live streams, news and more. Filter by vertical, sort and publish time, with cursor pagination.
[
{
"data": {
"business_type": 2,
"categories": null,
"continue_flag": 1,
"count": 37,
"cursor": "uIPAVvHcM7SXlk126cnQ4rzNSw_0qdP-8OVyX2TzuPWKBg1BLPozHpQvhQYD6dWC5hoFSF8A95LzJ4crMiVoupQk-eQm6Bq2yD23YCmHM315GM1atXV__HdN7rft2SSilzYt9aryqD_UegKjKhODC0rv_Oo4PYhnEZ4mYK77_uk3LIHEjRZeA-iz-Vot3cBn6F55Ib8QURgJSJP4t2hocZ0eBPa-LHwyYuhxYeQzA4SDYHkl_luqoiuX5Q6q-moqxVcAAzKIz1qyLwkU2fHAOvgcy_xhVaZiHCdsgI9awOGHO_DQdOsYazvaha5TZhfZqkho9rPF18maOsn3x0ZaKOHZC_MVTPhn3SE3ViEuq-X5VFVNqmQF-8N05tYjSeIbTafatpNuChYQI7Cp5qYNF4rpFt_5hUBzYVWdw1Fj0p-OvJN4S-M1S-xWWJVzQc8EDtYGLiuVWbQwlKAdXHsDiNBabplV7UomiiJNEzq_p5ZbVENbtfNDhrA4OnOC33rBcvSf_XWR4IilAtQYuQdxEuY2n2juOzDsoEcb6uVDb05tbEfvVsAZobkOl2Cib292vq35mtb8NyeuAHv92fdR4658…",
"debug_id": "e295d4ab",
"debug_info": "gAAAAABqxjABtsna3kB6S0dvg_DtrLriNL9xJqHje5kvhN9X2EpTauuMK-Met11Sv3mIBTYThJOXsgwmdYbSY_FIgp1JaBPMxA7zhOu4te4jzA9NOhX_zXKJIAacFG_qCtdMlPz4R0w5n4XebHyuuPl6fVcj9gDnd2ENHRH496wsbjYaZkGt0UM_0FZKCgo-sfYHMWzcCJ7yH4BgiFUgQdGtoVk36QUeqk9Eoa9yieuYe6IP_DhwVbZfnppcDfWUE4OYs3msr7nR",
"items": [
{
"authStatus": [
{
"desc": "「搜索服务」无定位信息,默认展示位置为北京的结果",
"title": "根据定位可提供更精准的结果",
"type": 1
},
{
"pop": {
"desc": "若需获得所在地相关结果,可",
"descAction": {
"jumpInfo": {
"api": "requestSystemCapabilityAuthorization",
"apiParams": "{\"capability\":1,\"authScene\":11}",
"jumpType": 14
},
"title": "打开定位服务"
},
"overSeaTitle": "「搜索服务」无当前定位信息, 已展示北京相关结果",
"title": "「搜索服务」无位置权限, 已展示北京相关结果"
},
"title": "无当前定位信息,默认展示北京相关结果",
"type": 2
},
{
"overSeaTitle": "根据当前定位可提供更精准的结果",
"title": "根据定位可提供更精准的结果",
"type": 3
}
],
"docID": "addrsupportTip",
"showType": 1,
"title": "允许使用【位置】,获得更精准的搜索结果"
},
{
"date": 1766199600,
"desc": "",
"docID": "6336858824649249438",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzI2ODUzNzA4NQ==&mid=2247581064&idx=1&sn=c6ddd50b6a647a3210cdb2b4eafe7552&chksm=eba93e1c4690a9f446de1affca2e5aebbebc9ea682da1e4b6ee26f1a912bf302db5b33560b0d#rd",
"itemShowType": 0,
"mpScene": 7,
"source": {
"dateTime": "10个月前",
"title": "青苗法鸣"
},
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/bewibHHVTya7wjLl1P83s4jXluaUib28XNDJjmbcu9ezvCoaYiakpsw4L9b4Of9PFWTFv2f4tL9dARHAIs0yQZNTw/0?wx_fmt=jpeg",
"timestamp": 1766199600,
"title": "<em class=\"highlight\">2026</em>年<em class=\"highlight\">南开大学法学</em>/法律<em class=\"highlight\">博士拟录取名单</em>"
},
{
"date": 1784633400,
"desc": "",
"docID": "688829883682389426",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzYzMTI4MDcyOA==&mid=2247490020&idx=4&sn=4db353f9909dfaee928b3de05b1afb7e&chksm=f1e42329bd9ab957ba86ff25a6780aed9fd15082599b71e6a2daa0600f181abd133460a50915#rd",
"itemShowType": 0,
"mpScene": 7,
"source": {
"dateTime": "3个月前",
"title": "经管法申博圈-青于蓝考博"
},
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/ErbuWleBsMl4FObWeT7NsYFQOfkVsPDG3Vvk2iaRfKxdavASAKEGNQkVNG7LtYVDepSEoLEJsB6JvCRMZlmIqCLpicL7xPwzSGj5Oc46gsYbY/0?wx_fmt=jpeg",
"timestamp": 1784633400,
"title": "<em class=\"highlight\">南开大学法学院2026</em>年<em class=\"highlight\">博士生拟录名单公示</em>"
},
"… 34 more items in the full response"
],
"keyword": "南开大学 法学院 2026 博士 拟录取名单",
"no_more": null,
"offset": 36,
"total": 243
}
}
]選擇一個範例,將其輸入與結果載入 playground。
Searches WeChat for a keyword and returns matching results from the vertical you choose with business_type, such as official account articles, accounts, Channels videos, live streams or news. It needs one input, keyword. Filters for sort order and publish time narrow the results.
sort set to latest.publish_time to check recent coverage.curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/v2/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "OpenAI", "business_type": "article", "raw": false}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword (1-100 chars) |
business_type | string | No | Optional, default all. Vertical string key, only the following are supported — all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / `weixin_index |
cursor | string | No | Optional. Pagination cursor. Leave empty for the first page; for the next page pass back the cursor returned in the previous response (repeat the same sort / publish_time), and use continue_flag to check whether |
offset | integer | No | Optional, default 0 (>=0). Pass 0 for the first page; use cursor to paginate — offset alone does not work (it returns the first page every time). |
publish_time | string | No | Optional, default all. Publish time (result page "time" dropdown, common) — all/0 / day/1 / week/2 / half_year/3; string key or integer, invalid values rejected (400). |
raw | boolean | No | Optional, default True. True=raw search response; False=simplified parsing. |
sort | string | No | Optional, default default. Sort (result page "sort" dropdown, common to all verticals) — default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer, invalid values rejected (400). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"business_type": 2,
"categories": null,
"continue_flag": 1,
"count": 38,
"cursor": "hO0SuC6V7gEWmcGXQvsJ5wYWU4HyplzRxHlbePoYMtHLQY0vwElfi8d9LA-X87FzUQ7qOvpJTpv4SPHP…",
"debug_id": "e5835ac5",
"debug_info": "gAAAAABq6ZE7ot2LojpCJR304JESp7F_lWS4y7oOLUfqwVqQ9TIO8WNyZlsFYGWjOnT9jqzEk27z2sgB…",
"items": [
{
"date": 1793688900,
"desc": "<em class=\"highlight\">OpenAI</em>不是一家普通的公司。GPT-6 Astra、5亿年化营收、全球最大的AI用户入口,这些东西是真…",
"docID": "5774067735576686510",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzU4ODQwNTIxMw==&mid=2247595037&idx=1&sn=8c2c2d5…",
"itemShowType": 0,
"mpScene": 7,
"source": {
"dateTime": "51分钟前",
"title": "人工智能产业链union"
},
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/9NdMVNE3GyZlQFyh70as5OnDBo1sPia1hpUW8PMhpoHnf…",
"timestamp": 1793688900,
"title": "【投融资】没人抢了:<em class=\"highlight\">OpenAI</em>的估值,一周之内自己砍掉了1500亿美元"
}
],
"keyword": "OpenAI",
"no_more": null,
"offset": 38,
"total": 280
}
| Field | Meaning |
|---|---|
items[].title | Article title. Search matches are wrapped in <em class="highlight"> tags. |
items[].desc | Short text snippet of the article, with matched keywords wrapped in <em class="highlight"> tags. |
items[].doc_url | Link to the article on mp.weixin.qq.com. |
items[].source.title | Name of the official account that published the article. |
items[].source.dateTime | Relative publish time as shown on the WeChat result page, for example 51分钟前 or 1天前. |
items[].timestamp / items[].date | Publish time of the article as a Unix timestamp in seconds. |
items[].thumbUrl | Cover image URL for the article. |
items[].docID | Identifier of the result document. |
count / total | count is the number of items in this page's result. total is the overall result count reported by the search. |
continue_flag / cursor | continue_flag is 1 when more pages exist. cursor is the value to pass back to get the next page. |
cursor back with the same keyword, sort and publish_time. Check continue_flag first.offset alone does not paginate. It returns the first page every time, so use cursor.sort accepts default, latest or hot. publish_time accepts all, day, week or half_year.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Send your keyword with business_type article and raw false explicitly. The default vertical is all and the default raw value is true, so omitting these fields changes the task and response shape. Keyword length is 1–100 characters. Start with offset 0 and no cursor. Use the documented sort and publish_time choices; latest sorts by recency, while default ranks relevance and hot is the provider's popularity ordering.
Read items as a list. A present empty list means no items were returned by this request; a missing list is not the same result. Each item can contain title, desc, doc_url and source.title. The title and snippet can include highlight markup. Extract plain text or sanitize HTML before display; a highlighted snippet is not the full article body. A source display name alone is not a stable account identity.
Preserve the returned publication timestamp when available, its raw value and retrieval time. Relative source.dateTime labels such as minutes ago cannot establish an exact publication time without observation context. Search count and total are provider-reported values, not proof you obtained every matching article or all articles from an account. The README excerpt keeps one item while showing count 38, so its displayed length is not a live result count.
A later page needs the returned cursor and a continuation decision from continue_flag, while keeping keyword, business_type, sort, publish_time and raw unchanged. Offset alone repeats the first page; do not implement an offset loop or reuse the truncated example cursor. No continuation roundtrip was tested for this revision. For accounts or Channels content, select another supported business_type and inspect that response separately rather than assuming article fields apply.
Choose a complete mp.weixin.qq.com article URL before a separate Article Detail request. Never send the ellipsized URL from the README example, automatically open every hit, or treat search titles as verified claims about the subject.
Use a local SANDBASE_API_KEY with Bearer authentication and POST /v1/api/. An agent that already has access needs your chosen keyword or complete article URL and one desired output. For a new project, share the setup Skill, Markdown quickstart and selected endpoint. Read one result before expanding to more searches, article bodies or scheduled monitoring.
Validate completed SandBase status and an object at outputs[0].data. The simplified reference places search items or the article content object directly there; do not add a guessed data.data wrapper or an undocumented provider success flag. A missing or malformed required object/list is an error, not an empty successful research result. The shortened reference JSON is evidence of selected fields, not a complete field guarantee.
Pricing checked on 2026-11-08: both endpoints list $0.01 per call and eligibility for 100 daily calls shared across eligible data APIs in the organization, resetting at 00:00 UTC. This is not a remaining-balance or allowance measurement. Verify current pricing before running. No new business request was made for this revision. Follow the WeChat Python integration guide for bounded parsing and dated source notes.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/v2/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"raw": false,
"sort": "default",
"offset": 0,
"keyword": "南开大学 法学院 2026 博士 拟录取名单",
"publish_time": "all",
"business_type": "article"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
keywordstring必填Search keyword (1-100 chars)
business_typestringOptional, default `all`. Vertical string key, only the following are supported — `all` / `account` / `article` / `video` / `live_stream` / `moments` / `news` / `book` / `listen` / `image` / `encyclopedia` / `weixin_index`; any other value is rejected (422).
預設:"all"
可能值:all, account, article, video, live_stream, moments, news, book, listen, image, encyclopedia, weixin_index
cursoranyOptional. Pagination cursor. Leave empty for the first page; for the next page pass back the `cursor` returned in the previous response (repeat the same `sort` / `publish_time`), and use `continue_flag` to check whether there are more pages.
offsetintegerOptional, default 0 (>=0). Pass `0` for the first page; **use `cursor` to paginate — offset alone does not work** (it returns the first page every time).
預設:0
publish_timeanyOptional, default `all`. Publish time (result page "time" dropdown, common) — `all`/0 / `day`/1 / `week`/2 / `half_year`/3; string key or integer, invalid values rejected (400).
預設:"all"
rawbooleanOptional, default True. True=raw search response; False=simplified parsing.
預設:true
sortanyOptional, default `default`. Sort (result page "sort" dropdown, common to all verticals) — `default`/0 (relevance) / `latest`/1 (newest) / `hot`/2 (most liked); string key or integer, invalid values rejected (400).
預設:"default"
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
[
{
"data": {
"business_type": 2,
"categories": null,
"continue_flag": 1,
"count": 37,
"cursor": "uIPAVvHcM7SXlk126cnQ4rzNSw_0qdP-8OVyX2TzuPWKBg1BLPozHpQvhQYD6dWC5hoFSF8A95LzJ4crMiVoupQk-eQm6Bq2yD23YCmHM315GM1atXV__HdN7rft2SSilzYt9aryqD_UegKjKhODC0rv_Oo4PYhnEZ4mYK77_uk3LIHEjRZeA-iz-Vot3cBn6F55Ib8QURgJSJP4t2hocZ0eBPa-LHwyYuhxYeQzA4SDYHkl_luqoiuX5Q6q-moqxVcAAzKIz1qyLwkU2fHAOvgcy_xhVaZiHCdsgI9awOGHO_DQdOsYazvaha5TZhfZqkho9rPF18maOsn3x0ZaKOHZC_MVTPhn3SE3ViEuq-X5VFVNqmQF-8N05tYjSeIbTafatpNuChYQI7Cp5qYNF4rpFt_5hUBzYVWdw1Fj0p-OvJN4S-M1S-xWWJVzQc8EDtYGLiuVWbQwlKAdXHsDiNBabplV7UomiiJNEzq_p5ZbVENbtfNDhrA4OnOC33rBcvSf_XWR4IilAtQYuQdxEuY2n2juOzDsoEcb6uVDb05tbEfvVsAZobkOl2Cib292vq35mtb8NyeuAHv92fdR4658…",
"debug_id": "e295d4ab",
"debug_info": "gAAAAABqxjABtsna3kB6S0dvg_DtrLriNL9xJqHje5kvhN9X2EpTauuMK-Met11Sv3mIBTYThJOXsgwmdYbSY_FIgp1JaBPMxA7zhOu4te4jzA9NOhX_zXKJIAacFG_qCtdMlPz4R0w5n4XebHyuuPl6fVcj9gDnd2ENHRH496wsbjYaZkGt0UM_0FZKCgo-sfYHMWzcCJ7yH4BgiFUgQdGtoVk36QUeqk9Eoa9yieuYe6IP_DhwVbZfnppcDfWUE4OYs3msr7nR",
"items": [
{
"authStatus": [
{
"desc": "「搜索服务」无定位信息,默认展示位置为北京的结果",
"title": "根据定位可提供更精准的结果",
"type": 1
},
{
"pop": {
"desc": "若需获得所在地相关结果,可",
"descAction": {
"jumpInfo": {
"api": "requestSystemCapabilityAuthorization",
"apiParams": "{\"capability\":1,\"authScene\":11}",
"jumpType": 14
},
"title": "打开定位服务"
},
"overSeaTitle": "「搜索服务」无当前定位信息, 已展示北京相关结果",
"title": "「搜索服务」无位置权限, 已展示北京相关结果"
},
"title": "无当前定位信息,默认展示北京相关结果",
"type": 2
},
{
"overSeaTitle": "根据当前定位可提供更精准的结果",
"title": "根据定位可提供更精准的结果",
"type": 3
}
],
"docID": "addrsupportTip",
"showType": 1,
"title": "允许使用【位置】,获得更精准的搜索结果"
},
{
"date": 1766199600,
"desc": "",
"docID": "6336858824649249438",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzI2ODUzNzA4NQ==&mid=2247581064&idx=1&sn=c6ddd50b6a647a3210cdb2b4eafe7552&chksm=eba93e1c4690a9f446de1affca2e5aebbebc9ea682da1e4b6ee26f1a912bf302db5b33560b0d#rd",
"itemShowType": 0,
"mpScene": 7,
"source": {
"dateTime": "10个月前",
"title": "青苗法鸣"
},
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/bewibHHVTya7wjLl1P83s4jXluaUib28XNDJjmbcu9ezvCoaYiakpsw4L9b4Of9PFWTFv2f4tL9dARHAIs0yQZNTw/0?wx_fmt=jpeg",
"timestamp": 1766199600,
"title": "<em class=\"highlight\">2026</em>年<em class=\"highlight\">南开大学法学</em>/法律<em class=\"highlight\">博士拟录取名单</em>"
},
{
"date": 1784633400,
"desc": "",
"docID": "688829883682389426",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzYzMTI4MDcyOA==&mid=2247490020&idx=4&sn=4db353f9909dfaee928b3de05b1afb7e&chksm=f1e42329bd9ab957ba86ff25a6780aed9fd15082599b71e6a2daa0600f181abd133460a50915#rd",
"itemShowType": 0,
"mpScene": 7,
"source": {
"dateTime": "3个月前",
"title": "经管法申博圈-青于蓝考博"
},
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/ErbuWleBsMl4FObWeT7NsYFQOfkVsPDG3Vvk2iaRfKxdavASAKEGNQkVNG7LtYVDepSEoLEJsB6JvCRMZlmIqCLpicL7xPwzSGj5Oc46gsYbY/0?wx_fmt=jpeg",
"timestamp": 1784633400,
"title": "<em class=\"highlight\">南开大学法学院2026</em>年<em class=\"highlight\">博士生拟录名单公示</em>"
},
"… 34 more items in the full response"
],
"keyword": "南开大学 法学院 2026 博士 拟录取名单",
"no_more": null,
"offset": 36,
"total": 243
}
}
]探索更多
| API | 價格 | 回應 |
|---|---|---|
WeChat Search此 API WeChat Search | 每次呼叫 $0.01 | JSON |
WeChat Search | 每次呼叫 $0.01 | JSON |
WeChat Search | 每次呼叫 $0.114286 | JSON |
WeChat Search | 每次呼叫 $0.114286 | JSON |
WeChat Search | 每次呼叫 $0.057143 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/wechat-search/v2/search。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.01,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:keyword (string)。 選填:business_type(all, account, article, video, live_stream, moments, news, book, listen, image, encyclopedia, weixin_index 之一), cursor (any), offset (integer), publish_time (any), raw (boolean) 和 sort (any)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。WeChat Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 WeChat Search API 存取權。
請明確送出 keyword、business_type article 與 raw false。預設值是 all 和 raw true。請從 offset 0 開始且不要帶 cursor;其他 vertical 與 raw 回應可能有不同結構。
不行。schema 說明只靠 offset 會再次回傳第一頁。後續請求要使用回傳的 cursor 與 continue_flag,並維持相同的查詢、vertical 與篩選條件。截斷的參考 cursor 無法使用,而且這次修訂未測試續頁往返。
簡化版文章結果會描述標題、摘要與連結,有時會帶有 HTML highlight 標籤。它不是完整文章內容,而發布者顯示名稱也不是穩定的帳號身分。請選擇完整文章 URL 以進行單獨的詳細資料請求。