# How to get WeChat Search results by keyword

One endpoint does it: WeChat Search articles and videos. The worked example below is 2 calls and costs $0.0400 in all; a failed call is not charged.

Updated 2026-11-15

You get what WeChat Search (搜一搜) shows for a keyword, page after page: Official Account articles and Channels videos mixed, each with its title or description, the account's name and the time it was posted; an article with its link, a video with its likes and saves.

## Step by step

### Step 1: WeChat Search articles and videos

Search by `query`. `type` says whether an item is an article or a video. `sort` orders by relevance, newest or hottest, and `published_within` keeps only recent ones. For the next page, send `page.next_cursor` as `cursor`, until `page.has_more` is false. ([WeChat Search articles and videos](https://onefeedapi.com/apis/wechat/posts/search/), $0.0200 / a call)

cURL

```bash
curl -G "https://onefeedapi.com/v1/wechat/posts/search" \
  --data-urlencode "query=咖啡店开业" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.wechat.posts.search(query="咖啡店开业")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.wechat.posts.search({ query: "咖啡店开业" });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call wechat.posts.search 'query=咖啡店开业'
```

Recorded response: From a response recorded 2026-10-17 10:16 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "f99e115c-779f-40c2-8f31-aa264bce80dd",
  "data": {
    "items": [
      {
        "id": "1565947629032858",
        "url": null,
        "type": "video",
        "title": null,
        "text": "咖啡店开业｜第一次尝试就爱上了，清单放评论区",
        "published_at": "2026-10-15T06:55:50.000Z",
        "author": {
          "name": "橘子汽水不加冰",
          "avatar_url": "https://wx.qlogo.cn/mmhead/G9OFE9nvQizvdtoFhYPbPgJwNlPo1GOTzMZ7Yb1e/132"
        },
        "metrics": { "likes": 1, "favorites": 3 }
      },
      // … 19 more
    ]
  },
  "page": {
    "next_cursor": "c1.qgwIcUU3N03dRsj5WCHQWiriygBg_3bRP0gIll8U",
    "cursor_expires_at": "2026-10-17T11:16:20.000Z",
    "has_more": true,
    "returned": 20
  },
  "warnings": [],
  "meta": {
    "capability": "wechat.posts.search",
    "result_status": "complete",
    "fetched_at": "2026-10-17T10:16:20.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "lang": "capability",
      "author.id": "capability",
      "author.username": "capability",
      "author.verified": "capability",
      "author.followers": "capability",
      "metrics.comments": "capability",
      "metrics.shares": "capability",
      "metrics.views": "capability",
      "metrics.reposts": "capability",
      "images": "capability",
      "hashtags": "capability",
      "mentions": "capability",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

## What the example costs

two pages of results for one keyword

| Endpoint | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| [WeChat Search articles and videos](https://onefeedapi.com/apis/wechat/posts/search/) | 2 | $0.0200 | $0.0400 |
| Total | 2 |  | $0.0400 |

Prices are the prices in force when this page was built. A failed call costs nothing.

## In your AI (MCP)

Connect OneFeedAPI to your AI client once. Then say what you want; the agent finds these endpoints, checks the price and calls them on your balance.

Say: Use OneFeedAPI to search WeChat for 咖啡店开业 (café opening), two pages, and list each result's type, account, title and date.

What the agent sends to the call tool: 

```json
{
  "capability": "wechat.posts.search",
  "query": "咖啡店开业",
  "idempotency_key": "<a new UUID>"
}
```

[About the MCP server](https://onefeedapi.com/mcp/)

## Why OneFeedAPI

- Steady: endpoints were available 99.0% of the last 30 days, on a public status page you can check.
- Fast: a paid call took 2.6 seconds at the median over the last 7 days (counted 2026-11-06).
- Fewer tokens: across 6 endpoints on WeChat Search, one recorded real response each, the platform's own JSON comes to 67k tokens and what an AI reads through OneFeedAPI's MCP server to 13k, 81% fewer; the JSON of a direct API call is 71% fewer too (counted 2026-11-06). Every platform answers in one shape: the author in `author`, counts in `metrics`, the next page in `page.next_cursor`, so another platform needs no new parser.
- See before you pay: every endpoint's page shows a recorded real response, field by field.
- Spending you control: a failed call is not charged; each key can have a limit, `X-Max-Price` caps one call, and the same `Idempotency-Key` within 24 hours is never charged twice.
- Ready for AI: a remote MCP server listed in the official MCP registry as `com.onefeedapi/mcp`, usable from Claude, Cursor and ChatGPT.
- Free trial of up to 333 calls, no card.

## Good to know

- WeChat Search gives no account ID, only the account's name. To read an account's other articles, open one article's link with the article endpoint: its `author.id` is the account's original ID.

## The whole script

The task above as one script that runs as it is: Python, the SDK, your key from ONEFEED_API_KEY. It writes a CSV file and ends by printing what it called, fetched and was charged.

```python
# pip install onefeedapi
# export ONEFEED_API_KEY=dx_...   (your key)
import csv
from decimal import Decimal
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()
calls, fetched, charged = 0, 0, Decimal("0")

def run(capability, params):
    """One call; counts it and what it was charged."""
    global calls, charged
    result = dx.call(capability, params)
    calls += 1
    charged += Decimal(str(result["meta"]["billing"]["amount"]))
    return result

QUERY = "咖啡店开业"
PAGES = 2

# WeChat Search results, articles and Channels videos mixed: type says which.
rows, cursor = [], None
for _ in range(PAGES):
    page = run("wechat.posts.search", {"query": QUERY, **({"cursor": cursor} if cursor else {})})
    for item in page["data"]["items"]:
        rows.append([item.get("type"), item.get("published_at"), item["author"].get("name"), item.get("title"), item.get("url")])
    cursor = page["page"]["next_cursor"]
    if not page["page"]["has_more"]:
        break

fetched = len(rows)
with open("wechat-search.csv", "w", newline="", encoding="utf-8") as file:
    csv.writer(file).writerows([["type", "published_at", "account", "title", "url"], *rows])

print(f"calls: {calls}, items: {fetched}, charged: ${charged}")
```

Run for real on 2026-10-29: 2 calls, 40 rows written, $0.0400 charged. A failed call is not charged.

## Endpoints

- [WeChat Search articles and videos](https://onefeedapi.com/apis/wechat/posts/search/)

## More about WeChat Search

- [WeChat Search API](https://onefeedapi.com/apis/wechat/)
- [How to list a WeChat Official Account's past articles](https://onefeedapi.com/guides/wechat-official-account-articles/)
- [How to get WeChat Official Account article reads and likes](https://onefeedapi.com/guides/wechat-article-reads-and-likes/)
- [How to get WeChat Channels video comments](https://onefeedapi.com/guides/wechat-channels-video-comments/)
- [How to list a WeChat Channels account's videos](https://onefeedapi.com/guides/wechat-channels-user-videos/)
- [WeChat Official Account articles API in Python: history and reads (third-party, 2026)](https://onefeedapi.com/guides/wechat-official-account-api-python/)
- [WeChat Channels API in Python: account videos and comments (2026)](https://onefeedapi.com/guides/wechat-channels-api-python/)
- [Is there an API for WeChat Official Account articles?](https://onefeedapi.com/answers/is-there-an-api-for-wechat-official-account-articles/)
- [How do I get WeChat Channels data?](https://onefeedapi.com/answers/how-to-get-wechat-channels-data/)
- [What is __biz in a WeChat article link?](https://onefeedapi.com/answers/wechat-official-account-biz/)
- [What do mid, idx and sn mean in a WeChat article link?](https://onefeedapi.com/answers/wechat-article-link-mid-idx-sn/)
- [What is a WeChat Official Account's original ID (gh_)?](https://onefeedapi.com/answers/wechat-official-account-original-id/)
- [What is a WeChat Channels account ID (…@finder), and what is an export ID?](https://onefeedapi.com/answers/wechat-channels-finder-id/)
- [WeChat returns ret=200013 freq control when listing an account's articles: what now? (2026)](https://onefeedapi.com/answers/wechat-ret-200013-freq-control/)
- [wechat-article-exporter has stopped: what else exports WeChat articles in bulk? (2026)](https://onefeedapi.com/answers/wechat-article-exporter-alternative/)
- [wewe-rss has stopped working: what now? (2026)](https://onefeedapi.com/answers/wewe-rss-not-working/)

---

Catalog revision dc959672dd18e2d0. [HTML version](https://onefeedapi.com/guides/wechat-search-posts/)
