# WeChat (微信公众号) Article Scraper — Keyless Content & Discovery (`foxlabs/wechat-article-scraper`) Actor

Scrape WeChat official-account (公众号) articles by keyword, account name or URL: title, account, publish time, full text and images. No login, no API key.

- **URL**: https://apify.com/foxlabs/wechat-article-scraper.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 delivered articles

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 (微信公众号) Article Scraper — Keyless Content & Discovery

Scrape **WeChat official-account (公众号) articles** into clean datasets — **by keyword, by account name, or by URL** — with **no login, no account, no cookies and no API key**. You get the **title, account, publish time, full article text and images**, discovered automatically through Sogou Weixin and read from the article's own public page.

### 🔥 What is it — and when should you use it?

WeChat official accounts are where Chinese brands, media and experts publish. This Actor gives you two things in one, keyless:

1. **Zero-config discovery** — type a keyword (e.g. `人工智能`) or an account name and it finds recent public articles via **Sogou Weixin**, so you don't need to know the URLs.
2. **Full article content** — for each article it reads the public `mp.weixin.qq.com` page and returns **title, account name, account id (biz), author, publish time, summary, full body text and image URLs**.

Use it for content & competitive intelligence, brand monitoring, trend research, dataset building for NLP, and tracking what a topic or account is publishing.

### 🤖 Use with AI agents

**Pay-per-event** and agent-friendly: run with a single keyword, or pass article URLs. Each result row is one clean article record. Point any MCP-enabled assistant (Claude, ChatGPT, Cursor) at it on the Apify MCP server, or call the Apify API. You pay only per delivered article; empty runs are free.

### 📋 Overview

| | |
|---|---|
| **Discovery** | weixin.sogou.com (keyword / account search) |
| **Content** | mp.weixin.qq.com (the article's own public page) |
| **Auth** | None — no login, cookie, account or API key |
| **Method** | Pure HTTP over a rotating Apify proxy exit; no browser |
| **Output** | One `article` row per delivered article |
| **Billing** | Pay per delivered article |

### ✨ Features

- 🔓 **Keyless** — no login, no account, no cookies, no third-party service.
- 🧭 **Zero-config discovery** — a keyword or account name is enough; no URLs needed.
- 📄 **Full content** — title, account, account id (biz), author, publish time, summary, full body text, images.
- 🧱 **No browser** — pure HTTP; Sogou's result links are resolved to the real article in-process.
- 🔁 **Resilient** — a fresh proxy exit per request; throttled exits rotate.
- 🧭 **Honest scope** — every field is `null` when the page did not carry it; never a fake value. Read/like counts are **not** scraped (see below).

### 🎬 Quick Start

Discover by keyword:

```json
{ "queries": ["人工智能"], "maxArticlesPerQuery": 10 }
```

By account name:

```json
{ "queries": ["量子位"], "maxArticlesPerQuery": 10 }
```

Specific article URLs:

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

### 📥 Input

| Field | Type | Description |
|---|---|---|
| `queries` | array | Keywords or account names to discover articles via Sogou. |
| `articleUrls` | array | Direct `mp.weixin.qq.com/s` (or Sogou `/link`) URLs. Works alone. |
| `maxArticlesPerQuery` | integer | Cap per query. Default `10`. |
| `maxPages` | integer | Sogou result pages per query (10 each). Default `1`. |
| `maxArticles` | integer | Total cap across the run. Default `50`. |
| `proxyConfiguration` | object | Apify Proxy; datacenter is enough, switch to residential only if blocked. |

### 📤 Output

Each row is one `article`:

```json
{
  "resultType": "article",
  "title": "量子位2026人工智能年度榜单,正式启动!",
  "account": "量子位",
  "biz": "MzIzNjc1NzUzMw==",
  "author": "关注前沿科技",
  "publishTime": "2026-10-28T01:30:00.000Z",
  "publishTimestamp": 1793180000,
  "url": "https://mp.weixin.qq.com/s/XXXXXXXXXXXXXXXXXXXXXX",
  "summary": "…",
  "cover": "https://mmbiz.qpic.cn/…",
  "images": ["https://mmbiz.qpic.cn/…"],
  "imageCount": 7,
  "contentText": "…full article body text…",
  "contentLength": 2382,
  "scrapedAt": "2026-10-28T…"
}
```

Download the dataset as JSON, CSV, Excel or HTML.

### 🧾 Data table

| Field | Description |
|---|---|
| `title` | Article title |
| `account` | Official-account name (公众号) |
| `biz` | Account id (`__biz`) |
| `author` | Byline (null when none) |
| `publishTime` / `publishTimestamp` | Publish time (ISO + unix) |
| `url` | Article URL |
| `summary` | Article summary (null when none) |
| `cover` | Cover image URL |
| `images` / `imageCount` | In-body image URLs |
| `contentText` / `contentLength` | Full body text + length |

### 🧠 How it works

Discovery uses Sogou Weixin's public article search. Each result is a temporary Sogou link that the Actor resolves to the real `mp.weixin.qq.com` article URL in-process (no browser — it joins the page's own redirect parts). The article page is then read directly for its public fields. No login, no signature, no CAPTCHA service.

### 🧪 Data quality — measured (2026-10-28)

On 3 fresh articles discovered keyless over a datacenter exit: **title, account, biz, publish time, body text and images filled 3/3**; `summary` 2/3 and `author` 2/3 (the rest were honestly `null` — the page carried no summary / byline). Bodies ranged 875–2,382 characters.

### 💼 Use cases

- **Content & competitive intelligence** — what a topic or account is publishing.
- **Brand monitoring** — track mentions across official accounts.
- **Trend research & NLP datasets** — full article text at scale.

### 🔗 Integration

Schedule it, connect to Make / Zapier / n8n, or call the Apify API. Each run's counts are written to the `SOURCE_REPORT` key-value record.

### 📊 Pricing

**Pay per delivered article.** Empty runs are free. See the pricing panel for the current rate.

### ❓ FAQ

- **Does it need my WeChat login or cookies?** No. It never logs in and never asks you for an account, cookie or proxy.
- **Does it return read counts, likes or 在看?** No. Those come only from WeChat's signed mobile endpoint and are deliberately out of scope — we never fake them.
- **Why is a field null?** The article page did not carry it (e.g. no byline or summary). It is never faked.

### 🐛 Troubleshooting

- **A run returned little/nothing:** a Sogou exit was rate-limited — rerun (exits rotate) or reduce the number of queries.
- **An article URL was skipped:** it was not a `mp.weixin.qq.com` / Sogou link, or the article was deleted.

### 🚧 What it does not do

It reads publicly served pages. It does not log in, does not scrape private content, does not return read/like/share counts, and does not fabricate missing fields.

### ⚖️ Is it legal to scrape WeChat articles?

The Actor reads only publicly served, non-personal article content (title, account, text, images). Use the data in line with the sources' terms and applicable law; do not store personal data without a lawful basis.

### 🤝 Support & contact

Questions or a custom need? Open an issue on the Actor's Issues tab.

### Changelog

See `CHANGELOG.md`.

# Changelog

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

# Actor input Schema

## `queries` (type: `array`):

Search terms to discover WeChat official-account (公众号) articles via Sogou Weixin. A keyword (e.g. 人工智能) or an account name both work. Leave empty if you only pass article URLs below.

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

Direct mp.weixin.qq.com/s article URLs (or Sogou weixin.sogou.com/link URLs) to scrape. Works on its own, without any query.

## `maxArticlesPerQuery` (type: `integer`):

Cap on articles discovered per query (Sogou serves ~10 per page).

## `maxPages` (type: `integer`):

Sogou result pages to walk per query (10 articles each).

## `maxArticles` (type: `integer`):

Hard cap on delivered articles across the whole run (deduplicated).

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

Apify Proxy with a fresh exit per request. Default datacenter is enough (measured); Sogou throttles under volume, so exits rotate. Switch to residential only if datacenter exits get blocked.

## Actor input object example

```json
{
  "queries": [
    "人工智能"
  ],
  "articleUrls": [],
  "maxArticlesPerQuery": 10,
  "maxPages": 1,
  "maxArticles": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `report` (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 = {
    "queries": [
        "人工智能"
    ],
    "articleUrls": [],
    "maxArticlesPerQuery": 10,
    "maxArticles": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/wechat-article-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 = {
    "queries": ["人工智能"],
    "articleUrls": [],
    "maxArticlesPerQuery": 10,
    "maxArticles": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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