Search WeChat videos
tikhub.x.wechat-search-v2-fetch-search-videosWechat search: fetch search videos (v2)
- 价格
- $0.01/success按供应商原价
- 成功率
- 100%近 30 天 · 765 次
- 延迟 p50
- 2.2 秒p95 2.7 秒
- 最后验证
- 2026年7月28日实测可用
POSThttps://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search-videos预览在线试用即将上线供应商文档 ↗
- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 请求体(JSON) | ||||
raw | 布尔 | 可选 | True=raw search response; False=simplified parsed structure | true |
sort | 字符串 | 可选 | Sort: default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer | default |
cursor | 字符串 | 可选 | Pagination cursor, same as universal search: leave empty for the first page; pass back the cursor from the previous response | |
offset | 整数 | 可选 | Pass 0 for the first page; use cursor to paginate (offset alone does not work) | 0 |
keyword | 字符串 | 必填 | Search keyword (1-100 chars) | 美食 |
duration | 字符串 | 可选 | Duration tier (Channels video only): all/0 / short/1 (<5min) / medium/2 (5-10min) / long/3 (20min+); string key or integer | all |
publish_time | 字符串 | 可选 | Publish time: all/0 / day/1 / week/2 / half_year/3; string key or integer | all |
- 请求体(JSON)
raw布尔可选True=raw search response; False=simplified parsed structure
示例:
truesort字符串可选Sort: default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer
示例:
defaultcursor字符串可选Pagination cursor, same as universal search: leave empty for the first page; pass back the cursor from the previous response
offset整数可选Pass 0 for the first page; use cursor to paginate (offset alone does not work)
示例:
0keyword字符串必填Search keyword (1-100 chars)
示例:
美食duration字符串可选Duration tier (Channels video only): all/0 / short/1 (<5min) / medium/2 (5-10min) / long/3 (20min+); string key or integer
示例:
allpublish_time字符串可选Publish time: all/0 / day/1 / week/2 / half_year/3; string key or integer
示例:
all
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
预览
curl -X POST 'https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search-videos' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"raw":true,"sort":"default","offset":0,"keyword":"美食","duration":"all","publish_time":"all"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search-videos",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"raw\":true,\"sort\":\"default\",\"offset\":0,\"keyword\":\"美食\",\"duration\":\"all\",\"publish_time\":\"all\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-search-videos", {
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\":\"美食\",\"duration\":\"all\",\"publish_time\":\"all\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.01/success 计费,已含服务费。