# WeChat Article Scraper - Official Account Posts by Keyword (`conversational_kermis/wechat-article-scraper`) Actor

WeChat official-account (公众号) articles by keyword or link: title, account, author, publish time, full text, Markdown and images. $3 per 1,000 articles; search-only rows $0.50 per 1,000. For China market research and Chinese AI datasets. No login.

- **URL**: https://apify.com/conversational_kermis/wechat-article-scraper.md
- **Developed by:** [the anh nguyen](https://apify.com/conversational_kermis) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 article with full texts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## WeChat Article Scraper - Official Account Posts by Keyword

Search WeChat official-account (公众号) articles by keyword and get one clean row per result: title, account, publish time, digest, cover image and link. Paste article links and get each article in full: author, exact time, **full text, Markdown and image URLs**.

Keyword search goes through Sogou WeChat search (weixin.sogou.com), the only public search engine that indexes WeChat articles. Article pages are read from mp.weixin.qq.com. Plain HTTP, no browser and no WeChat login.

> **Current state (12 November 2026):** WeChat now answers the links Sogou search hands out with a captcha, from every IP we tried. Search results still come back with their title, account, time, digest, cover and link, and are charged as search results ($0.0005), not as articles. Full text works for article links you give in `articleUrls` (`https://mp.weixin.qq.com/s/...`). The Actor still tries each search link first; if WeChat lifts the captcha, full text from search returns without a change on your side.

### Why this one

- **Full text from article links.** Each article you link is opened and its body returned as plain text (one paragraph per line) and as Markdown with images in place, plus the list of image URLs.
- **You pay for what you got.** Every row says in `rowType` whether it is a full `article` or a `search-result`, and is charged at that price.
- **Picture posts too.** WeChat's picture posts (图片消息) keep their words outside the normal article body. They are read from the page's own data, so they come back with text and pictures instead of empty rows.
- **Exact publish time and stable id.** Publish time from the article itself (ISO 8601 UTC), the account's `gh_` id, the author, the IP location WeChat shows, and an `articleId` that stays the same when the link changes.
- **No junk rows, no charge for them.** An article row is saved only when it has a title, an account and a body; a search-result row only when it has a title, an account and a link. Deleted articles and error pages are skipped and not charged.
- **Cheap search-only mode.** Turn off *Fetch full article* to get titles, accounts, times, digests and links at a sixth of the price.

### What you can use it for

- Monitoring what Chinese official accounts write about a brand, product, competitor or policy
- Research datasets of Chinese-language articles on a topic, with full text for NLP or LLM pipelines
- Following an industry in China: AI, EVs, consumer electronics, healthcare, education, finance
- Archiving specific articles you have links to, as text and Markdown

### Input

| Field | Type | Description |
|-------|------|-------------|
| `queries` | array of strings | Keywords for Sogou WeChat search, one per line, e.g. `人工智能`, `新能源汽车`. Chinese keywords find far more than English ones. |
| `articleUrls` | array of strings | WeChat article links: `https://mp.weixin.qq.com/s/...` or `https://mp.weixin.qq.com/s?__biz=...`. Opened directly, no Sogou; always returned in full. |
| `maxItems` | integer | Articles per query. At most 100 (Sogou shows anonymous visitors 10 pages of 10). `0` = 100. Default `20`. |
| `fetchContent` | boolean | Try to open each search result for full text, Markdown, images, author and exact time. Default `true`. Results WeChat refuses (currently most) are saved as search results. Off = search results only, faster. |
| `proxyConfiguration` | object | Apify proxy. The default datacenter proxy works. |

#### Keyword search

```json
{
  "queries": ["人工智能"],
  "maxItems": 20
}
```

#### Several topics, search results only

```json
{
  "queries": ["新能源汽车", "比亚迪", "固态电池"],
  "maxItems": 50,
  "fetchContent": false
}
```

#### Articles you already have links to

```json
{
  "articleUrls": [
    "https://mp.weixin.qq.com/s/_2kC-fXw7UjneZSrsC9CVQ"
  ]
}
```

### Output

One row per article or search result. A full `article` row from a run on 11 November 2026, before WeChat added the captcha (text, Markdown and image list shortened here). A `search-result` row has the same fields, with `text`, `markdown`, `accountId`, `author`, `articleId` and `contentType` set to `null`:

```json
{
  "title": "商家省力，消费者省时：今年双11的AI含量有多高？",
  "accountName": "第一财经",
  "accountId": "gh_7fbf45a6a562",
  "author": "陆涵之",
  "publishTime": "2026-11-11T16:15:00Z",
  "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1794437013&ver=7083&signature=kIB2x6H36ktzgOGT…",
  "rowType": "article",
  "coverImage": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/1NNic30RcBCKg2DolmBia7Tu4bcJKK2F25oqGwNlR5oHj22icTnQicQ8c3ZgbUhRfcwhzCyCm9STVss9XIL4z6977ToKGyjcgYb2c3lTibpqhRY8/0?wx_fmt=jpeg",
  "digest": "天使投资人、资深人工智能专家郭涛对第一财经记者表示,本届被称作AI含量最高的一届,一方面是头部平台统一把AI购物入口前置,...",
  "text": "2026.11.12\n本文字数：2487，阅读时长大约4分钟\n作者 | 第一财经 陆涵之\n今年双11被称为“AI含量最高”的一届。\n和去年的试水不同，今年双11 AI深度参与购物链路的多个场景。…",
  "markdown": "2026.11.**12**\n\n![](https://mmbiz.qpic.cn/sz_mmbiz_jpg/1NNic30RcBCLgIgxibcC6S7iciaKQW1qox8GHAK3iaj0icUHotbooocdVPyRARR9MUtPc5hpVv9xr0Fy6PMLhIn0ic6bCu79ulhlL1jKZ…",
  "imageUrls": [
    "https://mmbiz.qpic.cn/sz_mmbiz_jpg/1NNic30RcBCLgIgxibcC6S7iciaKQW1qox8GHAK3iaj0icUHotbooocdVPyRARR9MUtPc5hpVv9xr0Fy6PMLhIn0ic6bCu79ulhlL1jKZKp9zAUED4/640?wx_fmt=jpeg&from=appmsg",
    "…"
  ],
  "contentType": "article",
  "location": "上海",
  "articleId": "MjM5MTM3NTMwNA==_2661840482_2",
  "query": "人工智能",
  "page": 1,
  "position": 2,
  "scrapedAt": "2026-11-11T22:43:51Z"
}
```

| Field | Notes |
|-------|-------|
| `title`, `accountName` | Article title and the official account that published it. Always present. |
| `accountId` | The account's original id (`gh_...`). Full-article rows only. |
| `author` | Author line under the title, when the account sets one. |
| `publishTime` | ISO 8601 UTC. Exact on full-article rows; on search-only rows it is Sogou's time, which can be a few minutes later. |
| `url` | The article link. **From a search it is temporary** (see Limits). From `articleUrls` it is the link you gave. |
| `rowType` | `article` (full text, charged as an article) or `search-result` (Sogou's data only, charged as a search result). |
| `coverImage` | Cover image URL. |
| `digest` | The account's summary, or Sogou's snippet when the account wrote none. |
| `text` | Full text, one paragraph per line. `null` in search-only mode. |
| `markdown` | Body as Markdown: headings, bold, links, lists and images in place. `null` in search-only mode. |
| `imageUrls` | Images in the body, in order. For picture posts, the pictures. |
| `contentType` | `article` (regular article) or `images` (picture post), the two kinds seen in testing; other WeChat post types get their own label. |
| `location` | Province or country WeChat shows as the publishing IP location, when present. |
| `articleId` | Stable id: the account's `__biz`, message id and position (`biz_mid_idx`). Use it to deduplicate across runs. |
| `query`, `page`, `position` | Which search, Sogou result page and place on that page found the row. `null` for `articleUrls`. |
| `scrapedAt` | When the row was scraped, UTC. |

In that 11 November run, all 20 rows had a title, account and text: 15 regular articles and 5 picture posts, 400 to 13,800 characters of text each.

### Use it from Python

```bash
pip install apify-client pandas
```

Which official accounts write most about a topic (search only, $0.0005 a row):

```python
from apify_client import ApifyClient
import pandas as pd

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("conversational_kermis/wechat-article-scraper").call(run_input={
    "queries": ["新能源汽车", "比亚迪", "固态电池"],
    "maxItems": 50,
    "fetchContent": False,
})
df = pd.DataFrame(client.dataset(run["defaultDatasetId"]).iterate_items())
print(df.groupby(["query", "accountName"]).size().sort_values(ascending=False).head(20))
```

Run it daily on a schedule and diff on `title` + `accountName` for a cheap Chinese media monitor.

Full text and Markdown for articles you have links to, ready for an LLM summary or translation step:

```python
run = client.actor("conversational_kermis/wechat-article-scraper").call(run_input={
    "articleUrls": ["https://mp.weixin.qq.com/s/_2kC-fXw7UjneZSrsC9CVQ"],
})
for a in client.dataset(run["defaultDatasetId"]).iterate_items():
    with open(f'{a["articleId"]}.md', "w", encoding="utf-8") as f:
        f.write(a["markdown"])
```

### Pricing

Pay per result, no start fee:

- **$0.003 per article** with full text (`rowType: article`): $3 per 1,000.
- **$0.0005 per search result** (`rowType: search-result`): $0.50 per 1,000. This covers `fetchContent` off, and search results whose article WeChat refused to show.

You pay only for rows in the dataset. Articles that could not be loaded (deleted, removed, blocked) and duplicates are skipped and not charged. If you set a maximum cost for a run, the Actor stops once the budget is used up.

### Limits

- **Search covers what Sogou indexes:** articles of WeChat official accounts (公众号). Not Moments, Channels (视频号), chats, or articles Sogou has not indexed. Sogou's own ranking decides the order; the Actor has no date or account filters.
- **At most 100 results per query.** Sogou shows anonymous visitors 10 pages of 10 results (page 1 had 9 in our runs). Use more specific keywords, or several, to cover more.
- **Links from a search are temporary.** Sogou hands out `mp.weixin.qq.com/s?src=11&timestamp=...&signature=...` links that carry a timestamp and signature and expire; treat them as short-lived. Save the text when you scrape (that is what full-article mode is for) and use `articleId` as the lasting key. Links you pass in `articleUrls` are kept as they are.
- **Sogou shows a captcha under volume.** When it does, the Actor switches to a new proxy IP and retries the page, up to 5 times, then gives up on that query with a warning in the log and moves to the next one. Runs with many queries in a row are the most likely to hit it. A run that saves no rows at all fails with a message saying why, and costs nothing in results.
- **WeChat shows a captcha instead of the article** for links from Sogou search (since 12 November 2026, for nearly all of them). The Actor tries each link directly and through the proxy; a result that still fails is saved as a `search-result` row. After 5 refusals in a row the run stops opening search links, so it stays fast. An article link from `articleUrls` that WeChat refuses is skipped and not charged.

### FAQ

**Can I scrape all articles of one official account?**
Not directly: Sogou search returns articles matching keywords, not an account's full history. Searching the account's name usually returns many of its recent articles.

**Does it work with English keywords?**
Yes, but WeChat is Chinese-language; `AI` finds much less than `人工智能`.

**Why are some search runs slower than others?**
Every result link has to be resolved through Sogou, and article pages are large (2-4 MB each). When Sogou or WeChat asks for verification, the retries add a few seconds per page.

**How do I get full text for articles I found by search?**
Open the article in WeChat or a browser, copy its permanent link (`https://mp.weixin.qq.com/s/...`) and pass it in `articleUrls`.

# Actor input Schema

## `queries` (type: `array`):

Keywords to search on Sogou WeChat search (weixin.sogou.com), one per line, e.g. 人工智能 or 新能源汽车. Chinese keywords find far more than English ones. Each query returns up to Max articles per query, in Sogou's order.

## `articleUrls` (type: `array`):

WeChat article links (https://mp.weixin.qq.com/s/... or https://mp.weixin.qq.com/s?\_\_biz=...), one per line. These are opened directly, without Sogou, and always return the full article (charged as an article).

## `maxItems` (type: `integer`):

Stop each query after this many articles. Sogou shows at most 10 pages of 10 results to anonymous visitors, so the most a query can return is 100. 0 = as many as Sogou shows (100).

## `fetchContent` (type: `boolean`):

Try to open every search result for its full text, Markdown, image URLs, author and exact publish time (charged per article). WeChat currently answers most links from Sogou search with a captcha; those results are saved without the text and charged as search results. Turn off for search results only: title, account, publish time, digest, cover and link (charged per search result, about 6x cheaper, and much faster). Links in Article URLs are always opened in full.

## `proxyConfiguration` (type: `object`):

Apify Proxy. Sogou shows a captcha to IPs that search a lot; the Actor then switches to a new proxy session (new IP) and retries. The default datacenter proxy works. Article pages are first requested from the Actor's own connection and fall back to the proxy.

## Actor input object example

```json
{
  "queries": [
    "人工智能"
  ],
  "maxItems": 20,
  "fetchContent": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "人工智能"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("conversational_kermis/wechat-article-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["人工智能"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("conversational_kermis/wechat-article-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "人工智能"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call conversational_kermis/wechat-article-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,conversational_kermis/wechat-article-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sVdaNf75xkoHKRdIH/builds/0e7zIMOcn43I38S45/openapi.json
