Article Search
Searches WeChat Official Account articles by keyword with publish-time and sort filters plus page, offset, and continuation-state pagination. Use it to discover recent or high-interest articles for topic research and content monitoring.
Parameters
| Name | Required | Type | Description | Example | Allowed values |
|---|---|---|---|---|---|
keyword |
Required | string | Search keyword for WeChat Official Account articles. | 咖啡 |
— |
publish_time_type |
Optional | string | Weixin web article search publish time filter | ALL |
ALLONE_DAYSEVEN_DAYSHALF_YEAR |
sort_type |
Optional | string | Weixin web article search sort type | COMPREHENSIVE |
COMPREHENSIVELATESTHOT |
current_page |
Optional | integer | Current page number starting from 1 for WeChat web search pagination. | 1 |
— |
offset |
Optional | integer | Search result offset returned by the previous response. Use 0 for the first page. | 0 |
— |
cookies_buffer |
Optional | string | Opaque pagination state returned by the previous WeChat web search response. Leave it empty for the first page. For this POST endpoint, send it in an application/x-www-form-urlencoded form body. | — | — |
Code samples
curl -G "https://api.mofa-ai.com/v1/weixin/search_article_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'publish_time_type=ALL' \
--data-urlencode 'sort_type=COMPREHENSIVE' \
--data-urlencode 'current_page=1' \
--data-urlencode 'offset=0'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/weixin/search_article_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"publish_time_type": "ALL",
"sort_type": "COMPREHENSIVE",
"current_page": "1",
"offset": "0",
},
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_article_v1");
url.search = new URLSearchParams({
keyword: "咖啡",
publish_time_type: "ALL",
sort_type: "COMPREHENSIVE",
current_page: "1",
offset: "0",
});
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 1097 ms · Request parameters {"offset": "0", "keyword": "咖啡", "sort_type": "COMPREHENSIVE", "current_page": "1", "publish_time_type": "ALL"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "weixin.search_article_v1",
"cost_usd": 0.16,
"data": {
"code": 0,
"data": {
"ret": 0,
"data": [
{
"type": 2,
"boxID": "0x2-0-15988177807488435251",
"count": 1,
"items": [
{
"date": 1793675675,
"desc": "都是<em class=\"highlight\">咖啡</em>,美式、拿铁、三合一,不只是口感不同,对骨骼的友好程度也不同。美式是浓缩加水,几乎不含钙。一杯常规美式造成的钙丢失其实很少,日常喝够奶,基本能够对冲。",
"docID": "15988177807488435251",
"title": "美式、拿铁、三合一,谁才是骨头的“梦中情咖”?",
"source": {
"title": "羊城晚报",
"dateTime": "4天前"
},
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MjM5MTYwMTMwMQ==&mid=2651755447&idx=1&sn=0cd0e3e6f514a39465beb06ef5c9dd71&chksm=bc60e75e50b8c121631a8573c86b22d864e3eeb6516eb08573de2f43b7a5778077ac52e43c67&scene=7#rd",
"mpScene": 7,
"reportId": "15988177807488435251:mp:425007",
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/j41VnwgcJibF9OIRp67OG4HSQ0YwsnrLIG84pQApAfPICJJTPlKJ83lqOb3qI8YKHFmZcFycZdUFW9lwaibuqualfJU9vIMPpVljDsc7VjjLg/0?wx_fmt=jpeg",
"timestamp": 1793675675,
"itemShowType": 0,
"report_extinfo_str": "src_channel%3D856814348_2_0_3983623149_13%26tuple%3D2391601301_2651755447_1"
}
],
"boxPos": 1,
"subType": 0,
"real_type": 2,
"resultType": 0,
"totalCount": 202,
"boxPosMerge": 1,
"useNativeRender": false
},
{
"type": 2,
"boxID": "0x2-0-5244603196470908087",
"count": 1,
"items": [
{
"date": 1794092447,
"desc": "<em class=\"highlight\">咖啡</em>是埃塞俄比亚在进博会上最具辨识度的品类,也是最容易用数据说话的品类。埃塞俄比亚是非洲最大的阿拉比卡<em class=\"highlight\">咖啡</em>生产国,全国<em class=\"highlight\">咖啡</em>年产量约60万吨,<em class=\"highlight\">咖啡</em>产业与数百万小农的生计直接挂钩。",
"docID": "5244603196470908087",
"title": "埃塞俄比亚连续九年参展进博会:<em class=\"highlight\">咖啡</em>对华出口额一年增58%",
"source": {
"title": "埃塞商务圈",
"dateTime": "57分钟前"
},
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzI2NDQ3OTE1Nw==&mid=2247584918&idx=3&sn=ad65793f667659065fd77c48c7f7a6e0&chksm=eb4e179f45e53c8c47cf6183aa467b766d2b0617655133bcae94784a9fa1cb16bafa98efe8f3&scene=7#rd",
"mpScene": 7,
"reportId": "5244603196470908087:mp:451807",
"src_type": 49,
"thumbUrl": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/PS69M3BiauTdca6liaGJ42ricuicdfVniaBA69ATbrD8kRicBdhzme1Dx6rvJfSfsyxEkriaSw6NVF4svyE8f3QDACxyD6j1qRvSXM5UP4zGUUkbfo/0?wx_fmt=jpeg",
"timestamp": 1794092447,
"itemShowType": 0,
"report_extinfo_str": "src_channel%3D2804691747_4096_0_2893846665_13%26tuple%3D3264479157_2247584918_3"
}
],
"boxPos": 2,
"subType": 0,
"real_type": 2,
"resultType": 0,
"totalCount": 202,
"boxPosMerge": 2,
"useNativeRender": false
},
"… +13"
],
"lang": "zh_CN",
"query": "咖啡",
"offset": 18,
"cookies": "{\"box_offset\":15,\"businessType\":2,\"clm_box_offset\":15,\"clm_sub_box_offset\":15,\"cookies_buffer\":\"UpIECGIQABgAIgblkpbllaEyhwMweDItMC0xNTk4ODE3NzgwNzQ4ODQzNTI1MTsweDItMC01MjQ0NjAzMTk2NDcwOTA4MDg3OzB4Mi0w…",
"category": [
{
"type": 0,
"word": "全部",
"selected": 1
},
{
"type": 2,
"word": "文章"
},
"… +14"
],
"isDivide": 1,
"searchID": "1794095914622117939",
"sidedata": null,
"direction": 2,
"timeStamp": 1794095910,
"experiment": [
{
"key": "mmsearch_live_double_auto_play_exp",
"value": "1"
},
{
"key": "mmsearch_shopping_cart_entry",
"value": "1"
},
"… +5"
],
"isHomePage": 1,
"pageNumber": 2,
"resultType": 0,
"continueFlag": 1,
"isAutoPlayVideo": 1,
"enableQuestionClosely": false
},
"message": null,
"requestId": "4a6882331a8540a08f060e607ca4b3f5",
"recordTime": "2026-11-08T07:58:31.169102745",
"requestParams": {
"body": {
"offset": "0",
"keyword": "咖啡",
"sortType": "COMPREHENSIVE",
"currentPage": "1",
"publishTimeType": "ALL"
},
"query": {}
}
}
}