Search WeChat content
tikhub.x.wechat-search-v2-fetch-searchWechat search: fetch search (v2)
- Price
- $0.01/successAu prix du fournisseur
- Success rate
- 100 %Last 30 days · 44 calls
- Latency p50
- 2.3 sp95 3.1 s
- Last verified
- 28 juil. 2026Verified working
POSThttps://toolswitch.dev/v1/tools/tikhub.x.wechat-search-v2-fetch-searchPreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Corps (JSON) | ||||
raw | booléen | Facultatif | True=raw search response; False=simplified parsed structure | true |
sort | chaîne | Facultatif | 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 | chaîne | Facultatif | Pagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response | |
offset | entier | Facultatif | Pass 0 for the first page; use cursor to paginate (offset alone does not work — it returns the first page every time) | 0 |
keyword | chaîne | Obligatoire | Search keyword (1-100 chars) | 人民日报 |
publish_time | chaîne | Facultatif | Publish time (result page 'time' dropdown, common): all/0 / day/1 / week/2 / half_year/3; string key or integer | all |
business_type | chaîne | Facultatif | Vertical key: all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / weixin_index, other values are rejected | all |
- Corps (JSON)
rawbooléenFacultatifTrue=raw search response; False=simplified parsed structure
Exemple :
truesortchaîneFacultatifSort (result page 'sort' dropdown, common to all verticals): default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integer
Exemple :
defaultcursorchaîneFacultatifPagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response
offsetentierFacultatifPass 0 for the first page; use cursor to paginate (offset alone does not work — it returns the first page every time)
Exemple :
0keywordchaîneObligatoireSearch keyword (1-100 chars)
Exemple :
人民日报publish_timechaîneFacultatifPublish time (result page 'time' dropdown, common): all/0 / day/1 / week/2 / half_year/3; string key or integer
Exemple :
allbusiness_typechaîneFacultatifVertical key: all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / weixin_index, other values are rejected
Exemple :
all
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
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());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à $0.01/success, frais de service inclus.