# WeChat Official Account Scraper (`automly/wechat-official-account-scraper`) Actor

Scrape WeChat Official Account (公众号) articles by keyword, account name, album (合集) or article link: title, account, publish date, digest, cover, and the full text with images, author, region, original badge and hashtags. No login.

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

## Pricing

from $2.29 / 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.
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 Official Account Scraper

WeChat Official Account Scraper collects **WeChat Official Account articles (公众号文章)** by keyword, by account name, from albums (合集) and from article links you already have. Each article comes with its title, account, publish date, digest and cover, and, by default, **the full text** with images, author, the account's WeChat ID and description, publishing region (发表于), the original (原创) badge and hashtags. No WeChat account, login or cookies needed.

Built for China market research, brand and media monitoring, competitor tracking, Chinese-language datasets, translation and AI pipelines.

### What you can scrape

| Input | What you get |
|---|---|
| Keywords | Up to about 100 articles per keyword, in search order or newest first |
| Official Account names | The account's articles that WeChat search shows (up to about 100), newest first |
| Album (合集) links | Every article in the album, newest first, with permanent links |
| Article links | The full article |

Turn off **Include full text** to get only the list data (title, account, date, digest, cover, link): faster and cheaper.

### How much does it cost to scrape WeChat articles?

You pay per article saved. An article with its full text and details is charged instead of, not on top of, the list price.

| Apify plan | Articles per 1,000 (list data) | Articles with full text per 1,000 |
|---|---|---|
| Free | $2.99 | $9.99 |
| Starter (Bronze) | $2.79 | $8.99 |
| Scale (Silver) | $2.49 | $7.99 |
| Business (Gold) and higher | $2.29 | $6.99 |

A run also has a start fee of **$0.005 per run** at the default settings. Platform usage is included in these prices, so you pay nothing else for the run.

Example: 1,000 articles with full text cost $9.99 on the Free plan and $6.99 on Business; with **Include full text** off, the same 1,000 cost $2.99 and $2.29. **Max results per input** keeps a run's cost under control, and you can also set a maximum cost per run. Every Apify account gets **$5 of free usage each month**, enough for about 500 full articles or 1,650 list rows on the Free plan.

### Input examples

Three topics, the newest articles first, last 7 days only:

```json
{
  "searchQueries": ["新能源汽车", "跨境电商", "人工智能"],
  "maxResultsPerInput": 50,
  "sortBy": "latest",
  "publishedAfter": "7 days"
}
```

An Official Account's articles, list data only:

```json
{ "accounts": ["36氪"], "maxResultsPerInput": 100, "includeContent": false }
```

A whole album, and two articles you already have:

```json
{
  "albumUrls": ["https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzIzNjc1NzUzMw==&action=getalbum&album_id=1865468163396517889"],
  "articleUrls": ["https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw"],
  "maxResultsPerInput": 500
}
```

### Output example

A real row from a run on 2026-10-24, long fields trimmed:

```json
{
  "articleId": "MzIzNjc1NzUzMw==-2247780992-1",
  "title": "“老黄骗人”！5070首批评测：说好1/3价格赛4090，实际不如4070Ti",
  "url": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw",
  "urlIsTemporary": false,
  "accountName": "量子位",
  "accountId": "gh_114e76fd6e5d",
  "accountWechatId": "QbitAI",
  "accountBiz": "MzIzNjc1NzUzMw==",
  "author": "关注前沿科技",
  "publishedAt": "2025-03-05T04:22:09Z",
  "digest": "博主：史上最差70系列",
  "coverImage": "https://mmbiz.qpic.cn/mmbiz_jpg/YicUhk5aAGtB8zqMsOsFEsStNXL6hpuYE.../0?wx_fmt=jpeg",
  "articleType": "article",
  "isOriginal": true,
  "ipRegion": "北京",
  "hashtags": [],
  "sourceUrl": null,
  "content": "金磊 发自 凹非寺\n量子位 | 公众号 QbitAI\n一夜之间，RTX 5070被网友们喷成“史上最差的70系列”了。...",
  "contentLength": 3002,
  "images": ["https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtB8zqMsOsFEsStNXL6hpuYE.../640?wx_fmt=png"],
  "imageCount": 17,
  "accountDescription": "追踪人工智能新趋势，关注科技行业新突破",
  "accountAvatar": "http://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtCEFSVW5ubo08Zfv1qB5iap.../0?wx_fmt=png",
  "accountOriginalArticles": 4137,
  "messageId": "2247780992",
  "indexInMessage": 1,
  "position": 1,
  "sourceType": "link",
  "source": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw",
  "scrapedAt": "2026-10-24T11:16:16Z"
}
```

### Output fields

| Field | What it is |
|---|---|
| `articleId` | Permanent identity of the article (account \_*biz, message id, position) |
| `resultKey` | Stable key of a keyword or account result, the same in every run: use it to skip what you already have |
| `title`, `digest`, `coverImage`, `publishedAt` | What the article list shows; dates are UTC |
| `url`, `urlIsTemporary` | The article link; links from keyword and account results work for some hours, album rows and pasted links are permanent |
| `accountName`, `accountId`, `accountWechatId`, `accountBiz` | The Official Account: name, original ID (gh*...), WeChat ID (微信号), \_\_biz |
| `accountDescription`, `accountAvatar`, `accountOriginalArticles` | The account's description, avatar and count of original articles |
| `author`, `articleType`, `isOriginal`, `ipRegion`, `hashtags`, `sourceUrl` | Byline, article / image_post / video, 原创 badge, region under 发表于, #topics, 阅读原文 link |
| `content`, `contentLength`, `images`, `imageCount` | Full text (one paragraph per line), its length, every picture in the body |
| `contentHtml` | The body as HTML, with **Include the article's HTML** on |
| `albumTitle`, `albumPosition` | On album rows: the album and the article's number in it |
| `messageId`, `indexInMessage` | The post the article was sent in and its place in it |
| `position`, `sourceType`, `source`, `scrapedAt` | Rank in its input's results, input type, the input, when it was saved |

The Output tab has two views: **Articles** and **Full text and accounts**. A run report (inputs read, articles saved, inputs not found) is in the key-value store as `report-summary`.

### Good to know

- **About 100 articles per keyword or account.** That is all WeChat search shows without signing in. Use several narrower keywords to reach more.
- **Accounts:** you get the account's articles that WeChat search shows, which is often not its full history. If the account has albums (合集), add their links to read them in full.
- **Latest first and Published after** work on the articles each input lists; they do not reach older results.
- **Read, like and share counts and comments** are shown only inside the WeChat app, not on public pages, so they are not in the output.
- An article that was deleted, or a link that does not exist, is listed as "not found" in the run status and the report, not as a failed run.
- An article found by several inputs is saved once.
- Email addresses and phone numbers in article text are replaced with `[removed]`.

### FAQ

**How much does it cost?** $2.99 per 1,000 articles on the Free plan, or $9.99 with the full text, down to $2.29 and $6.99 on Business, plus a $0.005 start fee per run. See [How much does it cost to scrape WeChat articles?](#how-much-does-it-cost-to-scrape-wechat-articles) above for every plan.

**Do I need a WeChat account?** No. Nothing to sign in to, no cookies.

**Can I monitor keywords every day?** Yes: save the input as a task and schedule it, with **Latest first** and **Published after** set to `1 day`. Use `resultKey` to skip articles you already stored.

**Which links work in Article links?** Short links (`https://mp.weixin.qq.com/s/...`) and full links copied from WeChat (with `__biz`, `mid`, `idx`, `sn` and `chksm`).

**Can I get the HTML for archiving?** Yes, turn on **Include the article's HTML**.

# Actor input Schema

## `searchQueries` (type: `array`):

Find WeChat Official Account articles by keyword, one per line, e.g. 人工智能, 新能源汽车, 跨境电商 or a brand name. Chinese keywords find the most. Each keyword gives up to about 100 articles, the most WeChat search shows without signing in.

## `accounts` (type: `array`):

Articles from specific Official Accounts (公众号), one per line, e.g. 36氪 or 人民日报. Use the account's name exactly as WeChat shows it. Gives the account's articles that WeChat search shows (up to about 100), newest first; this is not always the account's full history.

## `albumUrls` (type: `array`):

Album links, e.g. https://mp.weixin.qq.com/mp/appmsgalbum?\_\_biz=...\&album_id=... Each gives every article in the album, newest first, with its permanent link, up to 'Max results per input'.

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

WeChat article links you already have, e.g. https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw or a full link with \_\_biz, mid, idx, sn and chksm (copy the whole link). Each returns the full article.

## `maxResultsPerInput` (type: `integer`):

Most articles to save per keyword, account or album, e.g. 20. Keywords and accounts stop at about 100 (all WeChat search shows); albums go to their first article.

## `includeContent` (type: `boolean`):

On: open every article and add its full text, images, author, the account's WeChat ID, description and avatar, publishing region, original (原创) badge, hashtags and article type. Off: only what the list shows (title, account, date, digest, cover, link), faster and cheaper. Article links always come with the full text.

## `includeHtml` (type: `boolean`):

With full text on, also return the article body as HTML in contentHtml (layout, links and images), e.g. for archiving. Rows get much larger.

## `sortBy` (type: `string`):

Relevance keeps WeChat search's own order. Latest first puts the newest of the up to 100 articles first (it reorders them; it does not reach older results). Accounts are always newest first.

## `publishedAfter` (type: `string`):

Keep only articles published on or after this date, e.g. 2026-10-01, or within a period like 7 days or 2 weeks. Applied to the articles each input lists; leave empty for any date.

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

Leave the default.

## Actor input object example

```json
{
  "searchQueries": [
    "人工智能"
  ],
  "maxResultsPerInput": 20,
  "includeContent": true,
  "includeHtml": false,
  "sortBy": "relevance",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `fullText` (type: `string`):

No description

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

No description

## `report` (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 = {
    "searchQueries": [
        "人工智能"
    ],
    "maxResultsPerInput": 20,
    "includeContent": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/wechat-official-account-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 = {
    "searchQueries": ["人工智能"],
    "maxResultsPerInput": 20,
    "includeContent": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/wechat-official-account-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 '{
  "searchQueries": [
    "人工智能"
  ],
  "maxResultsPerInput": 20,
  "includeContent": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/wechat-official-account-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/wechat-official-account-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/wbGN33QuhmhsE8E5H/builds/uK4Aifiq56SzRxXjz/openapi.json
