# WeChat Official Account Articles Scraper (`nice_dev/wechat-articles-scraper`) Actor

Scrape WeChat Official Account (公众号) articles by keyword, link, album or account, no login: full text, Markdown, images, permanent link, author, date, IP region, original badge, album. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/nice_dev/wechat-articles-scraper.md
- **Developed by:** [Nice Dev](https://apify.com/nice_dev) (community)
- **Categories:** Social media, News, MCP servers
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.86 / 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

### 📰 What is WeChat Official Account Articles Scraper?

**WeChat Official Account Articles Scraper** extracts **articles of [WeChat](https://mp.weixin.qq.com) Official Accounts (公众号)**: **title, summary, account, publication date and cover** for every article, and with **Full article** on the **full text, Markdown, images, author, permanent link, original badge (原创), IP region, hashtags and album**. Search by keyword, paste article or album links, or list accounts. It works as a **WeChat API alternative**: run it on a schedule, call it from your code, or plug it into Make, Zapier or n8n — for media monitoring, market research in China, brand tracking or AI datasets.

Type a **keyword** (`人工智能`) or paste WeChat links, click **Start**, and download the articles in JSON, CSV or Excel. No WeChat account needed, nothing to set up, and it is **fast: about 90 articles from a keyword in about 40 seconds**, or 86 full articles (text, images, permanent link) in about 5 minutes.

### 📋 What data can you extract from WeChat?

One item per article (plus optional account rows and the rows of the data options), 63 fields in all, 56 of them on an article:

| Category | What you get |
| --- | --- |
| 📰 **Article** | title, summary, cover image, publication date and time, article ID — `锂电池及新能源车板块，齐跌！` |
| 🔗 **Links** | permanent link that never expires, temporary search link, "Read the original" link |
| 📝 **Content** | full text (one paragraph per line), Markdown, raw HTML, text length, content type (article, video, audio…) |
| 🖼️ **Media** | every image of the body with its width and height, image count, embedded video IDs |
| ✍️ **Author and badges** | author's byline, original badge (原创), paid article, IP region and country of publication — `广东` |
| 🏢 **Account** | account name, WeChat ID, original `gh_` ID, biz, verified, subscription or service account — `中国基金报` |
| 👤 **Account profile** | description, avatar, number of its articles in the run, its newest article (one row per account) |
| 📚 **Album (合集)** | album title, link, size and the article's position in it — `港股日报`, 463 articles |
| 🏷️ **Topics** | WeChat hashtags of the article; your own free labels (`matchedLabels`) from the keywords you give |
| 🔎 **Search context** | keyword, results page and rank, estimated number of results, where the article was found |
| 📈 **Data options** (paid, off by default) | the **WeChat Index** of your keywords over 30 days, and the **search suggestions** WeChat gives for them |

Every field, with an example, is listed in the **Output** section below.

The search-card fields (title, summary, account name, date, cover, link) are always there — except the summary of an album line, which comes with **Full article** only. The text, images, author, permanent link, badges, IP region, hashtags and album are filled when **Full article** (`extractDetails`) is on — off by default, charged apart. Read counts, likes and comments are not shown by WeChat outside its app: they are never returned as fake zeros.

### ✅ Why use WeChat Official Account Articles Scraper?

- 🚀 **Fast**: about 90 articles from a keyword in about 40 seconds; 86 full articles with text and images in about 5 minutes.
- 🧩 **Five ways in, one run**: keywords, article links, album links, WeChat search links and account names, all at once — no mode to choose.
- 🔗 **Permanent links**: articles of an album, and pasted links of any kind (short, temporary or search links), come back with the link that never expires and their IDs.
- 📚 **Whole albums (合集)**: paste an album link, or any article of it, and get every article of the album, newest first.
- 📝 **Ready for AI and analysis**: full text, Markdown with headings and images kept, every image with its size.
- 🔔 **Monitoring built in**: tick **Only new articles**, schedule the Actor, and each run returns (and charges as articles) only what it has never delivered before.
- 📅 **Date filters**: `postedAfter: "7 days"` — filtered-out articles are not saved, never count in `maxItems`, and their page is not opened.
- 🔌 API, scheduling, monitoring, integrations (Make, Zapier, n8n, Google Sheets…) and JSON/CSV/Excel export via the Apify platform.

### 🚀 How to scrape WeChat articles

1. Create a free Apify account.
2. Open **WeChat Official Account Articles Scraper** and type a **Search keyword** (e.g. `人工智能`), Chinese or English.
3. Or fill any of the other inputs: **Article links**, **Album (合集) links**, **Sogou WeChat search links** or **Official accounts** — they all add up in one run.
4. Set **Max articles** (20 in the form, 100 by default through the API, 0 = no limit), tick **Full article** if you want the text and images, then click **Start**.
5. Download the dataset in JSON, CSV, Excel or via API.

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

This Actor uses **pay per event** pricing: you pay for the articles you get, and only for the options you tick. The prices of each event, for every Apify plan (higher plans pay less), are in the **Pricing** tab:

- **Article** (`result`): every article row saved — from a search, an album, an account, a pasted link or the history.
- **Full article** (`article-content`), on top of the article: an article page read with **Full article** on (text, images, permanent link…). A row without content (deleted page, check page) is never charged as a full article.
- **Link conversion** (`link-conversion`), on top of the article: a pasted article link with **Full article** off, turned into its permanent link and IDs, without the text.
- **Account profile** (`account-profile`): one account row, with **Account profiles** on. Account rows never take the place of an article in **Max articles**.
- **Search statistics** (`market-stats`): one sheet of figures per search, with **Statistics per search** on, charged once per sheet at the end of the run. A search with no article delivered has no sheet and costs nothing.
- **WeChat Index** (`wechat-index`): one row per keyword, with **WeChat Index** on; charged for each keyword looked up, also when WeChat has no data for it (no row then).
- **Search suggestions** (`search-suggestions`): one row per keyword, with **Search suggestions** on; charged for each keyword looked up, also when WeChat has no suggestion for it (no row then).
- **History article** (`history-article`), on top of the article: an article read from an account's full history, with the optional WeChat login.
- **Filter check** (`filter-check`): an article read and dropped by one of the Actor's own filters (date or keywords), or, with **Only new articles**, an article already delivered that the run reads again (once per article and per run). Lower than an article — filtering never costs more than taking everything.
- A small fee per run start (`apify-actor-start`).

Platform usage (compute, proxy) is included in the price. Every option is off by default: tick only what you need. The two data options (WeChat Index, Search suggestions) are for a **paid Apify plan only**: on the free plan they are skipped, with a message in the log, and nothing is charged.

### ⚙️ Input

```json
{
    "query": "人工智能",
    "maxItems": 100
}
```

Several keywords, the full text, a cap per keyword, only recent articles, only the ones not delivered before:

```json
{
    "searchQueries": ["人工智能", "区块链"],
    "maxItemsPerQuery": 50,
    "extractDetails": true,
    "postedAfter": "7 days",
    "onlyNew": true,
    "stateKey": "ai-news"
}
```

Or with links and accounts, all in one run:

```json
{
    "articleUrls": ["https://mp.weixin.qq.com/s/4gG0wmpjHS9"],
    "albumUrls": [
        "https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA5MDEzNjQwMA==&action=getalbum&album_id=3080785052776808449"
    ],
    "searchUrls": ["https://weixin.sogou.com/weixin?type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&ie=utf8"],
    "accounts": ["中国基金报"],
    "extractDetails": true,
    "includeAccountProfiles": true,
    "maxItems": 500
}
```

| Field | Notes |
| --- | --- |
| `query`, `searchQueries` | Article search, Chinese or English, exactly as typed in WeChat (`人工智能`); `searchQueries` adds more keywords, one search each. WeChat shows about 100 articles per keyword: add keywords to get more. |
| `articleUrls` | Article links of any form: permanent, short (`https://mp.weixin.qq.com/s/4gG0wmpjHS9`), temporary or redirect links from WeChat search. With `extractDetails` the whole article; without, a link conversion (permanent link when WeChat reveals it, IDs, account, title, date, no text). Up to 1,000 links. |
| `albumUrls` | Album (合集) links (`https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA5MDEzNjQwMA==&action=getalbum&album_id=3080785052776808449`) or an article link of the album: every article of the album, newest first, with its permanent link. Up to 200 albums. |
| `searchUrls` | Search-result links copied from weixin.sogou.com (`https://weixin.sogou.com/weixin?type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&ie=utf8`); pagination is automatic. |
| `accounts` | Account names (`中国基金报`), WeChat IDs (`chinafundnews`) or an article link of the account. Without login: the account's most visible articles (about 100 at most). With the login below: its full history. |
| `maxItems`, `maxItemsPerQuery` | Stop after this many articles for the whole run, and for EACH keyword, search link, album or account (`0` = no limit). Keywords, search links, albums and accounts add up (max 500 searches per run). |
| `maxPagesPerQuery` | Search-result pages read per keyword or search link, 10 articles each (`10` = all that WeChat shows). |
| `extractDetails`, `includeMarkdown`, `includeHtml` | Full article (off by default, charged apart): text, author, images, permanent link, badges, IP region, hashtags, album. Markdown (on, free) and raw HTML (off, free, large) of the body come with it. |
| `includeAccountProfiles` | One more row per account that has an article in the results: description, avatar, IDs, verified, number of its articles in the run, newest article. Charged per account. |
| `includeMarketStats` | One sheet of figures per search (keyword, album, account or pasted Sogou link), in the MARKET_STATS record of the key-value store: articles delivered and results announced, first and last date, articles per day (Beijing time, UTC+8), accounts and the top 10 accounts, shares of original and paid articles, article types, articles with images, average text length, top 10 hashtags, IP regions. Counted on the articles of this run only; each share comes with the number of articles that give the value (most page fields need `extractDetails`). Off by default, charged per sheet. |
| `includeWechatIndex` | **WeChat Index** (paid option, paid Apify plan only): one row of type wechat-index per keyword of `query` / `searchQueries` with its WeChat Index, one value a day over the last 30 days (Beijing calendar), the latest value and the change over the period. Charged per keyword looked up, also when WeChat has no data for it. |
| `includeSearchSuggestions` | **Search suggestions** (paid option, paid Apify plan only): one row of type search-suggestions per keyword with the words WeChat search suggests, in its order. Charged per keyword looked up, also when WeChat has no suggestion for it. |
| `suggestionScope` | With **Search suggestions**: the part of WeChat search the suggestions come from (`ALL` by default, or `ACCOUNT`, `ARTICLE`, `CHANNEL`, `MOMENTS`, `LIVE`, `EMOJI`, `AUDIO`, `BOOK`, `WECHAT_INDEX`, `NEWS`, `MINI_PROGRAM`, `ENCYCLOPEDIA`). |
| `postedAfter`, `postedBefore` | Publication date range: `2026-09-01`, or a period before now (`7 days`, `2 weeks`, `1 month`; via the API also `24 hours`). |
| `excludeKeywords` | Drop the articles whose title or summary (the search snippet, or the digest the account wrote) contains one of these words (case ignored). |
| `keywordLabels` | Free (no extra charge, nothing dropped): your own labels on the articles. One line per label, `Tech: AI, chip, 芯片` adds `Tech` when at least one of the words is found in the title, the summary or the text; a line with no colon (`blockchain`) is one word that is its own label. Words are separated by a comma, an English one or a Chinese one (， or 、). Case, accents and full-width letters are ignored, and a word is found anywhere in the text (so it works for Chinese). The text needs **Full article**: without it only the title and the summary are searched. Up to 50 labels of 50 words. Result: `matchedLabels`. |
| `onlyNew`, `stateKey`, `resetState` | Monitoring: only the articles never delivered under this memory key (`ai-news`); `resetState` forgets the memory. |
| `mpCookie`, `mpToken` | Optional login with your own Official Account (a free subscription account is enough), only for the full history of the accounts in `accounts`. Stored encrypted, never written to the log or the results. |
| Advanced | `proxyConfiguration` (Apify proxy by default, included in the price; the residential proxy is not available), `maxConcurrency`, `maxRequestsPerMinute`, `minRequestIntervalMs`, `maxRequestRetries`, `debugLog`. |

### 📦 Output

One full article (`extractDetails` on), found through its album, from a real article, shortened (long texts cut, some fields left out):

```json
{
    "type": "article",
    "id": "3090136400_2656415723_3",
    "resultKey": "rk_3f1a9c0e5b7d2a14",
    "url": "https://mp.weixin.qq.com/s?__biz=MzA5MDEzNjQwMA==&mid=2656415723&idx=3&sn=35ee2516bca63312c69fb7a061e88f6c&chksm=8ab5c4eade9f43e03e91b4f5c9a25ab61d05ad42229fa6fa61129a728d3a87d306343d8107a6",
    "permanentUrl": "https://mp.weixin.qq.com/s?__biz=MzA5MDEzNjQwMA==&mid=2656415723&idx=3&sn=35ee2516bca63312c69fb7a061e88f6c&chksm=8ab5c4eade9f43e03e91b4f5c9a25ab61d05ad42229fa6fa61129a728d3a87d306343d8107a6",
    "title": "利好来了，五一视界大涨！",
    "summary": "中国基金报微信：Chinafundnews",
    "author": "伊万",
    "publishedAt": "2026-10-20T09:49:41.000Z",
    "publishedTimestamp": 1792489781,
    "accountName": "中国基金报",
    "accountId": "gh_a4a87df43a4c",
    "accountWechatId": "chinafundnews",
    "accountBiz": "MzA5MDEzNjQwMA==",
    "accountType": "subscription",
    "contentType": "article",
    "content": "【导读】港股收跌，创新药板块走强，翰森制药大涨超8%，物理AI及机器人概念股五一视界大涨超22%\n中国基金报记者 伊万\n…",
    "contentLength": 1166,
    "images": [
        {
            "url": "https://mmbiz.qpic.cn/mmbiz_png/7KcgpBE2JbqDNAMxtibciaSG3HZoxLydv6bsA8NibTTB6Ac7rBBJFMVaGq3wy9KCjNcBBsib2tbyYUUWdbibTeXXLrw/640?wx_fmt=png&from=appmsg",
            "width": 1920,
            "height": 755
        }
    ],
    "imageCount": 7,
    "videoIds": [],
    "isOriginal": false,
    "isPaid": false,
    "ipRegion": "广东",
    "ipCountry": "中国",
    "hashtags": [],
    "matchedLabels": [],
    "albumId": "3080785052776808449",
    "albumTitle": "港股日报",
    "albumUrl": "https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA5MDEzNjQwMA==&action=getalbum&album_id=3080785052776808449",
    "albumArticleCount": 463,
    "messageId": "2656415723",
    "indexInMessage": 3,
    "source": "album",
    "searchQuery": "港股日报",
    "contentStatus": "ok",
    "scrapedAt": "2026-10-21T12:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV or Excel.

#### All 56 fields

| Fields | What you get |
| --- | --- |
| `type`, `id`, `resultKey`, `docId` | `article` or `account` (the rows of the data options are `wechat-index` or `search-suggestions`, below); `3090136400_2656415723_3` (the ID WeChat albums use, when known); a stable key, the same whatever the source and across runs; the ID in WeChat search |
| `url`, `permanentUrl`, `temporaryUrl`, `sogouUrl` | **Links**: the best link available; the permanent link (`sn` + `chksm`) when WeChat reveals it; the signed search link, valid a few hours; the search redirect link |
| `title`, `summary`, `coverUrl` | **Article**: `利好来了，五一视界大涨！`, search snippet or digest, cover image. Without **Full article**, a title found by search is written as Sogou prints it (half-width signs: `,` `:` `!` for `，` `：` `！`); with it, as the account wrote it |
| `publishedAt`, `publishedTimestamp` | `2026-10-20T09:49:41.000Z` (what the date filters read), Unix seconds |
| `author`, `isOriginal`, `isPaid`, `sourceUrl` | **Author and badges**: `伊万`, original badge, pay-to-read article (only the free part is returned), "Read the original" link |
| `ipRegion`, `ipCountry` | `广东`, `中国`: where WeChat says the article was published from |
| `accountName`, `accountId`, `accountWechatId`, `accountBiz`, `accountType` | **Account**: `中国基金报`, `gh_a4a87df43a4c`, `chinafundnews`, `MzA5MDEzNjQwMA==`, `subscription` or `service` |
| `accountDescription`, `accountAvatar`, `accountVerified` | **Account profile** (account rows): `实时专业理财资讯`, avatar URL, `true` |
| `articlesFound`, `latestArticleTitle`, `latestArticleAt`, `latestArticleUrl` | Account rows: number of its articles found in this run, its newest article (title, date, link) |
| `contentType`, `content`, `contentMarkdown`, `contentHtml`, `contentLength` | **Content**: `article`, `video`, `audio`, `image` or `text`; full text; Markdown; raw HTML; `1166` characters |
| `images`, `imageCount`, `videoIds` | **Media**: every image with `url`, `width`, `height`; `7`; IDs of the embedded videos |
| `hashtags` | WeChat topic tags |
| `matchedLabels` | **Keyword labels** (free): the labels of your `keywordLabels` found in the title, summary or text (`["Tech"]`), in the order you wrote them, once each; `[]` when none, and on account rows |
| `albumId`, `albumTitle`, `albumUrl`, `albumArticleCount`, `albumPosition` | **Album**: `3080785052776808449`, `港股日报`, album link, `463` articles, `1` = newest |
| `messageId`, `indexInMessage` | `2656415723`, `3` (position of the article in its push, `1` = headline) |
| `source`, `searchQuery`, `searchPage`, `searchPosition`, `totalResultsEstimate`, `searchUrl` | **Search context**: `search`, `article`, `album` or `account`; the keyword, album or account that found it; results page and rank; results WeChat announces; the results page it was found on |
| `contentStatus`, `scrapedAt` | `ok`, `not_requested` (Full article off), `deleted`, `verification` (WeChat asked for a check twice), `paid` or `error`; ISO timestamp |

#### Rows of the data options (7 more fields)

A row of a data option has the fields `type`, `id`, `resultKey`, `scrapedAt` and its own fields below, nothing else. These rows are always delivered, also with **Only new articles**: the figures change every day.

| Fields | What you get |
| --- | --- |
| `keyword` | **All data rows**: the keyword of `query` / `searchQueries` the row answers |
| `title` | **WeChat Index**: the title of the curve (`人工智能 - 微信指数`) |
| `latestIndex`, `latestDate`, `dataPoints`, `changePercent` | **WeChat Index**: the index of the last day (`69931366`), that day (`2026-10-23`, Beijing calendar), one `{date, index}` per day over about 30 days, and the change from the first to the last day in percent |
| `scope`, `suggestions` | **Search suggestions**: `ALL` or the part of WeChat search asked, and the suggested words (`["人工智能", "人工智能训练"]`) |

### 💡 Tips

#### How to get more results

WeChat shows about 100 articles per keyword (10 pages of 10). To get more, add keywords to `searchQueries` — synonyms, names, Chinese and English — or paste album links: an album returns all its articles, not only the first 100. Set `maxItems` to `0` for no global cap.

#### How to reduce costs

The price is per article, so the levers are `maxItems`, `maxItemsPerQuery`, the filters (a filtered-out article costs only the filter fee, lower than an article, and its page is not opened) and `onlyNew` for recurring runs (an article is never saved twice; each one a run reads again costs one filter check, as Sogou's results are ordered by relevance, not by date). Leave **Full article** off when titles, summaries, dates and links are enough.

#### Several searches in one run

Fill `searchQueries`, `searchUrls`, `albumUrls` and / or `accounts`: each keyword, search link, album and account is a search of its own, up to 500 per run. The single `query` field still works and is added to the list. An article found by several searches is saved — and charged — once. Set `maxItemsPerQuery` to give every search its own cap: without it the first searches can use up the whole `maxItems` budget. Pasted `articleUrls` are not searches: each link gives its article.

#### Monitoring: only the new articles

Tick **Only new articles** (`onlyNew`) and schedule the Actor. The first run returns everything; each later run skips the articles already delivered: they are not saved again, each one a run reads again costs one filter check, and for articles found by search, album, account or history their page is not even opened. The memory lives in a named key-value store of your account (`wechat-articles-scraper-seen`, up to 150,000 articles per key) and is only updated with articles that really reached the dataset, so a failed run never hides anything. Give each schedule its own `stateKey` (two schedules sharing a key would hide each other's articles), and tick `resetState` once to start over. Albums and account histories are read newest first and stop once they meet a long run of articles you already have; keyword searches are ranked by relevance, so they are read to the end.

#### Filter by publication date

`postedAfter` and `postedBefore` take a date (`2026-09-01`, the whole day is included, Beijing time) or a period before now (`7 days`, `2 weeks`, `1 month`; via the API also `24 hours` or a full ISO date-time). The filter reads `publishedAt` on the search card, album line or history entry, before the article page is opened. Filtered-out articles are not saved and do not count in `maxItems` (each article dropped costs the filter fee, see Pricing); the run summary tells how many were filtered.

#### WeChat Index and suggestions

Tick **WeChat Index** and / or **Search suggestions** to get, for each keyword of `query` and `searchQueries`, its popularity over 30 days and the words WeChat suggests. They are paid options, on a paid Apify plan only, and use no article: with `maxItems` at a low value you can run them for the data rows alone. If the data service is out of reach for a moment, the run is not failed: a line in the log says the option was not delivered. A lookup is charged when it is started, also when it gets no data. The run's maximum cost is respected: an option stops when it can no longer be paid.

#### Full history of an account

Without login, `accounts` returns the articles of the account that WeChat search shows (about 100 at most). For its full archive, log in to mp.weixin.qq.com with your own Official Account (a free subscription account is enough), copy the cookie and the token into `mpCookie` and `mpToken`, and list the accounts in `accounts` (`gh_` IDs are accepted too). Each history article is charged as a history article on top of the article. A login WeChat refuses or that has expired is reported in the log with a clear message: log in again and copy a fresh cookie and token.

### 🔌 Integrations and API

Call the Actor via the Apify API, the JavaScript or Python clients, or connect it with integrations and webhooks (Make, Zapier, n8n, Google Sheets, Slack, Airtable…). The dataset can be fetched as JSON or CSV from any tool.

### 🤖 Use with AI agents (MCP)

AI agents (Claude, ChatGPT, Cursor…) can find and run this Actor through the [Apify MCP server](https://mcp.apify.com), billed to their Apify account like any run. It returns one item per WeChat Official Account article. Actor id: `nice_dev/wechat-articles-scraper`; MCP server with this Actor only: `https://mcp.apify.com/?tools=fetch-actor-details,nice_dev/wechat-articles-scraper`.

Smallest input, for a cheap first call:

```json
{
    "query": "人工智能",
    "maxItems": 10
}
```

Key output fields: `url`, `title`, `summary`, `accountName`, `publishedAt`, and with `extractDetails` `content`, `contentMarkdown` and `permanentUrl`.

Cost: pay per event — per article, plus the options ticked (full article, link conversion, account profile, WeChat Index, search suggestions), see the pricing section above and the Pricing tab. Cap each call with `maxItems` and, through the API, with the run option `maxTotalChargeUsd`.

### ❓ FAQ

#### Is it legal to scrape WeChat?

The Actor only reads articles that WeChat Official Accounts publish openly, which anyone can open without a WeChat account. It logs in to nothing, except the optional history mode, which uses your own login. Results can contain personal data (author bylines, account avatars, IP region of publication), which is protected by laws such as GDPR in Europe and PIPL in China: do not store it without a legitimate reason. You are responsible for using the data in compliance with WeChat's Terms of Service and applicable law; if in doubt, ask a lawyer. This Actor is not affiliated with WeChat or Tencent.

#### Do I need a WeChat account?

No. Search, articles, albums and accounts work without any account. The login (`mpCookie` + `mpToken`) is optional and only adds the full history of the accounts you list.

#### How many articles can I get per keyword?

About 100: WeChat search shows 10 pages of 10 articles per keyword, and some come back twice, so a keyword usually gives 85 to 95 articles. Add keywords, albums or accounts to collect more.

#### Does it need a proxy?

The proxy is included in the price: leave the default setting (the residential proxy is not available). A request the site turns away is retried at once on a new proxy session, up to 10 times on top of the retries (without a proxy, after a pause of 5 seconds, doubled at each retry up to 150 seconds).

#### Is the data safe to open in Excel or to show on a web page?

Titles and texts are the accounts' own words, copied as they are. A text can begin with `-`, `+`, `=` or `@`: Excel and Google Sheets may read such a cell of a CSV file as a formula or as a number. The Actor leaves the text as it is, so that the JSON and the API give the real value: when you open a CSV, import these columns as text. `contentHtml` is the article's own HTML, not sanitized: on a web page, escape every field like any text written by a stranger.

#### Known limitations

- About 100 articles per keyword, and an account without login gives its most visible articles, not its full archive.
- Read counts, likes and comments are only shown inside the WeChat app: they are not returned.
- A pasted article link without `extractDetails` is a link conversion: permanent link when WeChat reveals it, IDs, account, title and date, but no text or images.
- A pasted article link is always opened, even with `onlyNew` or the filters on: it has to be read to be recognised. An article already delivered or filtered out is then not saved and not charged as an article (it costs one filter check).
- `permanentUrl` is null for a search result that belongs to no album and was not opened through a permanent link: WeChat does not reveal it. `url` then holds the temporary link, valid a few hours.
- A few article pages answer with a WeChat check page: the row is saved with `contentStatus: verification` and is not charged as a full article.
- WeChat Index and search suggestions: paid Apify plan only; the keywords of `query` and `searchQueries` only (not the accounts or links); a keyword WeChat has no index for gives no row (the lookup is still charged).
- Account profiles (`includeAccountProfiles`) are read for the accounts of the articles delivered. An account whose profile could not be read in time gets no `account` row and is not charged.
- `onlyNew` remembers article keys, not their content: an article edited since is not returned again.
- Two articles of the same account published the same day (Beijing time) under the same title share one `resultKey`: only the first is saved and charged.
- Two runs sharing the same `stateKey` at the same time may both return the same new article.

**A run that reaches its timeout** stops itself about 45 seconds before it: no new page is asked, what it read is saved and, with `onlyNew`, remembered, and the run ends *Succeeded* with "Stopped before the run's timeout". Resurrect it to go on from there, or give the next run a longer timeout (Run options). The `account` rows are written at that stop and not updated by the resurrected run: their `articlesFound` and latest article are those of the first part.

**A run the platform stops without warning** (out of memory)

- Resurrect it: it goes on from where it stood at most a minute before the stop. What it had read since is read again, and the articles already saved are skipped: none is delivered or charged twice, and `maxItems` still counts them.
- With `onlyNew`, the memory is saved after each write (at most once every 2 seconds): resurrect the stopped run and the articles it had saved meanwhile join the memory; leave it stopped for good, and the next run may return the articles of its last 2 seconds once more.
- After such a stop (or a migration of the run to another server), the `articlesFound` count of the account rows may be lower than the number of articles of the account in the dataset.

#### Something doesn't work?

The last line of the log counts the articles saved and filtered out, and the requests that failed after every retry. Those requests are listed, with the reason, in the `FAILED_REQUESTS` record of the run's key-value store. A run that saved nothing and had failed requests fails, and its last message gives the cause.

If WeChat changes its pages, you are told instead of paying for blank rows. A results page that counts articles but gives none the Actor can read is an error (listed in `FAILED_REQUESTS`), never a quiet "No articles found". If the first 20 articles read all lack their title, publication date, account name or — with `extractDetails` — text, the run saves nothing more, stops and fails, and its last message names the missing field: at most those first articles are charged. An article that `postedAfter` / `postedBefore` drops because it has no date at all counts among those 20. A run of fewer articles (a scheduled `onlyNew` run that finds a few new ones, a small **Max articles**) is checked at its end, from 5 articles: its articles are already saved, and the run fails with the missing field instead of ending green.

### 🛟 Support

Open an issue in the **Issues** tab with a link to your run: the run log and the `FAILED_REQUESTS` record of the key-value store show exactly which URLs failed and why.

# Actor input Schema

## `query` (type: `string`):

Article search on WeChat (through Sogou WeChat search), Chinese or English, exactly as you would type it (e.g. `人工智能`). WeChat shows at most about 100 articles per keyword (10 pages): add more keywords below to collect more.

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

Several keywords in one run: one search per keyword. Added to **Search keyword**; articles found by several searches are saved once. Up to 500 searches in all per run (words, search URLs, albums and accounts together).

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

WeChat article links, any form: permanent (`https://mp.weixin.qq.com/s?__biz=…&mid=…&idx=…&sn=…&chksm=…`), short (`https://mp.weixin.qq.com/s/AbC123`), temporary search links (`…/s?src=11&timestamp=…&signature=…`) or Sogou links (`https://weixin.sogou.com/link?url=…`). With **Full article** on: the whole article. Off: link conversion only (permanent link when WeChat reveals it, IDs, account, title, date), charged as a link conversion. Max 1 000.

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

WeChat album links (`https://mp.weixin.qq.com/mp/appmsgalbum?__biz=…&album_id=…`), or an article link: every article of its album is collected, newest first, with its permanent link. Max 200 albums. Up to 500 searches in all per run (words, search URLs, albums and accounts together).

## `searchUrls` (type: `array`):

Search-result links copied from weixin.sogou.com (`https://weixin.sogou.com/weixin?type=2&query=…`). Pagination is automatic (10 pages at most). Up to 500 searches in all per run (words, search URLs, albums and accounts together).

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

Account display names (e.g. `中国基金报`), WeChat IDs (e.g. `chinafundnews`) or any article link of the account. Without login: the account's most visible articles found by search (about 100 at most, not its full archive). With the optional WeChat login below: its full article history, and `gh_` IDs are accepted too. Up to 500 searches in all per run (words, search URLs, albums and accounts together).

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

Maximum number of articles to save for the whole run (after deduplication and filters). 0 = no limit.

## `maxItemsPerQuery` (type: `integer`):

Cap for EACH keyword, search link, album or account, so that the first one cannot use up the whole **Max articles** budget. 0 = no per-search cap.

## `maxPagesPerQuery` (type: `integer`):

Search-result pages read per keyword or search link (10 articles each). WeChat search stops at page 10.

## `extractDetails` (type: `boolean`):

Open each article page for the full text, author, all images (with size), permanent link (`sn` + `chksm`), original badge, IP region of publication, hashtags, album, video IDs, account WeChat ID and `gh_` ID. Charged as a full article on top of the result (see Pricing). Off = search-card fields only (title, summary, account name, date, cover, temporary link).

## `includeMarkdown` (type: `boolean`):

With **Full article**: also return the body as Markdown (headings, lists, links, images kept). Free.

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

With **Full article**: also return the raw HTML of the body (large: 20-300 KB per article). Free.

## `includeAccountProfiles` (type: `boolean`):

Add one row per official account that has an article row in the results (type `account`): name, WeChat ID, `gh_` ID, biz, description, avatar, verification, number of its articles in this run, latest article. Without `extractDetails`, this reads one more page per account. An account not read in time gets no row and is not charged. Charged per account profile (see Pricing).

## `includeMarketStats` (type: `boolean`):

Adds one sheet of figures per search (keyword, album, account or pasted Sogou link): articles delivered and results WeChat search announces, first and last publication date, articles per day (Beijing time, UTC+8), number of accounts and the top 10 accounts, shares of original and paid articles, article types, articles with images, average text length, top 10 hashtags and IP regions. Worked out from the articles this run delivers (with Only new articles, the new ones only); nothing is added to the dataset. Shares count only the articles that give the value, and each share comes with that number: most page fields need Full article. Find it in Storage → Key-value store → `MARKET_STATS`, or in the Output tab. Charged per sheet delivered, at the end of the run (event `market-stats`, see Pricing).

## `includeWechatIndex` (type: `boolean`):

Adds one row per keyword (type `wechat-index`) with its WeChat Index: the popularity of the keyword in WeChat, one value a day over the last 30 days (Beijing calendar), the latest value and the change over the period. Uses the keywords of `query` and `searchQueries` only. Paid Apify plan only. Charged per keyword looked up, also when WeChat has no data for it (event `wechat-index`, see Pricing). Rows are always delivered, also with Only new articles.

## `includeSearchSuggestions` (type: `boolean`):

Adds one row per keyword (type `search-suggestions`) with the words WeChat search suggests for it, in its order. Uses the keywords of `query` and `searchQueries` only. Paid Apify plan only. Charged per keyword looked up, also when WeChat has no suggestion for it (event `search-suggestions`, see Pricing). Rows are always delivered, also with Only new articles.

## `suggestionScope` (type: `string`):

With **Search suggestions**: the part of WeChat search the suggestions come from. `ALL` = no filter.

## `postedAfter` (type: `string`):

Only articles published on or after this date (publication time of the article, Beijing time converted to UTC): `2026-09-01`, or a period before now such as `7 days`, `2 weeks`, `1 month` (API: `24 hours` and full ISO date-times work too).

## `postedBefore` (type: `string`):

Only articles published on or before this date (the whole day is included), or older than a period such as `30 days`.

## `excludeKeywords` (type: `array`):

Drop the articles whose title or summary (the search snippet, or the digest the account wrote) contains one of these words (case ignored).

## `keywordLabels` (type: `array`):

Put your own labels on the articles, free of charge. One line per label: `Tech: AI, chip, 芯片` adds the label `Tech` to an article when at least one of the words is found in its title, summary or text. Separate the words with a comma, an English one or a Chinese one (， or 、). A line with no colon, such as `blockchain`, is one word that is its own label. Case, accents and full-width letters are ignored; a word is found anywhere in the text, so it also works for Chinese. The text is only available with Full article; without it, only the title and the summary are searched. The labels found are listed in `matchedLabels`. Nothing is dropped: an article with no label is still delivered.

## `onlyNew` (type: `boolean`):

Skip the articles that a previous run (same **Memory key**) already delivered: they are not saved again; each one a run reads again costs one filter check (Sogou's results are ordered by relevance, not by date, so a run reads them to find the new ones). For articles found by search, album, account or history, their page is not even opened (a pasted article link is opened to be recognised, but never saved or charged as an article). First run = everything is new.

## `stateKey` (type: `string`):

Name of the memory used by **Only new articles**. Give each schedule / task its own key (e.g. `ai-news`) so that they do not share their memory. Letters, digits, `-` and `_`.

## `resetState` (type: `boolean`):

Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every article again. Untick it afterwards.

## `mpCookie` (type: `string`):

The `Cookie` header of mp.weixin.qq.com after login (browser developer tools → Network → any request → Cookie). Stored encrypted, never written to the log or the results.

## `mpToken` (type: `string`):

The number after `token=` in the address bar of mp.weixin.qq.com once logged in (e.g. `1234567890`).

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

Apify Proxy or your own proxies. Keep the default: it is included in the price, and the Actor changes IP by itself when WeChat search asks for a captcha. The residential Apify proxy is not available in this Actor.

## `maxConcurrency` (type: `integer`):

Maximum number of requests processed in parallel.

## `maxRequestsPerMinute` (type: `integer`):

Most requests to WeChat and Sogou in any 60 seconds, all of them counted: search pages, link pages, article pages and album pages. A budget, not an even pace: up to this many can leave at once when the minute starts (spread them with the minimum delay below). Lower it if the log shows many captchas.

## `minRequestIntervalMs` (type: `integer`):

Smallest gap between two requests, in milliseconds. Unlike the per-minute rate, this spreads the requests evenly instead of letting them go out in a burst. 0 = no gap.

## `maxRequestRetries` (type: `integer`):

Retries per request before it is marked as failed. Behind a proxy, a request the site turns away (captcha) is also retried on a new proxy session up to 10 times without using up these retries.

## `debugLog` (type: `boolean`):

Include debug messages in the run log.

## Actor input object example

```json
{
  "query": "人工智能",
  "searchQueries": [],
  "articleUrls": [],
  "albumUrls": [],
  "searchUrls": [],
  "accounts": [],
  "maxItems": 20,
  "maxItemsPerQuery": 0,
  "maxPagesPerQuery": 10,
  "extractDetails": false,
  "includeMarkdown": true,
  "includeHtml": false,
  "includeAccountProfiles": false,
  "includeMarketStats": false,
  "includeWechatIndex": false,
  "includeSearchSuggestions": false,
  "suggestionScope": "ALL",
  "excludeKeywords": [],
  "keywordLabels": [],
  "onlyNew": false,
  "stateKey": "default",
  "resetState": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 8,
  "maxRequestsPerMinute": 120,
  "minRequestIntervalMs": 0,
  "maxRequestRetries": 5,
  "debugLog": false
}
```

# Actor output Schema

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

No description

## `marketStats` (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 = {
    "query": "人工智能",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nice_dev/wechat-articles-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 = {
    "query": "人工智能",
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("nice_dev/wechat-articles-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 '{
  "query": "人工智能",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call nice_dev/wechat-articles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nice_dev/wechat-articles-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/EgwJ755I9cGSH4j8R/builds/KemShZj4PNHh6xFtF/openapi.json
