# 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
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<h1 align="center">WeChat Official Accounts Scraper</h1>

<p align="center"><strong>Discover Official Accounts, collect indexed article history, and export clean WeChat / Weixin content.</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/OUTPUT-JSON_CSV_EXCEL-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>

Search public WeChat Official Accounts, collect a publisher's indexed article history, discover articles by keyword, or extract known `mp.weixin.qq.com` links. Get publisher profiles, publication dates, summaries, full text, HTML, Markdown, images, links, and content statistics in structured datasets.

No code is required: enter a topic, click **Start**, and download the results.

### What you get

| Capability | Result |
|---|---|
| 🔎 Article discovery | Search with Chinese or English keywords |
| 👤 Account discovery | Find publishers covering a topic or brand |
| 📚 Account history | Collect indexed articles from an exact account name |
| 📣 Publisher profiles | Account name, public ID, description, avatar, and latest matching article |
| 📰 Article metadata | Title, author, date, summary, cover, and URL |
| 📄 Full content | Clean text, HTML, and Markdown |
| 🖼️ Media | Cover images, inline images, and video IDs |
| 🔗 Link data | Outbound links and link counts |
| 📊 Content metrics | Word, character, image, link, and video counts |
| 📦 Exports | JSON, CSV, Excel, XML, RSS, and API access |

### Use cases

#### Brand and competitor monitoring

Track public articles mentioning a company, product, campaign, or competitor. Schedule recurring runs to follow publishing activity and changing narratives over time.

**Example searches:** `华为`, `腾讯科技`, `新能源汽车`, `品牌营销`

#### Official Account discovery

Search a market, product, or topic and receive a deduplicated list of relevant publishers with their public account ID, description, avatar, and latest matching article.

#### Publisher article history

Enter an exact Official Account display name to collect its publicly indexed articles with complete content and metadata. Use this for editorial research, publisher comparison, and recurring monitoring.

#### China market research

Collect articles about industries, consumer behavior, policy, technology, finance, healthcare, or cross-border commerce. Compare topics and publishers in a consistent dataset.

**Example searches:** `消费趋势`, `跨境电商`, `金融科技`, `生物科技`

#### Media and content intelligence

Compare publishers by account name, author, publication date, article length, image usage, outbound links, and recurring themes.

#### AI, translation, and RAG pipelines

Use `contentText` or `contentMarkdown` for translation, summarization, classification, sentiment analysis, embeddings, search, research agents, and knowledge bases.

#### Public article archiving

Paste known public WeChat article links and preserve their content, metadata, image references, and identifiers in a portable format.

#### Campaign and trend analysis

Group results by `searchKeyword`, `accountName`, date, or content statistics to study topic coverage and campaign activity.

### Quick start

1. Open the Actor input form.
2. Choose article search, account discovery, account history, or direct URLs.
3. Enter a topic, exact account name, or article URL.
4. Set the number of results.
5. Click **Start**.
6. Open the **Dataset** tab to preview or download the data.

> 💡 For the most focused results, use specific Chinese keywords rather than broad English topics.

### Input

| Input | Default | Description |
|---|---:|---|
| `mode` | `auto` | Auto-detect, article search, direct URLs, account discovery, or account history |
| `keywords` | sample topic | Topics, brands, industries, or account names |
| `articleUrls` | empty | Public `mp.weixin.qq.com` article links |
| `accounts` | empty | Discovery topics or exact account names for history |
| `sortBy` | `relevance` | Sort discovery results by relevance or recency |
| `includeContent` | `true` | Include text, HTML, and Markdown |
| `includeImages` | `true` | Include cover and inline image URLs |
| `maxItems` | `100` | Maximum number of saved articles or account profiles |
| `maxConcurrency` | `6` | Number of articles processed in parallel |
| `proxyConfiguration` | enabled | Apify proxy configuration |

#### Search by keyword

```json
{
  "mode": "search",
  "keywords": ["人工智能", "新能源汽车"],
  "sortBy": "recent",
  "maxItems": 100
}
```

#### Extract known article links

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

#### Discover Official Accounts by topic

```json
{
  "mode": "account_search",
  "accounts": ["人工智能"],
  "maxItems": 20
}
```

#### Collect an account's indexed article history

```json
{
  "mode": "account_history",
  "accounts": ["全球首家人工智能6S店"],
  "maxItems": 50
}
```

### Output

Each dataset item represents one public WeChat Official Account article.

Account discovery mode instead returns one deduplicated publisher profile per row.

| Group | Fields |
|---|---|
| 📰 Article | `title`, `author`, `publishedAt`, `articleUrl`, `summary` |
| 📣 Publisher | `accountName`, `accountId` |
| 📄 Content | `contentText`, `contentHtml`, `contentMarkdown` |
| 🖼️ Media | `coverImage`, `images`, `videoIds` |
| 🔗 Links | `links`, `linkCount` |
| 📊 Statistics | `wordCount`, `characterCount`, `imageCount`, `videoCount` |
| 🔬 Identifiers | `biz`, `mid`, `idx`, `sn`, `isOriginal` |
| 🧭 Context | `searchKeyword`, `sourceUrl`, `scrapedAt` |

Account profile records include `accountName`, `accountId`, `description`, `avatar`, `latestArticleTitle`, `latestArticleUrl`, and `latestPublishedAt`.

```json
{
  "title": "AI industry trends and long-running agents",
  "accountName": "Example Official Account",
  "accountId": "example_account",
  "author": "Editorial Team",
  "publishedAt": "2026-04-28T04:45:00.000Z",
  "articleUrl": "https://mp.weixin.qq.com/s/example",
  "summary": "A detailed look at recent developments in artificial intelligence.",
  "coverImage": "https://mmbiz.qpic.cn/example.jpg",
  "contentText": "Complete normalized article text...",
  "contentMarkdown": "## Complete article\n\nStructured Markdown content...",
  "wordCount": 2140,
  "characterCount": 4380,
  "imageCount": 6,
  "linkCount": 2,
  "videoCount": 0,
  "searchKeyword": "人工智能",
  "scrapedAt": "2026-07-31T10:00:00.000Z"
}
```

### Automate and integrate

Use the Actor with Apify schedules, webhooks, Google Sheets, Make, Zapier, cloud storage, databases, BI tools, vector databases, or any application through the Apify API.

```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({
  keywords: ['人工智能'],
  maxItems: 100,
  includeContent: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Billing events

| Event name | Trigger |
|---|---|
| `apify-default-dataset-item` | Every article or account record saved to the default dataset |
| `account-profile` | Additional event for each profile returned by account discovery mode |

Account history produces article records, so it uses only the default dataset item event. Failed, filtered, or unavailable records do not trigger a result event.

### Tips

- Use direct article URLs when you need specific publications.
- Use **Most recent** sorting for recurring monitoring.
- Run unrelated topics separately when keyword attribution matters.
- Keep full content enabled for AI, NLP, translation, and research workflows.
- Use `articleUrl` or the public article identifiers for downstream deduplication.
- Keep the default concurrency for a good speed and cost balance.

### Limitations

- Keyword results cover publicly indexed articles, not every WeChat publication.
- Account history covers articles available in the public index and is not guaranteed to be a publisher's complete lifetime archive.
- Exact public display names give more reliable history results than broad company names or internal IDs.
- Deleted, restricted, expired, login-only, or region-limited pages may be unavailable.
- Views, likes, shares, comments, and subscriber counts are not consistently public.
- Optional fields remain empty when a publisher does not expose them.
- Images are returned as URLs rather than uploaded as binary files.

The Actor returns verifiable public data and does not guess unavailable metrics.

### FAQ

#### Do I need a WeChat login?

No. Public article workflows do not require login credentials.

#### Can I use English keywords?

Yes. Chinese terms usually provide broader coverage for China-focused research, while English brand and product names can also work.

#### Does it extract full article content?

Yes. Enable **Include full article content** to receive plain text, cleaned HTML, and Markdown.

#### Can I process my own list of links?

Yes. Paste public `mp.weixin.qq.com` URLs and select direct article extraction, or keep mode on auto-detect.

#### Why are some fields empty?

Publishers do not always expose an author, summary, account ID, or originality marker. Unavailable values are left empty rather than invented.

#### Can I schedule recurring monitoring?

Yes. Save the input as an Apify task and attach a daily, weekly, or custom schedule.

#### Can I discover Official Accounts instead of articles?

Yes. Select **Search Official Accounts** and enter a topic, market, product, or brand. Each row represents a unique matching publisher.

#### Can I collect a publisher's article history?

Yes. Select **Collect an account's article history** and enter the exact public display name. Results reflect articles available through the public index.

#### Which export formats are available?

Results can be accessed as JSON, CSV, Excel, XML, RSS, or through the Apify API.

#### How can I keep costs low?

Use focused keywords, reasonable result limits, and the default concurrency. Disable full content only when metadata is sufficient.

### Changelog

#### 0.2 — Account discovery and history

- Added Official Account discovery with profile details
- Added publicly indexed article history by exact account name

#### 0.1 — Initial release

- Keyword discovery and direct URL extraction
- Publisher, article, content, media, link, and identifier fields
- Text, HTML, and Markdown output
- Deduplication, retries, and graceful partial results
- Complete Apify input, output, and dataset schemas

# 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`):

Extract cleaned text, HTML and Markdown from every discovered article.

## `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": true,
  "includeImages": true,
  "maxItems": 10,
  "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": true,
    "includeImages": true,
    "maxItems": 10,
    "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": True,
    "includeImages": True,
    "maxItems": 10,
    "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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": true,
  "includeImages": true,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call haketa/wechat-official-account-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=haketa/wechat-official-account-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HoQvVW4P17eg4fidL/builds/PYTrueEF1gtx7w1xh/openapi.json
