# WeChat Articles Scraper: Official Account Search, No Login (`telkontar44/wechat-articles`) Actor

Search WeChat Official Account (公众号) articles by keyword via Sogou Weixin: title, account, date, real mp.weixin.qq.com URL, optional full text. No login.

- **URL**: https://apify.com/telkontar44/wechat-articles.md
- **Developed by:** [Vasyl Hartaver](https://apify.com/telkontar44) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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: Official Account Search, No Login

Search **WeChat Official Account (微信公众号) articles** by keyword and get clean JSON: title, account name, publish date, summary, cover image and the **real `mp.weixin.qq.com` article URL**. Optionally fetch the **full article text**, author and account ids. No WeChat account, no login, no cookies to paste, no API key.

It uses Sogou Weixin search (搜狗微信搜索, `weixin.sogou.com`), the only public search engine for WeChat articles, through Apify residential proxies in China.

### What can this WeChat article scraper do?

- **Keyword search across all Official Accounts**: up to 100 articles per query (Sogou's limit for anonymous visitors), several queries per run
- **Real article links**: follows Sogou's redirect so you get the `https://mp.weixin.qq.com/s?...` URL, not just a Sogou link
- **Full text on demand** (`fetchContent`): article body as plain text, author byline, exact publish time, account ids (`__biz`, `gh_...`) and a stable `articleId`
- **Date filter**: keep only articles published in a date range (Beijing time)
- **Reliable by design**: residential CN proxy by default, polite pacing, automatic switch to a new IP when Sogou shows its verification page, and a clear warning row instead of a silent empty run
- **No start fee**: warning rows are never billable

### What data can you extract from WeChat?

| Group | Fields |
|---|---|
| Article | `title`, `summary` (Sogou snippet), `url` (real mp.weixin.qq.com link), `sogouUrl`, `coverImage`, `publishedAt` (ISO 8601, UTC) |
| Account | `account` (公众号 name); with `fetchContent`: `accountId` (`__biz`), `accountUserName` (original id `gh_...`) |
| Ranking | `query`, `position` (1-based rank), `page` (1-10), `sogouId` |
| Full text (`fetchContent`) | `content` (one paragraph per line), `author`, `articleId` (`<__biz>_<mid>_<idx>`, stable across runs), `permanentUrl` (only when WeChat exposes it), `contentStatus` (`ok`, `partial`, `deleted`, `unavailable`, `blocked`, `error`) |
| Diagnostics | `type` (`article` or `warning`), `scrapedAt`; warning rows carry `code`, `message`, `context` |

Export the dataset as JSON, CSV, Excel, XML or HTML, or read it through the Apify API. A per-query run summary (articles, links resolved, link failures) is saved as `RUN_SUMMARY` in the key-value store.

### How to scrape WeChat articles

1. Click **Try for free** and open the Input tab.
2. Type one or more **Search queries** (Chinese works best, e.g. `人工智能`, `新能源汽车`).
3. Set **Max articles per query** (default 20, up to 100).
4. Optional: a **date range**, **Fetch full article text**.
5. Keep the default proxy (**Apify Proxy, RESIDENTIAL, country CN**) and click **Start**.

### Input example

```json
{
  "queries": ["人工智能", "新能源汽车"],
  "maxResults": 20,
  "dateFrom": "30 days",
  "resolveLinks": true,
  "fetchContent": false,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "CN" }
}
```

- `dateFrom` / `dateTo` take `YYYY-MM-DD` (Beijing time), ISO timestamps or relative values such as `7 days`.
- `resolveLinks: false` skips the redirect step: fastest and cheapest, `url` is then `null`.
- `requestDelayMs` (default 1500, minimum 1000) and `maxRetries` (default 3) are in the Advanced section.

### Output example

```json
{
  "type": "article",
  "title": "国务院办公厅关于适应人工智能技术发展助力构建就业友好型发展方式的意见",
  "summary": "为贯彻落实党中央、国务院关于促进高质量充分就业的决策部署,积极适应人工智能技术发展,助力构建就业友好型发展方式,经国务...",
  "url": "https://mp.weixin.qq.com/s?src=11&timestamp=1793483812&ver=7061&signature=...&new=1",
  "sogouUrl": "https://weixin.sogou.com/link?url=dn9a_-gY295K0Rci_xozVXfdMkSQ...&type=2&query=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD&token=...",
  "account": "天津汇芯数科",
  "publishedAt": "2026-10-30T08:00:00.000Z",
  "coverImage": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/eO4j5mMoLYnJ.../0?wx_fmt=jpeg",
  "sogouId": "ab735a258a90e8e1-6bee54fcbd896b2a-6c86d334c343e56d73a0385e4d13445d",
  "query": "人工智能",
  "position": 11,
  "page": 2,
  "scrapedAt": "2026-10-31T12:00:00.000Z"
}
```

With `fetchContent: true` each row also gets:

```json
{
  "contentStatus": "ok",
  "content": "人工智能正在重塑全球胜任力的内涵。\n第一，知识维度：跨文化理解与数字素养并重。\n...",
  "author": "子民",
  "accountId": "MzI0NjIyMzEyNQ==",
  "accountUserName": "gh_664eadf9fb4d",
  "articleId": "MzI0NjIyMzEyNQ==_2247621068_3",
  "permanentUrl": null
}
```

If Sogou keeps showing its verification page, you get a free warning row and the run moves on to the next query:

```json
{ "type": "warning", "code": "BLOCKED", "message": "Sogou answered with its anti-bot verification page for \"人工智能\" (page 3) on every proxy session tried.", "context": { "query": "人工智能", "articlesBeforeFailure": 20 }, "scrapedAt": "2026-10-31T12:00:00.000Z" }
```

### Use with AI agents (MCP)

Flat, self-describing fields make this Actor a good tool for AI agents that need Chinese-language news and industry commentary from WeChat.

- Add it to the [Apify MCP server](https://mcp.apify.com) by its Actor ID, for example `https://mcp.apify.com?tools=<actor-id>`, and connect that URL in Claude, Cursor, VS Code or any MCP client.
- Example prompt: *"Find the 30 most relevant WeChat articles about 固态电池 from the last two weeks and summarise what the accounts say."*
- For token-cheap answers keep `fetchContent: false` and read `title` + `summary` first; fetch full text only for the articles you need.

### Pricing

**This Actor is currently free.** You only pay for your own Apify platform usage (compute and residential proxy traffic; a search page is about 30 KB). In tests, 100 articles with resolved links cost about $0.03 of platform usage; with `fetchContent` it is about $0.6 per 100 articles, because WeChat article pages are large. Pay-per-article pricing (one `article-result` event per article row, warning rows free, no start fee) may be added later; if so, it will be announced in advance on this page and through Apify's usual notice to users.

### FAQ

#### Do I need a WeChat account or cookies?

No. The Actor visits Sogou Weixin as an anonymous visitor and gets the normal visitor cookies by itself.

#### Why do I need a Chinese residential proxy?

Sogou Weixin answers reliably only to Chinese consumer IPs; datacenter and foreign IPs mostly get a verification page. The default input uses Apify Proxy RESIDENTIAL with country CN.

#### Does it solve captchas?

No. When Sogou shows a verification page, the Actor switches to a new proxy IP and retries a few times. If that keeps failing, it writes a `BLOCKED` warning row for that query and continues with the next one.

#### How many results can I get?

Up to 100 articles per query: Sogou shows anonymous visitors 10 pages of 10. Use several specific queries to cover a topic more widely.

#### How long do the article URLs work?

`url` is the signed link Sogou hands out (`src=11&timestamp=...&signature=...`). It opens the article directly but expires after some hours, so fetch what you need soon after the run (or turn on `fetchContent`). For a stable key across runs use `articleId` (`<__biz>_<mid>_<idx>`, with `fetchContent`). WeChat hides the `sn` signature from anonymous visitors, so `permanentUrl` is usually `null`.

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

The Actor only reads pages that anyone can open without an account. How you use the data is your responsibility: respect copyright of the authors, Sogou's and WeChat's terms, and data-protection law (PIPL, GDPR) where it applies.

### Honest limitations

- **Ranking is Sogou's relevance order**, not newest first. The date filter is applied to the up-to-100 results Sogou shows, so a narrow date range can return fewer articles than `maxResults`.
- **No account timelines**: Sogou no longer lists an account's articles; search by the account name as a keyword instead.
- **No read or like counts**: WeChat only shows those inside the app.
- **Temporary links**: `url` expires (see FAQ); `permanentUrl` is usually `null`.
- **`fetchContent` is heavier**: a WeChat article page is 2-6 MB of HTML (mostly scripts), so it takes longer and uses far more proxy traffic than search alone.
- Picture and short posts have little text; when only the post description is available you get `contentStatus: "partial"`.
- Some articles are deleted or restricted by WeChat after indexing; they come back with `contentStatus: "deleted"` or `"unavailable"`.

### How it works (for the curious)

1. It opens `weixin.sogou.com/weixin?type=2&query=...&page=N` through a CN residential IP and parses the 10 results per page.
2. For each result it requests Sogou's `/link?url=...` redirector the way the page's own click handler does (`&k=`/`&h=` suffix, search page as Referer, the session's visitor cookies) and reads the `mp.weixin.qq.com` URL from the answer.
3. With `fetchContent`, it opens the public article page and extracts the `#js_content` text, author, publish time (`ct`) and the `__biz`/`mid`/`idx` ids.

This Actor is not affiliated with Sogou or Tencent.

### Changelog

- **0.1**: first release.

# Actor input Schema

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

Keywords to search WeChat Official Account articles for, one per line, in Chinese or English (e.g. 人工智能, 新能源汽车, ChatGPT). Each query is searched separately on Sogou Weixin.

## `maxResults` (type: `integer`):

Stops once this many articles are collected for a query. Sogou shows anonymous visitors 10 articles per page and at most 10 pages, so 100 is the ceiling.

## `dateFrom` (type: `string`):

Only articles published on or after this date. YYYY-MM-DD (Beijing time), an ISO timestamp, or relative such as "7 days". Sogou ranks by relevance, so the filter is applied to the result pages it shows (up to 10 pages).

## `dateTo` (type: `string`):

Only articles published on or before this date (a bare YYYY-MM-DD means the end of that day, Beijing time).

## `resolveLinks` (type: `boolean`):

Follow each Sogou redirect link to get the real https://mp.weixin.qq.com/s?... article URL (one extra small request per article). Turn off for the fastest, cheapest run; url is then null and only sogouUrl is set.

## `fetchContent` (type: `boolean`):

Also open each article on mp.weixin.qq.com and return its full text, author, exact publish time and account / article ids (\_*biz, gh* id, articleId). Slower and uses much more proxy traffic (article pages are 2-6 MB); needs resolveLinks.

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

Sogou Weixin answers reliably only to Chinese IPs. Keep Apify Proxy RESIDENTIAL with country CN (the default).

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

Minimum pause between two requests to the same host, with random jitter. At least 1 second, to stay polite.

## `maxRetries` (type: `integer`):

Retries per request on rate limits, server errors and verification pages (each block switches to a new proxy IP). After that the query stops with a BLOCKED warning row.

## `debugDump` (type: `boolean`):

Log compact diagnostics about Sogou's and WeChat's answers (for troubleshooting).

## Actor input object example

```json
{
  "queries": [
    "人工智能"
  ],
  "maxResults": 20,
  "resolveLinks": true,
  "fetchContent": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  },
  "requestDelayMs": 1500,
  "maxRetries": 3,
  "debugDump": false
}
```

# Actor output Schema

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

All scraped items in the run's default dataset (JSON, CSV, Excel via the dataset API).

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

Per-query counters (articles, linksResolved, linkFailures), warnings and errors for this run.

# 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": [
        "人工智能"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CN"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("telkontar44/wechat-articles").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": ["人工智能"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CN",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("telkontar44/wechat-articles").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": [
    "人工智能"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  }
}' |
apify call telkontar44/wechat-articles --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,telkontar44/wechat-articles"
        }
    }
}
```

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/fZADCzMYI1lEkKgja/builds/HfbFVHbb0rmffVvl2/openapi.json
