# WeChat Scraper – Search & Full Articles (`scrapingmonkey/wechat-article-scraper`) Actor

Search WeChat Official Account articles, resolve Sogou links, extract full text, HTML, images and publisher metadata, and monitor new publications.

- **URL**: https://apify.com/scrapingmonkey/wechat-article-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Categories:** Automation, News, Social media
- **Stats:** 2 total users, 2 monthly users, 92.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 article search 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

## WeChat Article Scraper - Search, Full Text and Monitoring

Search public WeChat Official Account articles through Sogou, resolve fresh article links, extract complete public text and HTML, and monitor new publications without a WeChat account or browser.

- Search multiple keywords or publisher names with public pagination
- Resolve temporary Sogou redirect pages into canonical `mp.weixin.qq.com` article URLs
- Extract titles, publishers, publication dates, complete text, HTML, images, links, and public IDs
- Batch direct article URLs and check whether articles remain publicly available
- Monitor keyword or publisher searches and emit only new or changed rows
- Keep public boundaries explicit: comments, views, likes, shares, private accounts, and Channels feeds are not claimed
- Use Apify Residential Proxy automatically; no WeChat account, cookies, browser, or proxy setup is required
- Export results to JSON, CSV, Excel, XML, or access them through the Apify API

### What can you do with this Actor?

| Mode | Input | Output | Best for |
| --- | --- | --- | --- |
| `articleSearch` | Keywords or publisher names | Public article search rows | Discovery and SERP-style research |
| `searchAndExtract` | Keywords or publisher names | Search results enriched into full article rows | End-to-end content collection |
| `articleDetails` | Direct public article URLs | Complete public article records | Archiving and NLP pipelines |
| `resolveLinks` | Fresh Sogou redirect URLs | Resolved canonical article URLs | Converting temporary discovery links |
| `articleStatus` | Direct article URLs | Explicit public availability rows | Link-health checks |
| `publisherMonitor` | Publisher names or keywords | Only newly discovered search rows | Scheduled publication monitoring |
| `auto` | Mixed terms and URLs | Automatically routed records | Batch processing heterogeneous inputs |

One run uses one selected mode. You can batch multiple search terms, publishers, article URLs, or redirect URLs. `searchAndExtract` connects discovery and extraction in one workflow while preserving search provenance on the article row.

### Quick start

1. Open the Actor and click **Try for free**.
2. Keep `articleSearch` mode and enter a search term.
3. Choose the result and page limits.
4. Click **Start**.
5. Preview the single **Results** table or download it in your preferred format.

The default input searches for `人工智能` and returns current public article results.

### Input examples

#### Search public articles

```json
{
  "mode": "articleSearch",
  "searchTerms": ["人工智能", "跨境电商"],
  "maxItems": 50,
  "maxPages": 3
}
```

`maxItems` applies to each search or publisher input. One search dataset row represents one public result exposed by Sogou Weixin.

#### Search and extract full article content

```json
{
  "mode": "searchAndExtract",
  "searchTerms": ["人工智能"],
  "maxItems": 10,
  "maxPages": 2,
  "includeText": true,
  "includeHtml": true,
  "includeImages": true,
  "includeLinks": true
}
```

#### Extract direct article URLs

```json
{
  "mode": "articleDetails",
  "articleUrls": [
    "https://mp.weixin.qq.com/s/example-public-article"
  ],
  "includeText": true,
  "includeHtml": true
}
```

#### Resolve Sogou links

```json
{
  "mode": "resolveLinks",
  "redirectUrls": [
    "https://weixin.sogou.com/link?url=example"
  ]
}
```

#### Check article status

```json
{
  "mode": "articleStatus",
  "articleUrls": [
    "https://mp.weixin.qq.com/s/example-public-article"
  ]
}
```

#### Monitor a publisher or keyword

```json
{
  "mode": "publisherMonitor",
  "publisherNames": ["人民日报"],
  "maxItems": 50,
  "monitorMode": "onlyNew",
  "monitorKey": "peoples-daily-wechat"
}
```

Publisher discovery uses public article search; it does not access an authenticated Official Account profile or follower graph.

#### Auto-detect mixed inputs

```json
{
  "mode": "auto",
  "searchTerms": ["生成式AI"],
  "startUrls": [
    {"url": "https://mp.weixin.qq.com/s/example-public-article"},
    {"url": "https://weixin.sogou.com/link?url=example"}
  ],
  "maxItems": 20
}
```

### Complete output examples

Every search, article, resolved-link, and status record has the same fixed set of **38 top-level fields**. Non-applicable fields are returned as `null` or empty arrays and remain visible in the single Results table.

#### Complete article search row - 38 top-level fields

```json
{
  "recordType": "articleSearchResult",
  "sourceMode": "articleSearch",
  "inputTarget": "人工智能",
  "sourceUrl": "https://weixin.sogou.com/weixin?type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&page=1",
  "sourceEndpoints": [
    "https://weixin.sogou.com/weixin?type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&page=1"
  ],
  "articleId": null,
  "resolvedUrl": null,
  "sogouRedirectUrl": "https://weixin.sogou.com/link?url=public-example",
  "query": "人工智能",
  "page": 1,
  "rank": 1,
  "title": "人工智能行业观察",
  "summary": "A public article summary returned by Sogou Weixin.",
  "accountName": "Example Official Account",
  "accountId": null,
  "biz": null,
  "appmsgId": null,
  "articleIndex": null,
  "commentId": null,
  "publishedUnix": 1786582800,
  "publishedAt": "2026-08-13T01:00:00+00:00",
  "coverUrl": "https://mmbiz.qpic.cn/public-cover.jpg",
  "contentText": null,
  "contentHtml": null,
  "contentTextLength": 0,
  "contentHtmlLength": 0,
  "imageUrls": null,
  "imageCount": 0,
  "outboundLinks": null,
  "linkCount": 0,
  "search": null,
  "status": "searchResult",
  "boundaryReason": null,
  "monitorStatus": null,
  "changedFields": null,
  "previousCapturedAt": null,
  "capturedAt": "2026-08-13T10:25:00.000000+00:00",
  "raw": null
}
```

#### Complete full article row - 38 top-level fields

```json
{
  "recordType": "article",
  "sourceMode": "searchAndExtract",
  "inputTarget": "人工智能",
  "sourceUrl": "https://mp.weixin.qq.com/s/example-public-article",
  "sourceEndpoints": [
    "https://weixin.sogou.com/weixin?type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&page=1",
    "https://weixin.sogou.com/link?url=public-example",
    "https://mp.weixin.qq.com/s/example-public-article"
  ],
  "articleId": "MzA1Example:2650012345:1",
  "resolvedUrl": "https://mp.weixin.qq.com/s/example-public-article",
  "sogouRedirectUrl": null,
  "query": null,
  "page": null,
  "rank": null,
  "title": "人工智能行业观察",
  "summary": "A concise public article summary.",
  "accountName": "Example Official Account",
  "accountId": "gh_example",
  "biz": "MzA1Example",
  "appmsgId": "2650012345",
  "articleIndex": "1",
  "commentId": "123456789",
  "publishedUnix": 1786582800,
  "publishedAt": "2026-08-13T01:00:00+00:00",
  "coverUrl": "https://mmbiz.qpic.cn/public-cover.jpg",
  "contentText": "Complete public article text with headings and paragraphs.",
  "contentHtml": "<div id=\"js_content\"><p>Complete public article HTML.</p></div>",
  "contentTextLength": 2694,
  "contentHtmlLength": 18420,
  "imageUrls": [
    "https://mmbiz.qpic.cn/public-inline-image.jpg"
  ],
  "imageCount": 1,
  "outboundLinks": [
    "https://example.com/public-source"
  ],
  "linkCount": 1,
  "search": {
    "query": "人工智能",
    "page": 1,
    "rank": 1,
    "summary": "A public article summary returned by Sogou Weixin.",
    "sogouRedirectUrl": "https://weixin.sogou.com/link?url=public-example"
  },
  "status": "ok",
  "boundaryReason": null,
  "monitorStatus": null,
  "changedFields": null,
  "previousCapturedAt": null,
  "capturedAt": "2026-08-13T10:25:05.000000+00:00",
  "raw": null
}
```

`recordType` can also be `resolvedLink` or `articleStatus` while preserving all 38 keys. Explicit `articleStatus` rows use `status` and `boundaryReason`; their content fields are empty. Unavailable targets encountered in `articleDetails` are counted in `RUN_SUMMARY`, not emitted as paid error rows. `raw` is `null` unless `includeRaw` is enabled.

### What data can you extract?

| Category | Fields |
| --- | --- |
| Record and provenance | `recordType`, `sourceMode`, `inputTarget`, `sourceUrl`, `sourceEndpoints`, `capturedAt` |
| Stable identity and URLs | `articleId`, `resolvedUrl`, `sogouRedirectUrl` |
| Search provenance | `query`, `page`, `rank`, `search` |
| Article and publisher | `title`, `summary`, `accountName`, `accountId`, `biz`, `appmsgId`, `articleIndex`, `commentId` |
| Publication | `publishedUnix`, `publishedAt`, `coverUrl` |
| Content | `contentText`, `contentHtml`, `contentTextLength`, `contentHtmlLength` |
| Media and links | `imageUrls`, `imageCount`, `outboundLinks`, `linkCount` |
| Status and monitoring | `status`, `boundaryReason`, `monitorStatus`, `changedFields`, `previousCapturedAt` |
| Optional source data | `raw` |

### Input parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `mode` | string | Yes | `articleSearch` | `articleSearch`, `searchAndExtract`, `articleDetails`, `resolveLinks`, `articleStatus`, `publisherMonitor`, or `auto` |
| `searchTerms` | string\[] | In search modes | `['人工智能']` | Search keywords; each becomes a separate input |
| `publisherNames` | string\[] | In publisher monitor | - | Publisher names searched through public article discovery |
| `articleUrls` | string\[] | In details/status mode | - | Direct public `mp.weixin.qq.com` article URLs |
| `redirectUrls` | string\[] | In resolve mode | - | Fresh Sogou Weixin redirect URLs |
| `startUrls` | request\[] | In auto mode | - | Mixed direct article or redirect URLs |
| `maxItems` | integer | No | `50` | Maximum rows per input, from 1 to 10,000 |
| `maxPages` | integer | No | `3` | Maximum search pages per input, from 1 to 50 |
| `includeText` | boolean | No | `true` | Include complete plain article text |
| `includeHtml` | boolean | No | `true` | Include the public article HTML container |
| `includeImages` | boolean | No | `true` | Include public inline image URLs |
| `includeLinks` | boolean | No | `true` | Include public outbound links |
| `requestDelayMs` | integer | No | `1000` | Delay between Sogou requests, from 0 to 5,000 ms |
| `monitorMode` | string | No | `off` | `off`, `onlyNew`, or `newAndChanged` |
| `monitorKey` | string | No | `default` | Namespace for persistent comparison state |
| `maxConcurrency` | integer | No | `2` | Concurrent inputs, from 1 to 5 |
| `includeRaw` | boolean | No | `false` | Include a sanitized source record |

### Use cases

#### Chinese content research

Search topics, extract complete public article text, and send the dataset to NLP, translation, summarization, or classification workflows.

#### Publisher monitoring

Schedule keyword or publisher discovery and send only newly found articles to a webhook, Slack channel, database, or spreadsheet.

#### Public article archiving

Store canonical URL, public IDs, publication date, text, HTML, image URLs, and outbound links for reproducible research.

#### Link resolution and health checks

Convert fresh Sogou redirect links into canonical article URLs or recheck a batch of direct URLs for current public availability.

### Performance and cost

The Actor uses pay-per-event billing when configured on Apify, with separate `search-result`, `article-result`, `resolved-link`, and explicit `status-check` events. Consult the Actor's **Pricing** tab for current rates.

Search-only mode is the lightest. `searchAndExtract` adds redirect resolution and a full article download for each selected result; including HTML also increases dataset size. Exact runtime depends on source latency, article size, page limits, delay, retries, and public availability.

### API usage

Replace `YOUR_USERNAME` with the published Actor owner name.

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/YOUR_USERNAME~wechat-official-account-article-scraper/runs?token=APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "searchAndExtract",
    "searchTerms": ["人工智能"],
    "maxItems": 10,
    "maxPages": 1
  }'
```

Results can flow through Apify API clients, schedules, webhooks, Google Sheets, Make, Zapier, n8n, Airbyte, vector databases, and data warehouses.

### Best for / not for

**Best for:** public Official Account article discovery, complete text extraction, publisher/topic monitoring, canonical-link resolution, content research, and archival workflows.

**Not for:** private WeChat content, authenticated account data, follower graphs, article comments, view/like/share metrics, Mini Programs, chats, or WeChat Channels feeds.

### Limits and good to know

- One mode is selected per run, but each mode accepts batches of relevant inputs.
- `maxItems` and `maxPages` apply per search term or publisher input.
- Sogou redirect links are temporary; resolve or extract them soon after discovery.
- A publisher name is implemented as public article search, not as an authenticated account lookup.
- WeChat controls public article availability and may return deleted, expired, or client-only boundary pages.
- Every successful row contains all 38 top-level keys; missing values use `null` or empty arrays.
- One failed target does not cancel successful targets. Failures appear in `RUN_SUMMARY` without paid error rows.
- The Actor uses Apify Residential Proxy automatically and does not expose proxy configuration in the input.

### Frequently asked questions

#### What input should I provide?

Use Chinese or other public keywords for discovery, copied `mp.weixin.qq.com` URLs for details, or fresh `weixin.sogou.com/link` URLs for resolution.

#### How many results can I extract?

You can configure up to 10,000 rows and 50 pages per input. Actual depth is controlled by Sogou's current public results and article availability.

#### Why are some fields empty?

All record types share one schema. Search rows do not have full article content; status and resolved-link rows use only their relevant fields; direct pages may omit public IDs or cover metadata.

#### Can I process multiple terms or URLs?

Yes. Add multiple values to `searchTerms`, `publisherNames`, `articleUrls`, `redirectUrls`, or `startUrls`. Inputs run concurrently within the configured limit.

#### Can I schedule recurring runs?

Yes. Use Apify schedules with `publisherMonitor`, `monitorMode`, and a stable `monitorKey`, then connect a webhook for downstream alerts.

#### Do I need a WeChat account, API key, or proxy?

No account, API key, cookie, or browser is required. Apify Residential Proxy is configured internally and used automatically.

### Responsible use

This Actor extracts publicly available WeChat Official Account articles. Users are responsible for complying with applicable laws, privacy regulations, contractual obligations, copyright requirements, and the source services' terms. WeChat is a trademark of Tencent; this Actor is not affiliated with or endorsed by Tencent or Sogou.

### Support

If you encounter a problem, create an issue in the Actor's **Issues** tab. Include the run ID, selected mode, and a non-sensitive reproducible keyword or public URL. Do not include account cookies or credentials.

# Actor input Schema

## `mode` (type: `string`):

Choose whether to search public articles, extract article details, resolve links, check status, or monitor publishers and keywords.

## `searchTerms` (type: `array`):

Keywords to find public WeChat Official Account articles through Sogou search.

## `publisherNames` (type: `array`):

Publisher names to discover through public article search.

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

Direct public mp.weixin.qq.com article URLs to extract or check.

## `redirectUrls` (type: `array`):

Sogou WeChat redirect URLs to resolve to their public article destinations.

## `startUrls` (type: `array`):

Mixed public WeChat article and Sogou redirect URLs for automatic detection.

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

Maximum number of result records to save for each keyword, publisher, or URL input.

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

Maximum number of Sogou search result pages to process for each query.

## `includeText` (type: `boolean`):

Extract the readable plain-text body of public articles.

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

Include the article body HTML in detail results.

## `includeImages` (type: `boolean`):

Extract image URLs embedded in public articles.

## `includeLinks` (type: `boolean`):

Extract outbound links embedded in public articles.

## `requestDelayMs` (type: `integer`):

Delay in milliseconds between consecutive Sogou result pages.

## `monitorMode` (type: `string`):

Return all records, only newly discovered records, or new and changed records.

## `monitorKey` (type: `string`):

Stable key used to keep publisher or keyword monitoring state between scheduled runs.

## `maxConcurrency` (type: `integer`):

Maximum number of public HTTP requests processed in parallel.

## `includeRaw` (type: `boolean`):

Include sanitized source objects for advanced downstream processing.

## Actor input object example

```json
{
  "mode": "articleSearch",
  "searchTerms": [
    "人工智能"
  ],
  "maxItems": 50,
  "maxPages": 3,
  "includeText": true,
  "includeHtml": true,
  "includeImages": true,
  "includeLinks": true,
  "requestDelayMs": 1000,
  "monitorMode": "off",
  "monitorKey": "default",
  "maxConcurrency": 2,
  "includeRaw": false
}
```

# Actor output Schema

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

Complete article discovery, content, media, link, status, and monitoring fields.

## `runSummary` (type: `string`):

Requests, transfer, failure categories, results, and charged events.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/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 '{}' |
apify call scrapingmonkey/wechat-article-scraper --silent --output-dataset

```

## MCP server setup

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