WeChat · Search
Search articles by keyword
Send a keyword and a sort; get matching Official Account articles with title, summary, account name, publish time, cover, link and read count.
POST/v1/wechat/search
$0.005per record
- 1,000 records
- ≈ $5.00
- minimum per page of 20 records
- $0.012507
Works with trial balancePages with a cursor
Send it
POST with a JSON body, or GET with the same parameters in the query string. Your key goes in the Authorization header.
curl -X POST "https://api.silklinedata.com/v1/wechat/search" \
-H "Authorization: Bearer $SILKLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":5,"keyword":"咖啡","sort":"hot"}'import os, requests
response = requests.post(
"https://api.silklinedata.com/v1/wechat/search",
headers={"Authorization": "Bearer " + os.environ["SILKLINE_KEY"]},
json={
"limit": 5,
"keyword": "咖啡",
"sort": "hot",
},
)
answer = response.json()
print(answer["data"], answer["meta"]["charged_usd"])const response = await fetch("https://api.silklinedata.com/v1/wechat/search", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"limit": 5,
"keyword": "咖啡",
"sort": "hot"
}),
});
const { data, cursor, meta } = await response.json();
console.log(data, meta.charged_usd);What comes back
Records from a real request on 2026-11-09. Names, avatars and profile links of ordinary users show as <masked>; long text is cut here, not in the API.
{
"data": [
{
"type": "article",
"articleId": "MzA4MjQxNjQzMA==_2769089227_1",
"url": "https://mp.weixin.qq.com/s?__biz=MzA4…",
"title": "每天喝咖啡是“提神”还是“伤身”?",
"summary": "咖啡之所以可以提神,核心成分是咖啡因…",
"accountName": "新华网",
"publishedAt": "2026-10-13T13:57:11Z",
"coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/7042V…",
"readCount": 100000
},
{
"type": "article",
"articleId": "MjM5MjAxNDM4MA==_2667025785_1",
"url": "https://mp.weixin.qq.com/s?__biz=MjM5…",
"title": "被严重低估的“护肝饮料”,每天1-2杯,…",
"summary": "喝咖啡为什么能护肝?关键在这“一升一…",
"accountName": "人民日报",
"publishedAt": "2026-08-11T11:45:21Z",
"coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWj…",
"readCount": 100000
}
],
"cursor": "c1.Hq8vR2mTn5wK.yJ0dXA…",
"meta": {
"request_id": "req_01JD8Q…",
"charged_usd": "0.012507",
"balance_usd": "9.875000",
"items": 2
}
}Fields 9
| Field | Type | Example value |
|---|---|---|
| type | string | article |
| articleId | string | MzA4MjQxNjQzMA==_2769089227_1 |
| url | string | https://mp.weixin.qq.com/s?__biz=MzA4MjQxNjQzMA==&mid=276908… |
| title | string | 每天喝咖啡是“提神”还是“伤身”? |
| summary | string | 咖啡之所以可以提神,核心成分是咖啡因,它可以通过血脑屏障,阻断腺苷与受体结合。腺苷是人体产生疲劳和睡意的重要信号,被咖啡… |
| accountName | string | 新华网 |
| publishedAt | string | 2026-10-13T13:57:11Z |
| coverUrl | string | https://mmbiz.qpic.cn/mmbiz_jpg/7042Vtt599XJIrap8Vd5a6wcrZd2… |
| readCount | number | 100000 |
Parameters 3
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| limit | integer | no | How many records to return, 1 to 100. A request never returns more than this. | 5 |
| keyword | string | yes | Search keyword. Chinese keywords work best, e.g. "美食". | 咖啡 |
| sort | string | no | Relevance, newest first, or most liked first. | hot |
Paging
Send the cursor of the last answer back with the same parameters to get the next page. Each page is a request of its own, charged on its own; the last page has cursor null.
const params = {"keyword":"咖啡","sort":"hot"};
const records = [];
let cursor = null;
do {
const response = await fetch("https://api.silklinedata.com/v1/wechat/search", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ ...params, limit: 100, ...(cursor ? { cursor } : {}) }),
});
const answer = await response.json();
records.push(...answer.data);
cursor = answer.cursor;
} while (cursor);
console.log(records.length);What a request costs
You pay per record; when a request returns few records or none, it is charged at most the endpoint minimum for each page it reads, possibly less, and errors or timeouts on our side are not charged.
Here a page holds up to 20 records and its minimum is $0.012507; a request for 100 records reads 5 pages.
- 1 record: up to $0.012507
- 20 records: up to $0.10
- 100 records: up to $0.50
The response's meta says what was charged (charged_usd) and what is left (balance_usd). Errors on our side are not charged.
Questions
What parameters does Search articles by keyword take?
Required: keyword. Optional: sort. Every request also takes limit (1 to 100).
How many records does one request return?
Up to 100 (limit 1 to 100). A page holds up to 20 records, so 100 records take 5 pages in one request.
Can I page through more results?
Yes. While the answer carries a cursor, send it back with the same parameters for the next batch.
How much does it cost?
Per record: record $0.005. The minimum is $0.012507 per page: with few records or none, a request pays at most that for each page it reads, possibly less. 100 records cost at most $0.50.
What does a request cost when it fails or comes back empty?
You pay per record; when a request returns few records or none, it is charged at most the endpoint minimum for each page it reads, possibly less, and errors or timeouts on our side are not charged. Each answer's meta says what the request was charged and the balance left.