Search Suggestions
Retrieves WeChat search suggestions for a keyword, optionally scoped by a supported business type. Use it to expand or refine a query before a targeted WeChat search.
Parameters
| Name | Required | Type | Description | Example | Allowed values |
|---|---|---|---|---|---|
keyword |
Required | string | Keyword used to fetch WeChat search suggestions. | 咖啡 |
— |
business_type |
Optional | string | WeChat search business type used to scope suggestion results. Available Values: - `ALL`: All - `ACCOUNT`: Official accounts - `ARTICLE`: Articles - `CHANNEL`: Channels - `MOMENTS`: Moments - `LIVE`: Live - `EMOJI`: Emoji - `AUDIO`: Audio - `BOOK`: Books - `WECHAT_INDEX`: WeChat index - `NEWS`: News - `MINI_PROGRAM`: Mini programs - `ENCYCLOPEDIA`: Encyclopedia | ALL |
ALLACCOUNTARTICLECHANNELMOMENTSLIVEEMOJIAUDIOBOOKWECHAT_INDEXNEWSMINI_PROGRAM |
Code samples
curl -G "https://api.mofa-ai.com/v1/weixin/search_suggestions_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'business_type=ALL'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/weixin/search_suggestions_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"business_type": "ALL",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/weixin/search_suggestions_v1");
url.search = new URLSearchParams({
keyword: "咖啡",
business_type: "ALL",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
Try it
Sign in to call this endpoint from this page. Successful calls are billed to your balance, failed calls are free, and new accounts get $0.50 of trial credit.
Example response
Captured 2026-11-07, took 773 ms · Request parameters {"keyword": "咖啡", "business_type": "ALL"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "weixin.search_suggestions_v1",
"cost_usd": 0.16,
"data": {
"code": 0,
"data": {
"data": {
"sug_words": [
"咖啡",
"格羽咖啡馆",
"… +8"
]
}
},
"message": null,
"requestId": "4259beeec585490094e8d719f7c24eb8",
"recordTime": "2026-11-08T07:58:33.096395184",
"requestParams": {
"body": null,
"query": {
"keyword": "咖啡",
"businessType": "ALL"
}
}
}
}