# WeChat Official Account Scraper \[Only $2💰] | 公众号 Articles (`ahmed_jasarevic/wechat-official-account-scraper`) Actor

Scrape WeChat Official Account (公众号) articles: search the public Sogou index by keyword or fetch full text from mp.weixin.qq.com links. No browser, no WeChat login. Export JSON at $2 per 1,000 rows.

- **URL**: https://apify.com/ahmed_jasarevic/wechat-official-account-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.90 / 1,000 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

## WeChat Official Account Scraper (公众号) - Articles & Search

Extract WeChat Official Account (公众号) article data for Chinese media monitoring, brand monitoring and content research: search by keyword on the public Sogou WeChat index, or paste mp.weixin.qq.com article links to get the full text plus the account's gh\_ ID, WeChat ID, description and biz. Pure HTTP, no browser and no WeChat login, at **$2.00 per 1,000 rows**.

### Main Use Cases

- **WeChat article monitoring** - track articles by keyword over time and catch new posts.
- **Chinese media and brand monitoring** - watch what Official Accounts publish about a brand or topic.
- **Content and market research** - build a dataset of titles, snippets, accounts and publish dates.
- **WeChat account research** - resolve an account's gh\_ ID, WeChat ID (微信号), description and biz token.
- **News and article aggregation** - collect cards from the Sogou WeChat index into one dataset.
- **Full-text archiving** - pull the complete article text and HTML for public mp.weixin.qq.com links.

### How It Works - Build A WeChat Article Dataset Without A WeChat Login

The Actor is a lightweight HTTP scraper in three modes:

- **Keyword search** (`keyword` / `keywords`) queries the public Sogou WeChat article index (weixin.sogou.com) and returns one card per article.
- **Search URLs** (`searchUrls`) parse a pasted Sogou listing URL exactly like a keyword search.
- **Article URLs** (`articleUrls`) fetch a public mp.weixin.qq.com page and return the full text plus account fields.

Sogou hides each result behind a `/link?url=` hop. The Actor follows that hop in the same cookie session (and honours a proxy if one is set) to recover the real `mp.weixin.qq.com` URL, then can fetch its full text with a headless-free Cheerio pass over the article page. No headless browser is used at any point, and no WeChat session is required. Verified working through Apify Proxy; an optional proxy is recommended because Sogou weakens its anti-spider challenge when requests come from a clean IP. `maxItems` controls the total number of rows, and keyword searches automatically fetch enough Sogou pages (about 10 cards per page, up to 10 pages) to reach it, so there is no page setting to tune.

### Input Parameters

| Field | Type | Required | Default | Notes |
| --- | --- | --- | --- | --- |
| `keyword` | string | No | `人工智能` prefill | One keyword for the Sogou public WeChat article index. Chinese terms return more. |
| `keywords` | array (string) | No | - | Several keywords in one run; each is searched on weixin.sogou.com. |
| `articleUrls` | array (string) | No | - | Public article links such as `https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg`. These return the full text plus the account's ID, WeChat ID and description. |
| `searchUrls` | array (string) | No | - | Sogou listing URLs such as `https://weixin.sogou.com/weixin?type=2&query=tesla`. Each card is parsed the same way as a keyword search. |
| `resolveRealUrls` | boolean | No | `true` | Follow each Sogou `/link` hop to the real `mp.weixin.qq.com` URL. Adds about 2 seconds per result. Recommended. |
| `includeFullText` | boolean | No | `false` | After resolving, also fetch each article and add `contentText` / `contentHtml` and account ID / WeChat ID. Needs `resolveRealUrls`. Makes rows large. |
| `maxItems` | integer | No | `50` | Total rows to write. Keyword searches fetch enough Sogou pages to reach this number (about 10 cards per page, up to 10 pages). |
| `concurrency` | integer | No | `4` | How many link resolutions / full-text fetches run in parallel. Higher is faster but more likely to trigger Sogou's anti-spider. 3-5 is a safe range. |
| `proxy` | object | No | - | Optional but recommended. A clean IP keeps Sogou's anti-spider challenge away; Apify Proxy works well. |

### Output Fields

One dataset row per article. Rows are distinguished by `source` (`"sogou"` for a search card, `"wechat"` for a fetched article page) and `type` (always `"article"`).

- Search-card rows (`source: "sogou"`): `title`, `snippet`, `accountName`, `sogouUrl`, `articleUrl` (resolved), `coverUrl`, `publishedAt`, `publishedTs`, `keyword`, `positionInPush`, `isPaid`; plus `contentText` / `contentHtml` and `accountId` / `accountAlias` when `includeFullText` is on.
- Full-text rows (`source: "wechat"`): `title`, `accountName`, `accountId` (`gh_...`), `accountAlias` (WeChat ID / 微信号), `accountDescription`, `biz`, `coverUrl`, `publishedAt`, `contentText`, `contentHtml`.
- Timing: `scrapedAt` is an ISO timestamp on every row.

Four dataset views are defined: `overview`, `account`, `links` and `content`. On the run page, open the Storage tab and pick a view from the Dataset dropdown to inspect results.

**Not included by design:** WeChat read counts, likes, comments and replies require a WeChat session (login or a private token). They are not exposed on the public page (the article HTML ships `read_num` empty and the `getappmsgext` / `appmsg_comment` endpoints answer "no session"), so this build does not emit them. Third-party WeChat data APIs solve that by holding a session. Sogou account search and WeChat's native search API are also out of scope for this build.

### Example Input And Output

Example input (keyword search with real URLs and full text):

```json
{ "keywords": ["人工智能"], "maxItems": 50, "includeFullText": true, "proxy": { "useApifyProxy": true } }
```

Example input (full text from a pasted article link):

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

Example search-card row:

```json
{
  "type": "article",
  "source": "sogou",
  "keyword": "人工智能",
  "title": "AI改变生产,中国改变结局",
  "snippet": "近日,人工智能大会在...",
  "accountName": "人民日报",
  "articleUrl": "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
  "sogouUrl": "https://weixin.sogou.com/link?url=...",
  "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/...",
  "publishedAt": "2026-10-08T02:30:00.000Z",
  "publishedTs": 1759881000000,
  "positionInPush": 1,
  "isPaid": false,
  "scrapedAt": "2026-10-11T09:30:00.000Z"
}
```

Example full-text row (fields added when the article page is fetched):

```json
{
  "type": "article",
  "source": "wechat",
  "title": "AI改变生产,中国改变结局",
  "accountName": "人民日报",
  "accountId": "gh_cb38c7c55347",
  "accountAlias": "rmrbwx",
  "accountDescription": "参与、沟通、记录时代。",
  "biz": "MzA5MjM2NTY0MA==",
  "articleUrl": "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
  "publishedAt": "2026-10-08T02:30:00.000Z",
  "contentText": "全文内容...",
  "contentHtml": "<p>全文...</p>",
  "scrapedAt": "2026-10-11T09:31:00.000Z"
}
```

### Integrations & Automation

- **Apify API** - run via `POST https://api.apify.com/v2/acts/{actorId}/runs`, export via `GET /v2/datasets/{datasetId}/items?clean=true&format=json`.
- **Schedules** - run daily to monitor a keyword such as a brand name and catch new articles (recurring usage also improves Store recommendation signals).
- **Webhooks** - fire on run finished to push new articles into a news or BI pipeline.
- **Zapier / Make** - via the Apify integration, e.g. new articles into Google Sheets, Notion or Slack.
- **Pay-per-event** - $2.00 per 1,000 rows (`result`), plus $1.50 per 1,000 when `resolveRealUrls` runs (`resolved-real-url`) and $4.00 per 1,000 when `includeFullText` runs (`full-article-text`), plus a $0.003 run start.

### Related Actors

- [wechat-official-account-scraper](https://apify.com/zen-studio/wechat-official-account-scraper): the largest WeChat Official Account actor on the Store, with many operations.
- [wechat-official-account-data-scraper](https://apify.com/sian.agency/wechat-official-account-data-scraper): a broader WeChat data actor covering articles, accounts and comments.
- [sogou-wechat-article-search-scraper](https://apify.com/automation-lab/sogou-wechat-article-search-scraper): a Sogou article search actor using the same public index.
- [wechat-channels-scraper](https://apify.com/zen-studio/wechat-channels-scraper): WeChat Channels (视频号) short-video data for the video side of the same ecosystem.
- [wechat-channels-video-downloader](https://apify.com/agentflow/wechat-channels-video-downloader): resolves WeChat Channels video CDN URLs.

### FAQ

#### Is there a WeChat Official Account API?

Not a public one. WeChat serves Official Account articles from `mp.weixin.qq.com` without a third-party content API, and read / like counts require an authenticated session. This Actor uses the public Sogou WeChat index to discover articles and reads the public article pages directly.

#### Can I scrape WeChat articles without a WeChat login?

Yes. Search, URL resolution and public full-text extraction are all HTTP-only and need no WeChat account. Only session-gated fields (read counts, likes, comments) are unavailable without a login, and this build does not emit them.

#### What are the alternatives to this WeChat scraper?

Store alternatives include zen-studio/wechat-official-account-scraper (many operations, per-operation prices), sian.agency/wechat-official-account-data-scraper (article, account and comment events) and automation-lab/sogou-wechat-article-search-scraper (Sogou article search). This actor is a pure-HTTP Sogou plus full-text option at $2.00 per 1,000 rows.

#### How do I search WeChat articles by keyword?

Set `keyword` for one term or `keywords` for several. Chinese terms return more results. The Actor paginates Sogou automatically (about 10 cards per page, up to 10 pages) until `maxItems` is reached.

#### Can I get the full text of a mp.weixin.qq.com article?

Yes. Pass the link in `articleUrls`, or turn on `includeFullText` so resolved search results are also fetched. Full text is written to `contentText` and `contentHtml`, together with the account's `accountId`, `accountAlias` and `description`.

#### Does it return read counts or comments?

No. WeChat read / like counts and comments are session-gated and are not on the public page, so this build does not emit them.

#### Which Sogou URL format does it accept?

Any WeChat article listing URL, for example `https://weixin.sogou.com/weixin?type=2&query=tesla`, passed in `searchUrls`.

#### How much does a run cost?

$2.00 per 1,000 rows (`result`). With `resolveRealUrls` (default on) add $1.50 per 1,000 rows (`resolved-real-url`); with `includeFullText` add $4.00 per 1,000 rows (`full-article-text`). A $0.003 run start applies once.

### SEO Keywords

wechat official account scraper, wechat api, wechat article data, scrape wechat articles, sogou wechat search, wechat article monitoring, chinese media monitoring, wechat account research, 公众号 scraper, wechat official account articles, wechat public account data, mp.weixin.qq.com, wechat article full text, wechat account id, wechat official account dataset, wechat keyword search, chinese social media data, brand monitoring china, news aggregation, wechat article csv

### For AI Agents & LLM Apps

- **Purpose**: returns one JSON row per WeChat Official Account article, either a Sogou search card (`source: "sogou"`) or a fetched full-text page (`source: "wechat"`), with title, account, URL, publish time and optional full text.
- **Minimal working input**:

```json
{ "keyword": "人工智能", "maxItems": 5 }
```

- **Variant input** (full text from a specific public article):

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

- **Output field names**: `type, source, keyword, title, snippet, accountName, accountId, accountAlias, accountDescription, biz, coverUrl, articleUrl, sogouUrl, publishedAt, publishedTs, positionInPush, isPaid, contentText, contentHtml, scrapedAt`.
- **Behaviors an agent should know**:
  - Input priority: `articleUrls` fetches full articles, `searchUrls` parses pasted Sogou listings, and `keyword` / `keywords` run Sogou searches. You can combine them; rows are distinguished by `source`.
  - `includeFullText` has no effect unless `resolveRealUrls` is `true` (default); it adds a billed `full-article-text` event per article and makes rows large.
  - `resolveRealUrls: true` (default) adds a billed `resolved-real-url` event per resolved row. Turning it off leaves `articleUrl` unset and keeps only `sogouUrl`.
  - If a Sogou `/link` hop hits the anti-spider challenge, the row keeps `sogouUrl` and `articleUrl` stays unset; do not treat that as a failed row.
  - `maxItems` is the total row budget across all modes; keyword searches auto-paginate Sogou to reach it (about 10 cards per page, up to 10 pages).
  - `concurrency` above 5 raises the chance of Sogou anti-spider blocks; 3-5 is safe.
- **Billing**: pay-per-event - $0.002 per row (`result`), +$0.0015 per row when `resolveRealUrls` runs, +$0.004 per row when `includeFullText` runs, $0.003 per run start. Tiered pricing may be lower on higher Apify plans.

### Legal & Compliance Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Tencent (WeChat, mp.weixin.qq.com) or Sogou. It accesses only publicly available pages and public search results; it does not log in to WeChat, does not bypass authentication and does not access session-gated fields such as read counts or comments.

Users are responsible for complying with WeChat's and Sogou's terms of service and applicable data-protection law (including China's PIPL and, where relevant to your audience, GDPR). Article text and account names may be subject to copyright; use the data for lawful purposes such as media monitoring, research and aggregation, and respect the source platforms' terms.

# Actor input Schema

## `keyword` (type: `string`):

One keyword for the Sogou public WeChat article index. Chinese terms return more. Example: 人工智能.

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

Several keywords in one run. Each is searched on weixin.sogou.com.

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

Public article links, e.g. https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg. These return the full text plus the account's ID, WeChat ID and description.

## `searchUrls` (type: `array`):

Paste a Sogou listing such as https://weixin.sogou.com/weixin?type=2\&query=tesla. Each card is parsed the same way as a keyword search.

## `resolveRealUrls` (type: `boolean`):

Follow each Sogou /link hop to the real mp.weixin.qq.com URL. Adds about 2 seconds per result. Recommended.

## `includeFullText` (type: `boolean`):

After resolving, also fetch each article and add contentText/contentHtml and account ID/WeChat ID. Needs Resolve real article URLs. Makes rows large.

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

Total rows to write. Keyword searches fetch enough Sogou pages to reach this number (about 10 cards per page, up to 10 pages).

## `concurrency` (type: `integer`):

How many link resolutions / full-text fetches run in parallel. Higher is faster but more likely to trigger Sogou's anti-spider. 3-5 is a safe range.

## `proxy` (type: `object`):

Optional but recommended. Sogou weakens its anti-spider challenge when requests come from a clean IP; Apify Proxy works well.

## Actor input object example

```json
{
  "keyword": "人工智能",
  "resolveRealUrls": true,
  "includeFullText": false,
  "maxItems": 50,
  "concurrency": 4
}
```

# Actor output Schema

## `articles` (type: `string`):

Default dataset with one row per article: title, account name/ID/biz, publish time, article and Sogou URLs, cover image, and optionally the full article text.

# 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 = {
    "keyword": "人工智能"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/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 = { "keyword": "人工智能" }

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/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 '{
  "keyword": "人工智能"
}' |
apify call ahmed_jasarevic/wechat-official-account-scraper --silent --output-dataset

```

## MCP server setup

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