# WeChat Articles Scraper — 微信公众号文章 Search & Full Text (`istmobot/wechat-articles-scraper`) Actor

Scrape WeChat Official Account (微信公众号) articles by keyword, account name or mp.weixin.qq.com link: title, real URL, account, biz ID, author, publish time, digest, cover, full text, HTML, images. Only-new monitoring mode. No login. $4 per 1,000 articles.

- **URL**: https://apify.com/istmobot/wechat-articles-scraper.md
- **Developed by:** [Istmobot](https://apify.com/istmobot) (community)
- **Categories:** Social media, News, AI
- **Security:** Limited permissions
- **Stats:** 10 total users, 10 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## WeChat Articles Scraper — 微信公众号文章采集 (Search, Full Text & Monitoring)

Scrape **WeChat Official Account (微信公众号) articles** by **keyword**, by **official account name**, or from **direct mp.weixin.qq.com links**. Get the title, the real article URL, account name, account biz ID, author, exact publish time, digest, cover image and, optionally, the **full text, HTML and images** of every article. **Monitoring mode** returns only new articles, so you can schedule it and track topics, brands or competitors in China. No WeChat account, no login, no API key.

搜狗微信搜索关键词 / 公众号名称 / 文章链接，导出标题、链接、公众号、biz、作者、发布时间、摘要、封面、正文和图片。

### What does WeChat Articles Scraper do?

- **Keyword search** of WeChat articles through Sogou WeChat search (weixin.sogou.com), up to 100 articles per keyword.
- **Real article URLs**: Sogou's `/link?url=...` redirects are resolved to `https://mp.weixin.qq.com/s?...` links.
- **Official account names**: returns indexed articles whose account name matches exactly (best effort, see FAQ).
- **Direct article URLs**: paste `mp.weixin.qq.com/s/...` links and get full content and metadata.
- **Full content** (optional): plain text, clean article HTML, all images, word count, author, account biz ID (`__biz`), account ID (`gh_...`), exact publish time and the **original article (原创)** flag.
- **Only new articles** mode for scheduled monitoring.
- Export as **JSON, CSV, Excel, HTML**, or use the Apify API, Make, Zapier, n8n, Google Sheets and webhooks.

### Use cases

- **China market and brand monitoring**: track what WeChat publishers write about your brand, product or competitors.
- **Media and PR tracking**: collect coverage of a topic, event or company across official accounts.
- **Investment and industry research**: follow sectors such as 新能源, 芯片 or AI in Chinese-language media.
- **AI and LLM datasets**: full article text for RAG, summarization, translation and sentiment analysis.
- **Competitor content analysis**: see what accounts publish, how often, and whether it is original or reposted.

### How to use it

1. Add **keywords** (Chinese works best, e.g. `人工智能`), **official account names** (e.g. `36氪`) and/or **article URLs**.
2. Set **Max results** per keyword/account (Sogou shows at most 100).
3. Turn on **Include full article content** for text, HTML, images, author and account IDs.
4. Click **Start** and download your data.

For monitoring, turn on **Only new articles** and [schedule](https://docs.apify.com/platform/schedules) the Actor, for example every 6 hours. Each run checks the top *Max results* for each keyword and returns only the articles you have not received yet.

### How much does it cost?

Pay per result, no subscription:

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| `article` (one article from search or URL) | **$0.004**, or $4 per 1,000 articles |
| `article-content` (only with *Include full article content*, and always for direct URLs) | $0.006 per article |

So search results cost **$4 per 1,000** and articles with full text cost **$10 per 1,000**. Errors (blocked requests, deleted articles, invalid URLs) are **never charged**. Proxy costs are included.

### Input

| Field | Default | Description |
|---|---|---|
| `keywords` | | Keywords to search on Sogou WeChat |
| `accounts` | | Exact official account names (公众号名称) |
| `articleUrls` | | `https://mp.weixin.qq.com/s/...` links |
| `maxResults` | `20` | Max articles per keyword and per account (1 to 100) |
| `includeContent` | `false` | Full text, HTML, images, author, biz ID, original flag |
| `onlyNew` | `false` | Return only articles not returned by previous runs |
| `proxyConfiguration` | Apify Proxy | Rotates IP and session automatically when Sogou shows a captcha |

Example:

```json
{
    "keywords": ["人工智能", "新能源汽车"],
    "accounts": ["36氪"],
    "articleUrls": ["https://mp.weixin.qq.com/s/_2kC-fXw7UjneZSrsC9CVQ"],
    "maxResults": 50,
    "includeContent": true
}
```

### Output

```json
{
    "title": "总台签约！讲好中国新能源汽车品牌故事",
    "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1793064518&ver=7051&signature=ntmWgLLq...",
    "accountName": "央视财经",
    "publishTime": "2026-10-27T00:54:35.000Z",
    "digest": "△中央广播电视总台总经理室党委书记任学安与赛力斯集团董事、副总裁康波代表双方签约...",
    "coverImage": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/nXgaYeEbuqia9Ac9iaDLd7fRRm5V.../0?wx_fmt=jpeg",
    "sogouDocId": "7931deb3a4f4979110ce9e9ec1c411f3",
    "source": "新能源汽车",
    "sourceType": "keyword",
    "searchQuery": "新能源汽车",
    "articleId": "MjM5NzQ5MTkyMA==_2658291567_2",
    "accountBiz": "MjM5NzQ5MTkyMA==",
    "accountId": "gh_9dc0e48d383a",
    "author": null,
    "isOriginal": false,
    "text": "10月26日，中央广播电视总台与赛力斯集团“品牌强国工程”战略合作签约活动在重庆举行……",
    "contentHtml": "<section>...</section>",
    "wordCount": 524,
    "images": ["https://mmbiz.qpic.cn/sz_mmbiz_jpg/y9A1qKVG.../640?wx_fmt=jpeg"],
    "permanentUrl": null,
    "scrapedAt": "2026-10-27T01:29:16.754Z"
}
```

`accountBiz`, `accountId`, `author`, `isOriginal`, `text`, `contentHtml`, `wordCount`, `images` and `articleId` (`biz_mid_idx`, stable across runs) are added by *Include full article content*. `author` is null when the publisher did not set one. Direct URL results also include `permanentUrl` (`__biz`, `mid`, `idx`, `sn`). Error rows have `errorType` and `error`.

### FAQ

**Do I need a WeChat account?** No. The Actor reads only public pages: Sogou WeChat search and public mp.weixin.qq.com article pages.

**Does it return read counts (阅读数) and likes (点赞/在看)?** No. WeChat shows read, like and share counts only inside the WeChat app to a logged-in user, through a per-user key. They are not on the public article page, so this Actor does not return them, and it never invents them.

**Are the article URLs permanent?** Search results link to the real `mp.weixin.qq.com` article, but Sogou hands out *signed* links (`src=11&timestamp=...&signature=...`) that WeChat may expire after some time. Use `articleId` (with content on) as a stable key, and fetch content in the same run if you need the text. URLs you paste yourself stay as they are.

**How many results per keyword?** Sogou shows at most 100 articles (10 pages) per query to visitors who are not logged in. Use more specific keywords to get more coverage.

**How do account names work?** Sogou's account search no longer returns results, so the Actor searches articles with the account name and keeps only articles whose account name matches exactly. It finds recent articles of well-indexed accounts (e.g. `36氪`), but it is not a complete account history.

**What about captchas?** Sogou shows a captcha (antispider) to an IP that sends too many requests. The Actor uses a fresh Apify Proxy IP and session for each block and retries, so you do not have to do anything. Datacenter proxy works; residential is not required.

**How does "Only new articles" work?** The Actor remembers the article IDs it returned for each keyword and account, in a key-value store in your account named `wechat-articles-scraper-state`. Delete that store to start over.

**Is it legal?** The Actor only reads public pages. You are responsible for how you use the data, including copyright and personal data rules.

Found a bug or need a field? Open an issue on the Actor's **Issues** tab. We usually reply within 24 hours.

# Actor input Schema

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

Search WeChat articles by keyword (Chinese or English), e.g. 人工智能, 新能源汽车, DeepSeek. Uses Sogou WeChat search; up to 100 articles per keyword.

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

Optional. Exact official account names (公众号名称), e.g. 36氪. Returns indexed articles whose account name matches exactly. Best effort: Sogou's account search is disabled, so coverage depends on what Sogou indexes.

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

Optional. Direct article links (https://mp.weixin.qq.com/s/... or ?\_\_biz=...\&sn=...). Always returns full content.

## `maxResults` (type: `integer`):

Maximum articles for each keyword and each account. Sogou shows at most 100 results per query.

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

Open each article to add full text, HTML, images, author, account biz ID, account ID (gh\_...), exact publish time and the original-article (原创) flag. Extra $0.006 per article.

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

Return only articles not returned by previous runs with this option on, per keyword and account. Schedule the Actor (e.g. every few hours) to monitor topics, brands or competitors.

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

Apify Proxy (datacenter works). The Actor switches to a fresh IP and session whenever Sogou shows a captcha.

## Actor input object example

```json
{
  "keywords": [
    "人工智能"
  ],
  "maxResults": 10,
  "includeContent": false,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "人工智能"
    ],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/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 = {
    "keywords": ["人工智能"],
    "maxResults": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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