# WeChat Article Scraper (`axlymxp/wechat-article-scraper`) Actor

Search WeChat official-account articles by keyword or fetch full text by link: title, account, publish time, summary, text and images. No login or WeChat account needed. Pay only for results.

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

## Pricing

from $4.00 / 1,000 dataset items

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

Search public **WeChat official-account (公众号) articles** by keyword, or fetch the **full text** of specific
`mp.weixin.qq.com` articles. No WeChat account, no login, no cookies to manage. Results come back as clean JSON, CSV or Excel.

### What you get

| Field | Description |
| --- | --- |
| `title`, `summary` | Article title and the search snippet |
| `account_name`, `account_id`, `author` | Official account display name, original id (`gh_…`) and author byline |
| `published_at`, `published_ts` | Publish time (UTC ISO 8601 and Unix seconds) |
| `url` | Link to the article. From keyword search this is a **temporary signed link**; open it soon |
| `permalink` | Stable link when the page exposes one (articles you submit by link) |
| `article_id` | Stable id `biz:mid:idx` (when the text is fetched) |
| `text`, `images`, `html` | Full article text, image URLs and optionally the body HTML |
| `cover_url`, `description`, `account_description`, `account_avatar` | Cover and account details |
| `content_status` | `ok`, `not_requested`, or the reason the text could not be fetched |

### Use cases

- **Brand and competitor monitoring** in Chinese media: schedule a keyword and get only new articles each run.
- **Market and trend research**: what Chinese accounts publish about a product, industry or policy.
- **Cross-border e-commerce and sourcing teams** reading supplier and platform announcements.
- **Content and PR tracking**: which accounts cover a topic, and when.
- **AI and NLP**: build Chinese text corpora with account and date metadata.

### Input

| Parameter | What it does |
| --- | --- |
| `mode` | `search` (keywords) or `articles` (links) |
| `keywords` | Search terms. Chinese works best |
| `urls` | `mp.weixin.qq.com` article links for `articles` mode |
| `maxResultsPerKeyword` | 1-100. Sogou returns at most about 100 results per keyword |
| `publishedAfter` | Keep only articles published on or after a date (`YYYY-MM-DD`) |
| `includeContent` | Also fetch every article's full text (search mode) |
| `includeHtml` | Also return the body HTML |
| `onlyNewSinceLastRun` | Skip articles already returned for the same input in earlier runs |
| `maxConcurrency` | Parallel requests (1-10) |
| `proxyConfiguration` | Apify Residential proxy (default). Needed for reliable results |

#### Example

```json
{
  "mode": "search",
  "keywords": ["新能源汽车", "跨境电商"],
  "maxResultsPerKeyword": 20,
  "publishedAfter": "2026-09-01",
  "includeContent": true
}
```

#### Example output (search with text)

```json
{
  "keyword": "新能源汽车",
  "title": "…",
  "account_name": "…",
  "published_at": "2026-10-07T11:02:46Z",
  "url": "https://mp.weixin.qq.com/s?src=11&timestamp=…&signature=…",
  "article_id": "MjM5…==:2650928357:1",
  "text": "…",
  "images": ["https://mmbiz.qpic.cn/…"],
  "content_status": "ok"
}
```

### Scheduling and monitoring

Turn on `onlyNewSinceLastRun`, pick a few keywords and schedule the actor (hourly, daily). Every run skips articles it already returned
for the same input. Search results are ranked by relevance and can differ from one request to the next, so pair this with
`publishedAfter` for a reliable feed of recent articles. Connect a webhook, Zapier, Make or Google Sheets integration to receive them.

### Use with AI assistants and the API

Run it from the Apify API, the JavaScript or Python client, or the Apify MCP server, and feed the `text` field to your own
pipeline or LLM.

### FAQ

**Do I need a WeChat account or cookies?** No.

**How many results per keyword?** Up to about 100. That is the limit of the search source, so use several keywords and
`publishedAfter` to cover a topic.

**Why can the search link expire?** Links from keyword search are signed by the search engine and are temporary. Fetch the text in
the same run with `includeContent`, or store the `article_id`. Links you submit yourself keep working.

**What is not included?** Account article history, comments, read/like counts and account search need a WeChat login and are not
covered.

**Why are some `text` values empty?** Some posts are image-only or video posts with no text body. `images` still lists the pictures.
Deleted articles are reported in `content_status`.

**Is this allowed?** The actor reads publicly visible pages. You are responsible for how you use the data and for following WeChat's
terms and the laws that apply to you. Do not use it to collect personal data you have no right to process.

# Actor input Schema

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

Keyword search finds public WeChat official-account articles by keyword. Article links fetches the full text of specific mp.weixin.qq.com articles. No login is needed for either.

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

Search terms for Keyword search. Chinese works best; English and mixed terms are accepted. Each keyword returns up to ~100 articles (Sogou's own limit).

## `urls` (type: `array`):

mp.weixin.qq.com article links for 'Article links' mode, for example https://mp.weixin.qq.com/s/AbCdEf... or https://mp.weixin.qq.com/s?\_\_biz=...\&mid=...\&idx=1\&sn=... Links from other sites are skipped.

## `maxResultsPerKeyword` (type: `integer`):

How many articles to return for each keyword. Sogou returns at most about 100 results per keyword.

## `publishedAfter` (type: `string`):

Only keep articles published on or after this date (YYYY-MM-DD, UTC). Applied to the ~100 results Sogou returns per keyword, so combine it with 'Only articles not returned before' for a feed of new articles.

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

Keyword search: also open every article and return its full text, images, author and account details. Costs one extra 'article content' charge per article. Always on in 'Article links' mode.

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

Also return the article body as raw HTML (only when article text is fetched).

## `onlyNewSinceLastRun` (type: `boolean`):

Keyword monitoring: skip articles this actor already returned for the same input in an earlier run. Schedule the actor to get a feed of new articles.

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

How many article links are resolved/fetched at the same time.

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

Apify Residential proxy is required: Sogou blocks any single IP after about 20 requests, so the actor uses a new IP for every request.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "新能源汽车"
  ],
  "urls": [],
  "maxResultsPerKeyword": 10,
  "includeContent": false,
  "includeHtml": false,
  "onlyNewSinceLastRun": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "mode": "search",
    "keywords": [
        "新能源汽车"
    ],
    "urls": [],
    "maxResultsPerKeyword": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/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 = {
    "mode": "search",
    "keywords": ["新能源汽车"],
    "urls": [],
    "maxResultsPerKeyword": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/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 '{
  "mode": "search",
  "keywords": [
    "新能源汽车"
  ],
  "urls": [],
  "maxResultsPerKeyword": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call axlymxp/wechat-article-scraper --silent --output-dataset

```

## MCP server setup

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