账号搜索
按关键词搜索微信公众号,支持页码分页且每页一个结果。用于在查看资料或文章之前按名称或相关术语查找账号。
参数
| 参数 | 必填 | 类型 | 说明 | 示例 | 可选值 |
|---|---|---|---|---|---|
keyword |
必填 | string | 微信公众号资料搜索的搜索关键词。 | 咖啡 |
— |
page |
可选 | integer | 微信公众号资料搜索的页码,从1开始。 | 1 |
— |
代码示例
curl -G "https://api.mofa-ai.com/v1/weixin/search_account_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'page=1'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/weixin/search_account_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"page": "1",
},
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_account_v1");
url.search = new URLSearchParams({
keyword: "咖啡",
page: "1",
});
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);
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
响应示例
采集于 2026-11-07,耗时 271 ms · 请求参数 {"page": "1", "keyword": "咖啡"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "weixin.search_account_v1",
"cost_usd": 0.08,
"data": {
"code": 0,
"data": {
"data": [
{
"biz": "MzU3NjcyOTg0OQ==",
"fans": 367,
"ghid": "gh_a0a86f703924",
"name": "咖啡 咖啡",
"wxid": "zhangluqinya",
"avatar": "https://wx.qlogo.cn/mmhead/Q3auHgzwzM5BvwpkjkZecAt3UnIConAozsPP6uNIAJIiaRiaCOHRIY3w/0",
"qrcode": "https://open.weixin.qq.com/qr/code?username=zhangluqinya",
"owner_name": "女",
"avg_top_zan": 2,
"avg_top_read": 21,
"customer_type": "",
"week_articles": 3,
"lastest_publish": 1784298588
}
]
},
"message": null,
"requestId": "f1220988308d4f60bd9f1fb4d6402ecb",
"recordTime": "2026-11-08T07:58:33.367606636",
"requestParams": {
"body": {
"keyword": "咖啡"
},
"query": {}
}
}
}