# WeChat Official Account Scraper — Profiles, Articles & Content (`haketa/wechat-official-account-scraper`) Actor

Search WeChat and Weixin Official Accounts, discover publisher profiles, collect publicly indexed account article history, or export articles with titles, dates, full text, HTML, Markdown, images and links. Built for China market research, brand monitoring, AI and multilingual content analysis.

- **URL**: https://apify.com/haketa/wechat-official-account-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2,049 total users, 240 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.40 / 1,000 article or dataset results

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

<h1 align="center">WeChat Official Account Scraper — Profiles, Articles & Full Content</h1>

<p align="center"><strong>Search public WeChat Official Accounts (微信公众号), discover publisher profiles, collect indexed article history, and export clean WeChat / Weixin content at 1,000+ scale — no login, no coding.</strong></p>

<p align="center">
  <img src="https://img.shields.io/badge/WECHAT-OFFICIAL_ACCOUNTS-07C160?style=for-the-badge" alt="WeChat Official Accounts">
  <img src="https://img.shields.io/badge/SCALE-1%2C000%2B_ARTICLES-00B4D8?style=for-the-badge" alt="1000+ Articles">
  <img src="https://img.shields.io/badge/OUTPUT-JSON_CSV_EXCEL_API-1677FF?style=for-the-badge" alt="Export formats">
  <img src="https://img.shields.io/badge/FULL_CONTENT-TEXT_HTML_MARKDOWN-7B61FF?style=for-the-badge" alt="Full content">
  <img src="https://img.shields.io/badge/NO_CODE-READY-FFB000?style=for-the-badge" alt="No code">
</p>

***

### ⚡ At a glance

| Feature | Details |
|---|---|
| **Target Platform** | Public WeChat / Weixin Official Accounts (微信公众号) & `mp.weixin.qq.com` articles |
| **Collection Modes** | `auto`, `search` (articles by keyword), `account_search` (publisher profiles), `account_history`, `articles` (direct URLs) |
| **Scale & Pagination** | Automatic multi-page traversal + smart keyword expansion for **1,000+ results** |
| **Content Formats** | Discovery metadata + optional full-body `contentText`, cleaned `contentHtml`, and `contentMarkdown` |
| **Media & Links** | Cover thumbnails, inline article `images`, outbound `links`, embedded `videoIds` |
| **Deduplication** | Automatic deduplication by canonical `biz` / `mid` / `idx` or publisher `accountId` / `accountName` |
| **Export Formats** | JSON, CSV, Excel (XLSX), XML, RSS, HTML Table, and Apify REST API |
| **Integrations** | Make, Zapier, n8n, Google Sheets, LangChain, LlamaIndex, Webhooks, S3 / Snowflake |

***

This **WeChat scraper** extracts public **WeChat Official Account** (微信公众号) articles and publisher profiles — no WeChat login and no coding required. Search with Chinese or English keywords, discover the Official Accounts covering any market or brand, collect a publisher's indexed article history, or paste known `mp.weixin.qq.com` links to **scrape WeChat** article content directly. You receive publisher names, titles, authors, publication dates, summaries, full text, cleaned HTML, Markdown, images, outbound links, and CJK-aware content statistics in one structured dataset.

Export every result to **JSON, CSV, Excel, XML, RSS, or the Apify API**.

> Built for **China market researchers, brand and competitor monitoring teams, B2B intelligence analysts, localization and translation workflows, PR agencies, and AI / RAG engineers** who need clean Chinese-language **WeChat data** at scale.

***

### 🔎 Why scrape WeChat Official Accounts?

**WeChat Official Accounts** are the backbone of Chinese B2B and B2C digital publishing. Domestic and international brands, trade associations, research institutes, media outlets, government agencies, and vertical KOLs publish their primary long-form content as Official Account articles rather than on traditional websites. Consequently, the highest-value signal about Chinese markets, consumer sentiment, product launches, regulatory shifts, and competitor strategy lives inside **Weixin**.

Collecting that data manually is slow and fragile:

- Articles are rarely indexed by Western search engines.
- Manual search inside the app requires copying links one by one.
- Article pages are heavy and mix main body content with megabytes of boilerplate scripts.
- Tracking multiple keywords, competitors, or industry verticals across hundreds of articles per week is impossible by hand.

A **WeChat Official Account scraper** turns that scattered ecosystem into a clean, repeatable **WeChat data extractor** pipeline. Instead of copy-pasting individual posts, you run a single job and receive a de-duplicated table of publishers and articles with full text, Markdown, timestamps, and media — ready for competitive intelligence, translation, BI dashboards, or an LLM / RAG vector database.

#### Common reasons teams scrape WeChat

- **Brand & competitor monitoring** — track public articles mentioning your company, products, executives, campaigns, or competitors across China's media ecosystem.
- **China market research & B2B intelligence** — study emerging trends in AI (`人工智能`), EVs (`新能源汽车`), cross-border e-commerce (`跨境电商`), fintech (`金融科技`), healthcare (`医疗健康`), and retail (`消费趋势`).
- **Official Account & KOL discovery** — identify the top publishers covering a vertical, capture their profile description and avatar, and evaluate their publishing activity.
- **AI, LLM training & RAG pipelines** — feed clean, normalized Chinese `contentText` and `contentMarkdown` directly into embeddings, summarization, sentiment analysis, and retrieval-augmented generation workflows.
- **PR & campaign impact analysis** — measure media pickup, article volume, and narrative framing around trade shows, product launches, or policy announcements.
- **Localization & multilingual intelligence** — pull structured Chinese source articles for automated or human translation into English, Japanese, Korean, or European languages.
- **Public article archiving** — preserve the full text, clean HTML, Markdown, and image references of known `mp.weixin.qq.com` URLs before posts are edited or removed.

***

### ✨ What this WeChat scraper does

- ✅ **Five flexible modes** — `auto` (chooses automatically based on your inputs), `search` (find articles by keyword), `account_search` (discover Official Account profiles by topic), `account_history` (collect indexed articles from specific publishers), and `articles` (extract full content from pasted `mp.weixin.qq.com` URLs).
- ✅ **Bilingual keyword search** — search in Simplified/Traditional Chinese or English (e.g. `人工智能`, `新能源汽车`, `品牌营销`, `Tesla`, `LVMH`) and sort by **Most relevant** (`relevance`) or **Most recent** (`recent`).
- ✅ **Unlocked 1,000+ results pagination** — automatically walks multi-page search results and expands high-volume topic searches across sub-queries and multiple keywords to deliver **hundreds to 1,000+ unique articles** with zero hard page caps.
- ✅ **Two-tier speed & cost control (`includeContent`)** — keep `includeContent: false` (default) for ultra-fast, low-cost metadata discovery (`title`, `accountName`, `summary`, `publishedAt`, `articleUrl`, `coverImage`). Enable `includeContent: true` whenever you need full `contentText`, `contentHtml`, `contentMarkdown`, inline `images`, and `links`.
- ✅ **Rich publisher & article identifiers** — extracts `biz`, `mid`, `idx`, `sn`, `isOriginal` (原创 flag), `author`, `accountId`, `accountAvatar`, and `accountDescription` when present on the article page.
- ✅ **CJK-aware content analytics** — computes accurate `wordCount` (counting Chinese characters and alphanumeric words), `characterCount`, `imageCount`, `linkCount`, and `videoCount`.
- ✅ **Zero-input ready** — leave all inputs empty and the Actor automatically runs a curated 20-topic China tech & business discovery mix so you always get a rich sample dataset on your first test.
- ✅ **Bulk export & automation** — download results in **JSON, CSV, Excel, XML, or RSS**, or connect directly to **Apify API, Make, Zapier, n8n, Google Sheets, or webhooks**.

***

### 🎯 High-value use cases

| Team / Role | How they use this WeChat data extractor | Key fields used |
|---|---|---|
| **Market Research & Strategy** | Map industry narratives, emerging technologies, and consumer trends across 1,000+ recent articles. | `title`, `summary`, `contentText`, `publishedAt`, `searchKeyword` |
| **Brand & PR Monitoring** | Track daily brand mentions, crisis signals, and campaign coverage across Official Accounts. | `accountName`, `title`, `publishedAt`, `articleUrl`, `isOriginal` |
| **AI / RAG & NLP Engineers** | Build domain-specific Chinese corpora and feed clean Markdown into vector databases. | `contentMarkdown`, `contentText`, `wordCount`, `characterCount`, `articleUrl` |
| **B2B Partnership & KOL Teams** | Discover active publishers and trade accounts in a niche to build outreach and media lists. | `recordType`, `accountName`, `accountId`, `description`, `latestArticleUrl` |
| **Competitive Intelligence** | Monitor a competitor's Official Account publishing cadence, topics, and product announcements. | `accountName`, `title`, `publishedAt`, `summary`, `images`, `links` |
| **Content & Localization Teams** | Extract full articles from pasted `mp.weixin.qq.com` links for translation and cross-posting. | `title`, `author`, `contentMarkdown`, `contentHtml`, `images` |

***

### 📥 Input configuration

Configure your run in the Apify Console visual form or pass a JSON payload via the API. **No fields are required** — an empty input `{}` runs a multi-topic discovery sample automatically.

| Field | Type | Default / Prefill | Description |
|---|---|---|---|
| `mode` | `string` | `"auto"` | Collection mode: `"auto"`, `"search"` (articles by keyword), `"articles"` (pasted URLs), `"account_search"` (discover Official Accounts), or `"account_history"` (articles from specific accounts). |
| `keywords` | `array<string>` | `["人工智能"]` | Topics, brand names, industries, or Official Account names in Chinese or English. Pass multiple keywords to scale breadth. |
| `articleUrls` | `array<string>` | `[]` | Public `mp.weixin.qq.com` article links (one per line) for direct full-content extraction and archiving. |
| `accounts` | `array<string>` | `[]` | Publisher discovery topics (in `account_search` mode) or exact public Official Account display names (in `account_history` mode). |
| `sortBy` | `string` | `"relevance"` | Search ordering: `"relevance"` (Most relevant) or `"recent"` (Most recent indexed articles first). |
| `includeContent` | `boolean` | `false` | **Off (default):** fast, low-cost metadata discovery (`title`, `accountName`, `summary`, `publishedAt`, `articleUrl`, `coverImage`). **On:** also opens every article to extract `contentText`, `contentHtml`, `contentMarkdown`, inline `images`, and `links`. |
| `includeImages` | `boolean` | `true` | Include cover and inline article image URLs in the output (no binary image downloads). |
| `maxItems` | `integer` | `100` (prefill `50`) | Maximum number of saved article or account records across the run. Supports **1,000+ results**. |
| `maxConcurrency` | `integer` | `8` | Parallel article requests (`1`–`12`). Default `8` balances speed and reliability. |
| `proxyConfiguration` | `object` | `RESIDENTIAL` | Apify Proxy configuration. Residential proxies are pre-configured by default for reliable Official Account discovery. |

#### Example 1 — Fast, low-cost article discovery (metadata only)

```json
{
  "mode": "search",
  "keywords": ["人工智能", "大模型", "人形机器人"],
  "sortBy": "recent",
  "includeContent": false,
  "maxItems": 200
}
```

#### Example 2 — Deep 1,000+ article extraction with full Markdown & HTML

```json
{
  "mode": "search",
  "keywords": ["新能源汽车", "自动驾驶", "动力电池", "智能座舱", "充电桩"],
  "sortBy": "relevance",
  "includeContent": true,
  "includeImages": true,
  "maxItems": 1000,
  "maxConcurrency": 8
}
```

#### Example 3 — Discover Official Account publisher profiles (`account_search`)

```json
{
  "mode": "account_search",
  "accounts": ["跨境电商", "出海品牌", "独立站"],
  "maxItems": 100
}
```

#### Example 4 — Collect a specific publisher's indexed article history (`account_history`)

```json
{
  "mode": "account_history",
  "accounts": ["科情智库", "机器之心"],
  "includeContent": true,
  "maxItems": 100
}
```

#### Example 5 — Extract full content from pasted `mp.weixin.qq.com` URLs (`articles`)

```json
{
  "mode": "articles",
  "articleUrls": [
    "https://mp.weixin.qq.com/s/example-article-one",
    "https://mp.weixin.qq.com/s/example-article-two"
  ],
  "includeContent": true,
  "includeImages": true,
  "maxItems": 100
}
```

***

### 📤 Output schema & field reference

Results stream into the Apify Dataset in real time and can be viewed in two tailored tabs: **WeChat articles** (`overview`) and **WeChat accounts** (`accounts`).

#### Sample output — Article record (`recordType: "wechatArticle"`)

```json
{
  "recordType": "wechatArticle",
  "title": "政策工具视角下的美国人工智能政策演进分析",
  "accountName": "科情智库",
  "accountId": "keqingzhiku",
  "accountAvatar": "https://mmbiz.qpic.cn/mmbiz_png/avatar_sample/0?wx_fmt=png",
  "accountDescription": "科技情报研究与战略分析专业智库。",
  "author": "季洪帆，王建芳",
  "publishedAt": "2026-11-01T23:30:00.000Z",
  "articleUrl": "https://mp.weixin.qq.com/s?src=11&timestamp=1793576246&ver=7063&signature=example",
  "sourceUrl": "https://mp.weixin.qq.com/s?src=11&timestamp=1793576246&ver=7063&signature=example",
  "summary": "当前，人工智能已成为新一轮科技革命与产业变革的核心驱动力，本文从政策工具视角系统梳理演进脉络……",
  "coverImage": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QJ56y5z05xu9example/640?wx_fmt=jpeg",
  "contentText": "科情智库 当前，人工智能（Artificial Intelligence，AI）已成为新一轮科技革命与产业变革的核心驱动力……",
  "contentHtml": "<p>当前，人工智能（Artificial Intelligence，AI）已成为新一轮科技革命与产业变革的核心驱动力……</p>",
  "contentMarkdown": "![](https://mmbiz.qpic.cn/sz_mmbiz_jpg/QJ56y5z05xu9example/640?wx_fmt=jpeg)\n\n科情智库\n\n当前，人工智能……",
  "wordCount": 7111,
  "characterCount": 10840,
  "images": [
    "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QJ56y5z05xu9example/640?wx_fmt=jpeg"
  ],
  "imageCount": 6,
  "links": [
    "https://example.com/report"
  ],
  "linkCount": 3,
  "videoIds": [],
  "videoCount": 0,
  "isOriginal": true,
  "biz": "MzI1MDI5ODkwMA==",
  "mid": "2247510651",
  "idx": "2",
  "sn": "9f8e7d6c5b4a3210",
  "searchKeyword": "人工智能",
  "scrapedAt": "2026-11-08T14:22:10.604Z"
}
```

#### Sample output — Official Account profile (`recordType: "wechatAccount"`)

```json
{
  "recordType": "wechatAccount",
  "accountName": "科情智库",
  "accountId": "keqingzhiku",
  "description": "科技情报研究与战略分析专业智库。",
  "avatar": "https://mmbiz.qpic.cn/mmbiz_png/avatar_sample/0?wx_fmt=png",
  "latestArticleTitle": "政策工具视角下的美国人工智能政策演进分析",
  "latestArticleUrl": "https://mp.weixin.qq.com/s?src=11&timestamp=1793576246&ver=7063&signature=example",
  "latestPublishedAt": "2026-11-01T23:30:00.000Z",
  "searchKeyword": "人工智能",
  "scrapedAt": "2026-11-08T14:22:10.604Z"
}
```

#### 📰 Article Identity & Metadata Fields

| Field | Type | Coverage | Description |
|---|---|---|---|
| `recordType` | `string` | 🟢 High (100%) | `"wechatArticle"` for article records or `"wechatAccount"` for publisher profile records. |
| `title` | `string` | 🟢 High (100%) | Full article headline (`og:title` / search title). |
| `accountName` | `string` | 🟢 High (100%) | Official Account display name (公众号名称). |
| `publishedAt` | `string` | 🟢 High (100%) | ISO 8601 publication timestamp (e.g. `2026-11-01T23:30:00.000Z`). |
| `articleUrl` | `string` | 🟢 High (100%) | Resolved `mp.weixin.qq.com` article URL. |
| `sourceUrl` | `string` | 🟢 High (100%) | Source URL fetched during extraction. |
| `summary` | `string` | 🟢 High (~98%) | Article abstract / snippet (`og:description` or search summary). |
| `coverImage` | `string` | 🟢 High (~99%) | Article cover thumbnail URL. |
| `searchKeyword` | `string` | 🟢 High (100%) | The search query that discovered this record (`null` in direct URL mode). |
| `scrapedAt` | `string` | 🟢 High (100%) | ISO 8601 extraction timestamp. |

#### 🏢 Publisher & Deduplication Identifiers (Full-Content Mode)

| Field | Type | Coverage | Description |
|---|---|---|---|
| `author` | `string\|null` | 🟡 Conditional | Article author byline when declared by the publisher (`includeContent: true`). |
| `accountId` | `string\|null` | 🟡 Conditional | Public WeChat ID (`user_name`) when exposed in the article markup. |
| `accountAvatar` | `string\|null` | 🟡 Conditional | Publisher avatar URL (`https://mmbiz.qpic.cn/...`) when exposed on the article page. |
| `accountDescription` | `string\|null` | 🟡 Conditional | Official Account bio / signature (`signature`) when exposed on the article page. |
| `isOriginal` | `boolean` | 🟢 High (Full mode) | `true` when the article carries the WeChat 原创 (Original) copyright badge. |
| `biz` | `string\|null` | 🟢 High (Full mode) | Base64-encoded Official Account identifier (`__biz`) — primary publisher key. |
| `mid` | `string\|null` | 🟢 High (Full mode) | Message batch ID (`appmsgid`) — combine `biz` + `mid` + `idx` for exact deduplication. |
| `idx` | `string\|null` | 🟢 High (Full mode) | Article position index (`1`–`8`) within a multi-article push. |
| `sn` | `string\|null` | 🟡 Conditional | Article signature hash (`sn`) when present in URL/page variables. |

#### 📝 Full Content, Media & Statistics Fields

| Field | Type | Coverage | Description |
|---|---|---|---|
| `contentText` | `string\|null` | 🟡 Conditional | Clean, normalized plain text of the article body (populated when `includeContent: true`). |
| `contentHtml` | `string\|null` | 🟡 Conditional | Sanitized HTML of `#js_content` with scripts/ads stripped and `data-src` images resolved (`includeContent: true`). |
| `contentMarkdown` | `string\|null` | 🟡 Conditional | Clean Markdown conversion with headings, lists, code blocks, and inline images (`includeContent: true`). |
| `wordCount` | `integer` | 🟢 High (100%) | CJK-aware word count (counts Hanzi characters + non-CJK words; `0` when `includeContent: false`). |
| `characterCount` | `integer` | 🟢 High (100%) | Total character length of `contentText` (`0` when `includeContent: false`). |
| `images` | `array<string>` | 🟡 Conditional | Array of resolved inline image URLs (`includeContent: true` and `includeImages: true`). |
| `imageCount` | `integer` | 🟢 High (100%) | Number of inline images found in the article body. |
| `links` | `array<string>` | 🟡 Conditional | Outbound URLs linked inside the article body (`includeContent: true`). |
| `linkCount` | `integer` | 🟢 High (Full mode) | Number of outbound links in the article body. |
| `videoIds` | `array<string>` | 🟡 Conditional | Embedded WeChat video IDs (`data-mpvid` / `videosnap`) when the article embeds video. |
| `videoCount` | `integer` | 🟢 High (Full mode) | Number of embedded WeChat videos. |

***

### 🔁 Pagination, deduplication & 1,000+ scale

This **WeChat Official Account scraper** is engineered for both rapid sampling and deep **1,000+ article** harvesting:

1. **Multi-page index traversal:** For every keyword in `keywords`, the Actor paginates sequentially (10 results per page) until `maxItems` is satisfied or the search index ends.
2. **Automatic sub-topic query expansion:** When you request a high `maxItems` (such as `500` or `1,000+`) with one or a few seed keywords, the Actor automatically expands your seed terms with domain modifiers (`行业`, `趋势`, `报告`, `分析`, `市场`, `应用`, `发展`, `企业`, `深度`, `最新`, `研究`, `动态`) to bypass per-query page ceilings and keep pulling relevant, unique articles.
3. **Multi-layer deduplication:** Search results are de-duplicated first by redirect URL and `accountName + title`, and final records are de-duplicated by `biz | mid | idx | title` (or `accountId | accountName` in `account_search` mode), ensuring **0% duplicate rows** in your dataset.
4. **Byte-capped streaming for cost control:** When `includeContent: true` is enabled, the Actor streams each `mp.weixin.qq.com` page and stops downloading once the article body is captured — slashing residential proxy bandwidth costs without losing a single paragraph of text.

***

### ⚙️ How to use & automate

1. Open **WeChat Official Account Scraper** in the Apify Console.
2. Choose your **mode** (`auto`, `search`, `account_search`, `account_history`, or `articles`).
3. Enter your **keywords**, **accounts**, or **articleUrls**.
4. Keep `includeContent: false` for fast, low-cost metadata discovery, or switch `includeContent: true` to extract full text, HTML, and Markdown.
5. Set **Maximum results** (`maxItems` — e.g. `50` for a quick test, or `1000` for bulk extraction) and click **Start**.
6. Download your data from the **Dataset** tab as **JSON, CSV, Excel, XML, or RSS**, or consume it via the **Apify API**.

#### Node.js (`apify-client`) example

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('haketa/wechat-official-account-scraper').call({
  mode: 'search',
  keywords: ['人工智能', '新能源汽车'],
  sortBy: 'recent',
  includeContent: false,
  maxItems: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Extracted ${items.length} WeChat articles:`, items[0]);
```

#### Python (`apify-client`) example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("haketa/wechat-official-account-scraper").call(run_input={
    "mode": "search",
    "keywords": ["跨境电商", "出海品牌"],
    "includeContent": True,
    "maxItems": 100,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["publishedAt"], "|", item["accountName"], "|", item["title"])
```

***

### 💡 Pro tips for best results

- **Start with `includeContent: false` for discovery:** Metadata-only runs finish in seconds and use minimal residential proxy transfer. Once you filter the best `articleUrl` links, feed those into a second run with `mode: "articles"` and `includeContent: true`.
- **Use Simplified Chinese keywords for maximum depth:** While English brand names (`"Apple"`, `"Tesla"`) work well, Chinese industry terms (`"智能制造"`, `"医疗器械"`, `"美妆护肤"`) surface 5–10× more native Official Account coverage.
- **Schedule daily monitoring runs:** Pair `sortBy: "recent"` with an Apify Cron Schedule (e.g., every morning at 08:00 CST) and push new articles into Slack, Feishu/Lark, Notion, or Google Sheets.
- **Use exact display names in `account_history` mode:** Enter the exact Chinese name of the Official Account (e.g., `机器之心`) so the account matcher filters cleanly.

***

### ⚠️ Honest limitations

- **Publicly indexed content only:** This Actor extracts public WeChat Official Account articles and profiles that are accessible without logging into a personal WeChat account. Private group chats, Moments (朋友圈), and paywalled/member-only articles are not accessible.
- **Engagement metrics (`views`, `likes`, `comments`):** WeChat only exposes live read counts (`阅读`) and thumbs-up counts (`在看`) to authenticated in-app sessions with short-lived tokens, so public web extraction does not include read/like counts.
- **Publisher-dependent fields:** Fields such as `author`, `accountId`, `accountAvatar`, `accountDescription`, and `sn` depend on whether the publisher's article template exposes them; when absent, they are returned as `null` rather than guessed.

***

### ❓ Frequently Asked Questions (FAQ)

#### Do I need a WeChat account, QR code scan, or API key?

No. This **WeChat scraper** runs completely keyless and login-free. You never need to scan a QR code or risk a personal WeChat account.

#### How can I scrape 1,000+ WeChat articles in one run?

Simply set `maxItems: 1000` (or higher). You can provide a list of keywords in `keywords`, or let the Actor automatically expand your seed keywords across sub-topics and paginate until your target count is reached.

#### Why is `includeContent` turned off by default?

Full WeChat article pages are large (often 1–3 MB of HTML and embedded scripts) and require residential proxy bandwidth. Keeping `includeContent: false` by default makes initial discovery runs 5–10× faster and far cheaper. Turn `includeContent: true` whenever you need `contentText`, `contentHtml`, and `contentMarkdown`.

#### Can I use English keywords?

Yes. International brand names, product model numbers, and English tech terms (`"AI Agent"`, `"SaaS"`, `"IPO"`) return public WeChat articles that mention those terms. For broad market research, Simplified Chinese keywords yield the deepest coverage.

#### What is the difference between `account_search` and `account_history`?

- **`account_search`** returns **one row per publisher** (`recordType: "wechatAccount"`) matching your topic or query, along with their latest article.
- **`account_history`** returns **all publicly indexed articles** (`recordType: "wechatArticle"`) published by the exact Official Account names you specify in `accounts`.

#### What export formats are supported?

You can export your dataset as **JSON, CSV, Excel (XLSX), XML, RSS, or HTML table**, or fetch items programmatically via the Apify REST API and SDKs.

***

### 🔗 Related scrapers for Asian & creator intelligence

- [Xiaohongshu / RedNote Scraper](https://apify.com/haketa/xiaohongshu-rednote-scraper) — scrape RedNote posts, consumer reviews, KOL profiles, and engagement metrics.
- [Bilibili Scraper](https://apify.com/haketa/bilibili-scraper) — extract Chinese video metadata, creator stats, danmaku, and comments.
- [YouTube Contact Scraper](https://apify.com/haketa/youtube-contact-scraper) — extract YouTube creator business emails, websites, social links, and subscriber counts.
- [YouTube Comments Scraper](https://apify.com/haketa/youtube-comments-scraper) — bulk extract viewer comments for sentiment analysis.
- [Patreon Scraper](https://apify.com/haketa/patreon-scraper) — discover creator memberships, tiers, and public posts.
- [Linktree Scraper](https://apify.com/haketa/linktree-scraper) — extract creator bio links, social profiles, and contact endpoints.

***

### 📋 Changelog

- **v1.2 (2026-11)** — Unlocked **1,000+ results deep pagination**: removed the 10-page per-keyword ceiling and the 100-item discovery clamps on `account_search` and `account_history`, added automatic sub-topic keyword expansion (`EXPANSION_SUFFIXES`) + title/account deduplication for high-volume runs, expanded default discovery topics to 20 verticals, and tuned prefill (`maxItems: 50`, `includeContent: false`) for fast, low-cost execution under 60 seconds.
- **v1.1 (2026-10)** — Added byte-capped streaming (`ARTICLE_BYTE_CAP`) for full-content extraction to cut residential transfer cost while preserving 100% of `#js_content` text, HTML, and Markdown.
- **v1.0 (2026-09)** — Initial release with 5 collection modes (`auto`, `search`, `articles`, `account_search`, `account_history`), CJK word counting, Turndown Markdown conversion, and residential session rotation.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/wechat-official-account-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Search articles or accounts, collect an account's public article history, process pasted links, or let the Actor choose.

## `keywords` (type: `array`):

Enter topics, brand names, industries or Official Account names in Chinese or English.

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

Paste public mp.weixin.qq.com article links, one per line. Useful for bulk content extraction and archiving.

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

Enter topics to discover matching publishers, or exact public account names to collect their indexed article history.

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

Choose relevance or prioritize recently indexed articles.

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

Off (default): fast, low-cost discovery — title, account, summary, date and URL for each article. On: also open every article to extract its full text, HTML and Markdown (noticeably slower and far more data-intensive).

## `includeImages` (type: `boolean`):

Return cover and inline article image URLs without downloading binary files.

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

Maximum number of saved article or account records across the complete run.

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

Parallel article requests. The default balances speed and reliability.

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

Residential proxy access is used for reliable Official Account discovery.

## Actor input object example

```json
{
  "mode": "auto",
  "keywords": [
    "人工智能"
  ],
  "articleUrls": [],
  "accounts": [],
  "sortBy": "relevance",
  "includeContent": false,
  "includeImages": true,
  "maxItems": 50,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All discovered and extracted Official Account articles.

# 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 = {
    "keywords": [
        "人工智能"
    ],
    "articleUrls": [],
    "accounts": [],
    "includeContent": false,
    "includeImages": true,
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "keywords": ["人工智能"],
    "articleUrls": [],
    "accounts": [],
    "includeContent": False,
    "includeImages": True,
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "keywords": [
    "人工智能"
  ],
  "articleUrls": [],
  "accounts": [],
  "includeContent": false,
  "includeImages": true,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call haketa/wechat-official-account-scraper --silent --output-dataset

```

## MCP server setup

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