Search WeChat content
tikhub.x.wechat-search-v2-fetch-searchWechat search: fetch search (v2)
- 价格
- $0.01/success按供应商原价
- 成功率
- 100%近 30 天 · 44 次
- 延迟 p50
- 2.3 秒p95 3.1 秒
- 最后验证
- 2026年7月28日实测可用
POSThttps://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 请求体(JSON) | ||||
raw | 布尔 | 可选 | True=raw search response; False=simplified parsed structure | true |
sort | 字符串 | 可选 | Sort (result page 'sort' dropdown, common to all verticals): default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer | default |
cursor | 字符串 | 可选 | Pagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response | |
offset | 整数 | 可选 | Pass 0 for the first page; use cursor to paginate (offset alone does not work — it returns the first page every time) | 0 |
keyword | 字符串 | 必填 | Search keyword (1-100 chars) | 人民日报 |
publish_time | 字符串 | 可选 | Publish time (result page 'time' dropdown, common): all/0 / day/1 / week/2 / half_year/3; string key or integer | all |
business_type | 字符串 | 可选 | Vertical key: all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / weixin_index, other values are rejected | all |
- 请求体(JSON)
raw布尔可选True=raw search response; False=simplified parsed structure
示例:
truesort字符串可选Sort (result page 'sort' dropdown, common to all verticals): default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer
示例:
defaultcursor字符串可选Pagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response
offset整数可选Pass 0 for the first page; use cursor to paginate (offset alone does not work — it returns the first page every time)
示例:
0keyword字符串必填Search keyword (1-100 chars)
示例:
人民日报publish_time字符串可选Publish time (result page 'time' dropdown, common): all/0 / day/1 / week/2 / half_year/3; string key or integer
示例:
allbusiness_type字符串可选Vertical key: all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / weixin_index, other values are rejected
示例:
all
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X POST 'https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"raw":true,"sort":"default","offset":0,"keyword":"人民日报","publish_time":"all","business_type":"all"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"raw\":true,\"sort\":\"default\",\"offset\":0,\"keyword\":\"人民日报\",\"publish_time\":\"all\",\"business_type\":\"all\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"raw\":true,\"sort\":\"default\",\"offset\":0,\"keyword\":\"人民日报\",\"publish_time\":\"all\",\"business_type\":\"all\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.01/success 计费,已含服务费。