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

Scrape WeChat Official Account (微信公众号) articles without login: search by keyword, filter by account, and get full text, images, author, account and publish date. Also accepts article links. $3 per 1,000 articles.

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

## Pricing

from $3.00 / 1,000 article with texts

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

Scrape articles of WeChat Official Accounts (微信公众号) **without a WeChat account, without logging in and without cookies**.

- 🔎 **Keyword search**: up to 100 articles per keyword through Sogou WeChat search (搜狗微信搜索, weixin.sogou.com).
- 📄 **Full article text**: clean text with line breaks, all image URLs, author, account name and ID (`gh_…`), exact publish time, IP location (IP属地), cover and summary. Optionally the article HTML.
- 🔗 **Article URLs**: paste article links (`https://mp.weixin.qq.com/s/…`) and get the same data.
- 👤 **Account filter**: keep only articles from the accounts you choose.
- 🖼️ **Picture posts (图片消息)**: their text and every picture.

Typical uses: media monitoring and PR in China, brand and competitor tracking, market research, sentiment analysis, building datasets for AI/LLM training and RAG.

### How to use

1. Add search keywords and/or article URLs.
2. Optionally choose accounts to keep, or turn off **Include article text** for a faster and cheaper list of results.
3. Click **Start**, then download the results as JSON, CSV, Excel or via the API.

#### Input examples

Search with full text:

```json
{
    "searchQueries": ["人工智能", "新能源汽车"],
    "maxResultsPerQuery": 50
}
```

Only articles from chosen accounts:

```json
{
    "searchQueries": ["咖啡", "露营"],
    "maxResultsPerQuery": 20,
    "onlyFromAccounts": ["人民日报", "新周刊"]
}
```

Specific articles:

```json
{
    "articleUrls": ["https://mp.weixin.qq.com/s/RfesuMcgOibBGtDfIY2VYA"]
}
```

Search results only (title, link, summary, account, date), without opening the articles:

```json
{
    "searchQueries": ["咖啡"],
    "maxResultsPerQuery": 100,
    "includeContent": false
}
```

### Output

Each article is one row. The **Articles** tab of the dataset shows them as a table and the **Full text** tab shows the text.

Article row (from a real run, text and image list shortened):

```json
{
    "type": "article",
    "title": "“咖啡”也“逆行”",
    "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1793563430&ver=7062&signature=4XO4zPcfXZhGYIR2Erg0a05-bt9d*xRecyWGNqQ4bdNN9hatayNlq6BnMWW*W4mhYj9r5-tpKHxZN067toSslNmQxr8YB3D8FlOBx6zjUSH-V8tdRXz3gjmUKFSJxvmA&new=1",
    "urlIsTemporary": true,
    "accountName": "人民日报",
    "listedAccountName": "人民日报",
    "accountId": "gh_363b924965e9",
    "accountBiz": "MjM5MjAxNDM4MA==",
    "author": null,
    "publishedAt": "2020-02-16T11:18:39Z",
    "ipLocation": "北京",
    "summary": "武汉光谷Wakanda轻饮咖啡店本已放假歇业但是为了一群特殊的客户店里7位年轻咖啡师做了一个大胆的决定让咖啡也“逆行”湖北省...",
    "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/xrFYciaHL08DibUojib7BD2VUYtRah7Forn6dht0AIqXXeFWm4HiceoW2JgDxwZqd8XtceXTjCzNAooXd5hAyBmFew/0?wx_fmt=jpeg",
    "content": "武汉光谷Wakanda轻饮咖啡店\n本已放假歇业\n但是\n为了一群特殊的客户\n店里7位年轻咖啡师\n做了一个大胆的决定\n让咖啡也“逆行”\n…",
    "images": [
        "https://mmbiz.qpic.cn/mmbiz_jpg/azXQmS1HA7mTKs1p0QHicERjXxhzK7hjqvh0Uz55Z78GwRNAc9E0n0KMFRAZpwfgfZEnyuPqptUxjYn9rvaOt7w/640?wx_fmt=jpeg"
    ],
    "contentLength": 819,
    "itemShowType": 0,
    "mid": "2666297462",
    "idx": 1,
    "source": "search:咖啡",
    "keyword": "咖啡",
    "rank": 2,
    "error": null,
    "scrapedAt": "2026-11-01T20:03:56Z"
}
```

- `accountName` is the account shown on the article page. `listedAccountName` is the account name in the Sogou search result; the two sometimes differ.
- `publishedAt` is in UTC. With article text on it is the exact time from the article page; with it off, it is the time Sogou shows, which can differ.
- `rank` is the position in the Sogou results for `keyword`. `source` is `search:<keyword>` or `url`.
- `urlIsTemporary` is `true` for the signed links (`?src=11&timestamp=…&signature=…`) that Sogou search results point to. `accountBiz`, `mid` and `idx` together identify an article.
- `itemShowType`: `0` article, `8` picture post, `5` video post. Video posts have no text: you get the title, account, date and cover, with a note in `error`.
- `error` explains why a row has no text, for example when WeChat says the account has moved (该公众号已迁移) or does not show the article.

Which fields are filled depends on the input:

| Field | Search, text on | Search, text off | Article URL |
|---|---|---|---|
| title, url, accountName, publishedAt, summary, coverUrl | ✅ | ✅ | ✅ |
| content, images, author, accountId, accountBiz, ipLocation, mid, idx, itemShowType | ✅ | — | ✅ |
| keyword, rank, listedAccountName | ✅ | ✅ | — |

### Pricing

Pay only for what you get — no monthly rental:

| What | Price |
|---|---|
| Article with text | **$3.00 per 1,000 articles** ($0.003 each) |
| Result without article text | **$1.00 per 1,000 results** ($0.001 each) |

A row costs the lower price when it has no article text: with **Include article text** off, for video posts, and when WeChat does not show the article. Articles skipped by the account filter are not charged.

Set a maximum cost per run in the run options; the actor stops cleanly when it is reached and keeps everything scraped so far.

### Tips and limits

- **Speed**: about 30 articles per minute with text; faster with text off.
- **100 results per keyword**: Sogou shows at most 10 pages of 10 results. Use several related keywords to collect more.
- **Order**: Sogou's own order. Visitors who are not logged in cannot filter by date on Sogou, so neither can this actor.
- **Account filter**: Sogou only finds articles that match your keywords, so use keywords the chosen accounts write about. Searching for an account's name mostly finds other accounts' articles that mention it. With article text on, every result is opened to check its account, so filtered runs take longer.
- **Long links** (`https://mp.weixin.qq.com/s?__biz=…&sn=…`) fail: WeChat shows a captcha for them to visitors who are not logged in. Use short links (`https://mp.weixin.qq.com/s/…`).
- **Not included**: read counts (阅读数), likes, "在看" and comments.
- **Proxy**: not needed for small runs. Sogou limits how many searches one IP can make; for many keywords, turn on Apify Proxy in the input.

### 中文说明

免登录、免 Cookie、无需微信号，采集微信公众号文章：按关键词搜索（通过搜狗微信搜索，每个词最多 100 篇），获取全文（保留换行）、全部图片、作者、公众号名称和原始 ID（gh\_…）、精确发布时间、IP 属地、封面和摘要；也可以直接粘贴文章短链接（mp.weixin.qq.com/s/…）。可只保留指定公众号的文章（未保留的不收费）。按条计费：带全文的文章 $3/千篇，不带全文的结果 $1/千条，可设置单次运行费用上限。不包含阅读数、点赞、在看和留言。

### Is it legal?

The actor only collects articles that WeChat and Sogou show publicly to visitors who are not logged in. It does not collect readers' data or comments. Make sure your use of the data complies with the laws that apply to you and with the terms of WeChat and Sogou.

# Actor input Schema

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

Keywords to search WeChat Official Account articles for (through Sogou WeChat search, the same results as weixin.sogou.com). Chinese keywords work best.

## `maxResultsPerQuery` (type: `integer`):

Sogou shows at most 100 articles per keyword. Use several related keywords to collect more.

## `onlyFromAccounts` (type: `array`):

Optional. Keep only articles from accounts with exactly these names, for example 人民日报. Only the search results of your keywords are filtered (up to 100 per keyword), so use keywords these accounts write about. Sogou sometimes lists an article under a different account name than the article itself shows, so with article text on, each result is opened and both names are checked (slower). Skipped articles are not charged.

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

Scrape specific articles. Use short links such as https://mp.weixin.qq.com/s/AbCdEf…. Long links with \_\_biz=…\&sn=… are shown a captcha by WeChat and will fail.

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

Open every article and save its full text, images, author and account ID. Turn off to save only the search result (title, link, summary, account, date): faster and cheaper.

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

Also save the article body as HTML (contentHtml). Makes the dataset much larger.

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

Turn on Apify Proxy if Sogou starts asking for a captcha on large runs. Every keyword then uses a fresh IP.

## Actor input object example

```json
{
  "searchQueries": [
    "人工智能"
  ],
  "maxResultsPerQuery": 10,
  "includeContent": true,
  "includeHtml": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All results are saved to the default dataset: one item per article with title, account, publish date, full text and images.

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "searchQueries": [
        "人工智能"
    ],
    "maxResultsPerQuery": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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