# WeChat Official Account Scraper: Articles as Text & Markdown (`datagleaner/wechat-articles`) Actor

WeChat Official Account (微信公众号) scraper: extract articles from mp.weixin.qq.com links or find them by keyword or account name. Title, account, publish time, text, Markdown, images. No login. $5 per 1,000 articles.

- **URL**: https://apify.com/datagleaner/wechat-articles.md
- **Developed by:** [Data Gleaner](https://apify.com/datagleaner) (community)
- **Categories:** Social media, News, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Official Account Scraper: 公众号 articles as text and Markdown

**Extract public WeChat Official Account (微信公众号) articles from mp.weixin.qq.com links, or find them by keyword or account name, and get title, account, publish time, full text, Markdown and images.** No WeChat login, no cookies, no browser.

**Price: $5 per 1,000 articles** ($0.005 per article, full text included). 10 articles cost 5 cents. Failed or deleted articles are not charged.

### Why use this one

- **No login and nothing of yours at risk.** It reads public article pages only. No WeChat account, QR login or cookies.
- **Clean output for LLM and RAG pipelines.** Plain text and Markdown (images kept as links), plus an optional HTML body, the 原创 original badge and the IP region shown on the article.
- **Three ways in.** Paste article links (most reliable), search by keyword (Chinese works best), or search by account name.
- **Runs through Apify Proxy by default,** because keyword search showed a block on a datacenter IP without it.
- **Honest limits:** keyword and account discovery relies on Sogou's public WeChat search (about 100 recent articles per query, best effort for account names); read and like counts are not public, so they are not in the output.

### Minimal input

```json
{"searchKeywords": ["新能源汽车"], "maxArticles": 20, "publishedWithin": "week"}
```

### Sample output row (real platform run, long text shortened)

```json
{
  "articleId": "Njk5MTE1_2652701954_1",
  "title": "杜绝“新马路杀手”，他们为新能源汽车设计声音",
  "accountName": "南方周末",
  "accountId": "nanfangzhoumo",
  "biz": "Njk5MTE1",
  "author": "林子人",
  "publishedAt": "2026-09-29T09:35:43+00:00",
  "publishTimestamp": 1790674543,
  "isOriginal": true,
  "ipRegion": "广东",
  "mid": 2652701954,
  "idx": 1,
  "digest": "▲ 广州南沙,黄阁汽车货运港码头的新能源汽车.(视觉中国/图)全文共5866字,阅读大约需要12分钟他觉得汽车的声音设计只是一...",
  "coverImage": "https://mmbiz.qpic.cn/mmbiz_jpg/Q3auHgzwzM54CUiaNdz8kKdhCZgib0FgqMbjngbb1bfwBicNVIUNQqxGKBW5oh4Avdnf7B7zEIhg3i...",
  "images": [
    "https://mmbiz.qpic.cn/mmbiz_gif/Tjnia6K0WAwwkPLicCXIlLH72QrQ0aaK9yTAGAZgAicrFQxtk5XBtibwZg1MV0icCj4F3heQvRiawN...",
    "https://mmbiz.qpic.cn/sz_mmbiz_jpg/Q3auHgzwzM4LAiaDy0vOUTJE9SC160YuqlogqBphyhtxVYKcJDZVeBCibYjzjXRcsMyclibprSg...",
    "https://mmbiz.qpic.cn/sz_mmbiz_jpg/Q3auHgzwzM6xS65Mas2qwXlVmtBmobM2Klr1AibqJibnsKCWOXhuXIfMuJeI2mmE1DPZC7gXjZu..."
  ],
  "contentText": "▲ 广州南沙，黄阁汽车货运港码头的新能源汽车。（视觉中国/图）\n\n全文共5866字，阅读大约需要12分钟\n\n他觉得汽车的声音设计只是一份谋生的工作而已，从未想过有朝一日城市的街道上奔跑的几乎都是新能源汽车，届时这些车辆发...",
  "contentMarkdown": "![图片](https://mmbiz.qpic.cn/mmbiz_gif/Tjnia6K0WAwwkPLicCXIlLH72QrQ0aaK9yTAGAZgAicrFQxtk5XBtibwZg1MV0icCj4F3heQ...",
  "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1791700648&ver=7019&signature=DGUqn4QoyCG*0CHhG*uR2HGOyOM5F8-Iqq07...",
  "sourceType": "keyword",
  "sourceUrl": null,
  "sourceKeyword": "新能源汽车",
  "scrapedAt": "2026-10-11T06:38:04+00:00"
}
```

### What you get

For each article: title, account name, account ID (`gh_...`), `biz`, `mid` and `idx`, a stable `articleId`, author byline, publish time (`publishedAt` ISO 8601 and `publishTimestamp` Unix seconds), `isOriginal` (the 原创 badge; `null` if the page does not say), `ipRegion` (the IP属地 shown under the title, `null` on articles from before 2022), digest, cover image, every image URL, and the body as plain text, Markdown and/or HTML. The dataset has two views: Articles (a table of metadata) and Content (full Markdown text, one row per article).

### Use cases

- Build a Chinese-language news or industry-monitoring feed (AI, EV, retail, finance).
- Feed Chinese articles to an LLM or RAG pipeline as clean Markdown.
- Export or download articles as Markdown before they are deleted (WeChat removes content often).
- Track what specific Official Accounts publish.

### Input

| Field | Meaning |
|---|---|
| `articleUrls` | Public article links. The most reliable mode. |
| `searchKeywords` | Keywords to discover articles (via Sogou WeChat search). Chinese works best. |
| `accountNames` | Account display names. Best effort: searches the name and keeps results whose account name contains it (case-insensitive). |
| `maxArticles` | Cap per keyword or account (default 20, max 100). The Console prefill is 5. |
| `publishedWithin` | `day`, `week` or `month` (default: any time). Filters keyword and account results after search, so a narrow window may return fewer than `maxArticles`; results with no date are kept. Does not apply to `articleUrls`. |
| `includeContent` | `text`, `markdown`, `html` (default text + markdown). |
| `requestDelaySeconds` | Base pause between requests (default 1.5). |
| `proxyConfiguration` | Default: Apify Proxy (datacenter). |

```json
{
  "articleUrls": ["https://mp.weixin.qq.com/s/_2kC-fXw7UjneZSrsC9CVQ"],
  "searchKeywords": ["新能源汽车"],
  "accountNames": ["新华社"],
  "maxArticles": 20,
  "publishedWithin": "week",
  "includeContent": ["text", "markdown"]
}
```

An empty input runs a 5-article example for the keyword 人工智能, and the Console prefill also runs 5 articles.

### Output

```json
{
  "articleId": "MzY5ODQ1Njg1Ng==_2247483700_1",
  "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1791388858&ver=7012&signature=...",
  "title": "谷歌签下史上最大核电协议，AI的尽头是电",
  "accountName": "海风蓝的专属小站",
  "accountId": "gh_b761fc45617b",
  "biz": "MzY5ODQ1Njg1Ng==",
  "author": null,
  "publishedAt": "2026-10-07T13:33:21+00:00",
  "publishTimestamp": 1791380001,
  "isOriginal": true,
  "ipRegion": "广东",
  "mid": 2247483700,
  "idx": 1,
  "digest": "你以为谷歌最近在忙什么？发布新模型？收购公司？……",
  "coverImage": "https://mmbiz.qpic.cn/...",
  "images": ["https://mmbiz.qpic.cn/..."],
  "contentText": "...",
  "contentMarkdown": "...",
  "sourceType": "keyword",
  "sourceKeyword": "人工智能",
  "sourceUrl": null,
  "scrapedAt": "2026-10-07T16:01:10+00:00"
}
```

For `articleUrls` items, `sourceType` is `articleUrl` and `sourceUrl` is your input link; for discovered items it is `keyword` or `account`, with the query in `sourceKeyword`. `canonicalUrl` appears when the page exposes a permanent link, and `url` then uses it. `contentHtml` appears when you ask for `html`. `articleId` (`biz_mid_idx`) is stable across runs; use it, not `url`, to de-duplicate or monitor, because signed search-result links expire.

### Pricing

Pay per event: **$5 per 1,000 articles** (event `article`, one per article pushed). Example: 300 articles from three keywords cost about $1.50. There is no free-run cap. The run stops pushing once your max total charge is reached. Failed or deleted articles are not charged.

### Limits

- Keyword and account discovery uses Sogou's public WeChat search: at most 10 pages (about 100 articles) per query, recent articles only, and it can show a verification page if hit too fast. The Actor paces itself, retries with a fresh session and, if still blocked, ends discovery for that query with a message. Keep the default Apify Proxy setting for keyword and account search; without a proxy, Sogou blocked a datacenter IP after about 12 articles in testing. Article URLs are not affected.
- When a page exposes no permanent link, an article found through search keeps the signed `url` from the search redirect, which WeChat expires after a while; use `articleId` to identify it long-term.
- Account lookup is best effort: Sogou's account directory is not available anonymously, so only articles surfaced by searching the name are returned.
- Deleted, reported or restricted articles, and some pure video or image-share posts, have no body and are skipped.
- Read and like counts are not public to anonymous visitors, so they are not in the output.

### Use with Python

```python
## pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("datagleaner/wechat-articles").call(run_input={
    "searchKeywords": ["新能源汽车"],
    "maxArticles": 5,
    "includeContent": ["markdown"],
})
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["publishedAt"], item["accountName"], item["title"])
```

Five articles cost about $0.025.

### Use with JavaScript / Node.js

```js
// npm install apify-client
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('datagleaner/wechat-articles').call({
    searchKeywords: ['新能源汽车'],
    maxArticles: 5,
    includeContent: ['markdown'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.publishedAt, item.accountName, item.title);
```

### Use it from n8n, Make, Zapier or an AI agent

Actor ID: `datagleaner/wechat-articles`

Minimal input:

```
{"searchKeywords": ["新能源汽车"], "maxArticles": 5}
```

Each tool below runs this Actor with your own Apify API token.

- **n8n:** add the **Apify** node (`@apify/n8n-nodes-apify`). On n8n Cloud you install it from the community node registry. Choose **Run an Actor and get dataset**, set Actor to `datagleaner/wechat-articles` and paste the input above.
- **Make:** use the Apify app's **Run an Actor** module, then **Get Dataset Items** to read the results. **Watch Actor Runs** can trigger a scenario when a run finishes.
- **Zapier:** use the Apify action **Run Actor**, then the search **Fetch dataset items**. The trigger **Finished Actor run** starts a Zap when a run ends.
- **AI agents (MCP):** connect to `https://mcp.apify.com?tools=datagleaner/wechat-articles`. In Claude Code:

  ```
  claude mcp add --transport http apify "https://mcp.apify.com?tools=datagleaner/wechat-articles"
  ```

  Then run `/mcp` to sign in to Apify in your browser. Other clients can send the header `Authorization: Bearer YOUR_APIFY_TOKEN` instead. Without a token the server only offers search and docs tools, so running the Actor needs one of the two.
- **LangChain (Python):**

```python
## pip install langchain-apify, then set APIFY_TOKEN in your environment
import json
from langchain_apify import ApifyActorsTool
tool = ApifyActorsTool("datagleaner/wechat-articles")
result = tool.invoke({"run_input": json.loads('{"searchKeywords": ["新能源汽车"], "maxArticles": 5}')})
```

Claude Desktop and other clients that use an `mcpServers` config can run Apify's local server instead; the agent finds this Actor with the `search-actors` tool and runs it with `call-actor`:

```json
{
  "mcpServers": {
    "actors-mcp-server": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Example prompt:

> Find the 10 most recent WeChat articles about 新能源汽车, then give me each one's title, account and publish date, and a three-sentence English summary of the Markdown body.

### FAQ

**How do I export a WeChat article to Markdown?** Paste its mp.weixin.qq.com link into `articleUrls` and keep `markdown` in `includeContent`. Each article comes back with `contentMarkdown` plus every image URL, and you can download the dataset as JSON, CSV or Excel.

**Do I need a WeChat account or login?** No. Only public pages are fetched, with no login and no cookies.

**How do I search WeChat Official Account articles by keyword?** Put keywords in `searchKeywords`. Discovery runs through Sogou's public WeChat search, which returns recent articles only, at most about 100 per keyword.

**Can it download every article of one Official Account?** No. There is no public account archive, so `accountNames` keeps the search results published by that account, and a quiet account may return few. Supply links for full coverage.

**Does it return read and like counts?** No. WeChat does not show them to anonymous visitors, so the Actor does not output them.

### Responsible use

This Actor reads publicly available pages only. You are responsible for using the data lawfully, including copyright and any personal-data obligations (for example GDPR or PIPL) that apply to what you collect and store.

# Actor input Schema

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

Public WeChat article links, for example https://mp.weixin.qq.com/s/AbCdEf... or https://mp.weixin.qq.com/s?\_\_biz=...\&mid=...\&sn=.... Most reliable mode.

## `searchKeywords` (type: `array`):

Find recent public articles by keyword, Chinese works best (for example 人工智能, 新能源汽车). Uses Sogou WeChat search, which returns at most about 100 articles per keyword.

## `accountNames` (type: `array`):

Official Account display names, for example 36氪. Finds articles whose search results come from an account with that name, so a quiet account may return few articles. Account lookup is best effort.

## `maxArticles` (type: `integer`):

Upper bound for each keyword and each account. Article URLs are always all fetched. Sogou stops at about 100 per query.

## `publishedWithin` (type: `string`):

Keep only keyword and account results published in the last day, week or month. Applied after search, so a narrow window may return fewer than the max. Does not affect article URLs.

## `includeContent` (type: `array`):

Which body formats to return: text, markdown, html. Images are always listed.

## `requestDelaySeconds` (type: `number`):

Base pause between requests; the actual pause is randomised up to 1.5x. Raise it if search starts returning verification pages.

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

Apify Proxy (datacenter) by default: Sogou blocks keyword search from a single IP after a dozen or so articles. A new IP is used each time a session restarts.

## Actor input object example

```json
{
  "searchKeywords": [
    "人工智能"
  ],
  "maxArticles": 5,
  "publishedWithin": "",
  "includeContent": [
    "text",
    "markdown"
  ],
  "requestDelaySeconds": 1.5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `articles` (type: `string`):

No description

## `content` (type: `string`):

No description

## `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 = {
    "searchKeywords": [
        "人工智能"
    ],
    "maxArticles": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datagleaner/wechat-articles").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 = {
    "searchKeywords": ["人工智能"],
    "maxArticles": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("datagleaner/wechat-articles").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 '{
  "searchKeywords": [
    "人工智能"
  ],
  "maxArticles": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call datagleaner/wechat-articles --silent --output-dataset

```

## MCP server setup

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

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/bAbYsPuLHgm6elr7a/builds/WzatxbeqoVm06YV0F/openapi.json
