# WeChat Articles Scraper - Official Accounts, Full Text & Albums (`topapi/wechat-articles-scraper`) Actor

Scrape WeChat Official Account (公众号) articles by keyword, album, link or account name: title, summary, account, gh\_ id, publish time, cover and link, plus full text and account profiles. No login, no cookies. $0.045 per 1,000 articles; full text $0.90, profiles $4.50 per 1,000.

- **URL**: https://apify.com/topapi/wechat-articles-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Social media, News
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### What does WeChat Articles Scraper do?

**WeChat Articles Scraper** extracts WeChat Official Account (微信公众号) articles and accounts. Give it search keywords, album (合集) links, article links or account names. Each article comes back as one row: title, summary, account, publish time, cover and link. Two add-ons are optional: the full text from the article page, and one profile row per account (gh\_ id, WeChat ID, AppID, signature, avatar, QR code). It is built for China market research, brand and competitor monitoring, media teams and AI / RAG pipelines.

Also known as: WeChat scraper · Weixin scraper · 公众号 scraper · Sogou WeChat search scraper · WeChat article API

- **Search WeChat articles by keyword**: the actor reads Sogou WeChat search (weixin.sogou.com), the public index of 公众号 articles: up to ~100 articles per keyword, each followed to its mp.weixin.qq.com address.
- **Full text on request**: plain text, Markdown (and HTML) from the article page, with author, gh\_ id, WeChat ID, the original (原创) flag, publishing region, images, links, #topics and word count.
- **Account profiles**: name, gh\_ id, WeChat ID, AppID, signature, avatar, account type, original-article count, region, follow QR code and the articles the run found.
- **Albums (合集)**: every article of an album, newest first, with permanent links.
- **No login, no cookies, no API key**: no WeChat or Sogou account is used.
- **Pay per result**: no start fee. Nothing is charged for duplicates, filtered articles, deleted articles or pages WeChat did not serve.
- **Run it on a schedule**: monitor mode returns only articles that earlier runs did not deliver.

### What data can you get from WeChat Official Accounts?

<table>
<tr><td>📰 Title (`title`)</td><td>📝 Summary (`summary`)</td><td>📅 Publish time (`publishedAt`)</td></tr>
<tr><td>👤 Account name (`accountName`)</td><td>🆔 gh_ id (`accountId`)</td><td>💬 WeChat ID (`accountAlias`)</td></tr>
<tr><td>🔗 Article link (`articleUrl`)</td><td>🖼️ Cover (`coverUrl`)</td><td>🧾 Full text (`contentText`, `contentMarkdown`)</td></tr>
<tr><td>✍️ Author (`author`)</td><td>🏅 Original badge (`isOriginal`)</td><td>📍 Publishing region (`ipRegion`)</td></tr>
<tr><td>🏷️ #Topics (`hashtags`)</td><td>📚 Albums (`albums`)</td><td>🔢 Word count (`wordCount`)</td></tr>
<tr><td>🖼️ Images (`images`)</td><td>🔗 Links in the text (`links`)</td><td>🧩 biz / mid / idx ids (`articleId`)</td></tr>
<tr><td>📇 Account signature</td><td>🔑 AppID (`appId`)</td><td>📱 Follow QR code (`qrCodeUrl`)</td></tr>
</table>

Measured on real runs (2026-10-28): search rows had a title, account, avatar, publish time, cover and Sogou link on 180 of 180 rows, and a summary on 179; 96 of 96 rows got their mp.weixin.qq.com address. On a 15-article run with the full text on, all 15 rows had text (3 were image posts: their caption, pictures and #topics). gh\_ id, biz, article id, original flag and region were on 15 of 15 rows, images on 11, the author on 8, a WeChat ID on 6.

### How to scrape WeChat articles with WeChat Articles Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up). It comes with $5 of monthly credit and no card is needed.
2. Open **WeChat Articles Scraper** and click **Try for free**.
3. Type your words into **Search keywords**, for example `人工智能` or `新能源汽车`. You can paste article links, album links or account names instead.
4. Turn on **Full text** and/or **Account profiles** if you need them, and set **Max articles**.
5. Click **Start**. Rows appear in the dataset as they are read.
6. Open the **Storage** tab and **Export** as JSON, CSV or Excel, or connect a schedule.

### ⬇️ Input

| Parameter | Type | Description |
|---|---|---|
| `keywords` | array | Search keywords, one per line (Chinese or English). A Sogou WeChat search link works here too. Prefilled with `人工智能`. |
| `articleUrls` | array | mp.weixin.qq.com links: short (`/s/xxxx`) or long (`/s?__biz=...&mid=...&idx=...&sn=...&chksm=...`). Each returns its full text and account fields. |
| `albumUrls` | array | Album links (`/mp/appmsgalbum?__biz=...&album_id=...`). |
| `accounts` | array | Account display names (e.g. `36氪`) or a link to one of the account's articles. |
| `searchUrls` | array | Sogou WeChat search links (`weixin.sogou.com/weixin?type=2&query=...`). Reading starts at the page in the link. |
| `maxPagesPerQuery` | integer | Sogou pages per keyword, 1-10 (10 articles each). Default 10. |
| `sortBy` | string | `relevance` (Sogou's order, default) or `newest` (reads every page, then delivers newest first). |
| `publishedWithin` | string | `any`, `day`, `week`, `month`, `halfYear`, `year`. Older articles are skipped before they are charged. |
| `publishedAfter` / `publishedBefore` | string | Dates, `YYYY-MM-DD`. |
| `excludeKeywords` | array | Skip articles whose title or summary contains any of these words. |
| `onlyFromAccounts` | array | Keep only articles from these account names. |
| `includeContent` | boolean | Full text add-on (default off). |
| `includeMarkdown` / `includeHtml` | boolean | With the full text: Markdown (default on) and HTML (default off). |
| `includeAccounts` | boolean | One profile row per account behind the articles (default off; always on for `accounts`). |
| `resolveArticleUrls` | boolean | Follow each Sogou result to its mp.weixin.qq.com address (default on). Turn it off for a faster, cheaper run: rows then carry Sogou's link only. |
| `translateToEnglish` | boolean | Adds `titleEn` and `summaryEn` (machine translation, no extra charge). |
| `monitorMode` / `monitorStoreName` / `resetMonitor` | boolean / string / boolean | Only articles earlier runs did not deliver. |
| `maxItems` | integer | Most article rows in the run. Default 100, `0` = no limit. |
| `maxItemsPerQuery` | integer | Most articles per keyword, link or account. |
| `maxArticlesPerAlbum` | integer | Default 100, `0` = the whole album. |
| `compact` | boolean | Core fields only, for AI agents and MCP. |
| `proxyConfiguration` | object | Optional. By default the run connects directly. It moves to Apify's datacenter and residential proxy only when Sogou refuses a route. |
| `requestDelaySecs` | number | Pause between Sogou requests. Default 0.5 s. |
| `maxConcurrency` | integer | Article pages read at once (default 3 at 256 MB, 2 at 128 MB). |

Field names used by other WeChat actors are accepted too: `searchQueries`, `queries`, `searchTerms`, `urls`, `articleLinks`, `maxResults`, `fetchFullContent`, `includeAccountProfile`, `onlyNew`, `publishTime`.

#### Example input

```json
{
    "keywords": ["新能源汽车", "跨境电商"],
    "publishedWithin": "month",
    "includeContent": true,
    "includeAccounts": true,
    "maxItems": 100
}
```

#### Turn off "Resolve article links" for a faster, cheaper run

Each result is followed to its mp.weixin.qq.com address with one extra request. If the Sogou row is enough for you (title, summary, account, date, cover, Sogou link), turn **Resolve article links** off: a 100-article search then takes about 17 seconds instead of about 35.

#### Use Chinese words for the richest results

Sogou indexes WeChat in Chinese. `人工智能` returns far more than `AI`, and brand names work in either script. One keyword returns at most ~100 articles (Sogou shows 10 pages to a visitor who is not signed in), so split a wide topic into narrower keywords, for example `特斯拉 降价` and `特斯拉 Model Y`.

#### Follow an account by its display name

Put the name exactly as WeChat shows it into **Accounts** (`36氪`, `丁香医生`). The actor searches Sogou for it and keeps the articles that account published. It also returns the account's profile row. Some very large accounts are not listed under their own name on Sogou (人民日报 returned none of its own articles in our test). For those, paste one of their article links instead to get the profile.

#### Paste links as WeChat shows them

A long link should keep its `chksm=` part (the actor drops the personal `key`, `uin` and `pass_ticket` parts of a copied link and never sends them). Short `/s/xxxx` links work as they are.

### ⬆️ Output

One dataset item per article (`"type": "article"`) and, with **Account profiles**, one per account (`"type": "account"`). A search row from a real run (2026-10-28, keyword `新能源汽车`, full text on, text and lists shortened here):

```json
{
  "type": "article",
  "articleKey": "a:a6e3698c1d81a42bc97f",
  "title": "买的新能源汽车竟不含动力电池⁉️法院：构成根本违约，解除合同、退还费用！",
  "summary": "消费者委托汽车销售公司代购指定品牌的新能源汽车,却在卖车时发现,车辆竟然不包含动力电池...",
  "accountName": "四川法治报",
  "accountId": "gh_1576878cb43b",
  "accountAlias": "scfzbs",
  "publishedAt": "2026-10-28T11:28:34.000Z",
  "articleUrl": "https://mp.weixin.qq.com/s?src=11&timestamp=1793209538&ver=7054&signature=56Ts...&new=1",
  "articleUrlType": "temporary",
  "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/56icmFng76AJqncJ9TMQ7fU9.../0?wx_fmt=jpeg",
  "articleId": "MjM5NDgyODI5MA==:2649197514:1",
  "articleType": "article",
  "isOriginal": false,
  "ipRegion": { "country": "中国", "province": "四川" },
  "contentIncluded": true,
  "contentText": "消费者委托汽车销售公司代购指定品牌的新能源汽车，却在卖车时发现，车辆竟然不包含动力电池……",
  "wordCount": 1611,
  "accountOriginalArticles": 337,
  "keyword": "新能源汽车",
  "searchPosition": 1
}
```

An account row from the same run:

```json
{
  "type": "account",
  "accountName": "四川法治报",
  "accountId": "gh_1576878cb43b",
  "accountAlias": "scfzbs",
  "appId": "wxcdb3927f2193bd83",
  "biz": "MjM5NDgyODI5MA==",
  "qrCodeUrl": "https://open.weixin.qq.com/qr/code?username=gh_1576878cb43b",
  "description": "四川法治报社公众平台，用于四川法治报社进行普法宣传、法治教育等……",
  "accountType": "subscription",
  "verifyStatus": 3,
  "originalArticles": 337,
  "ipRegion": { "country": "中国", "province": "四川" },
  "articlesFound": 1,
  "recentArticles": [{ "title": "买的新能源汽车竟不含动力电池……", "publishedAt": "2026-10-28T11:28:34.000Z" }]
}
```

#### Fields

| Field | What it is | Filled (real run) |
|---|---|---|
| `title`, `accountName`, `publishedAt`, `coverUrl`, `sogouUrl` | The search result | 180 / 180 search rows |
| `articleUrl` | The mp.weixin.qq.com address (off when **Resolve article links** is off) | 96 / 96 |
| `summary` | Sogou's digest (album rows: none) | 179 / 180 |
| `accountAvatarUrl`, `sogouAccountOpenId` | The account as Sogou lists it | 180 / 180 |
| `accountId`, `biz`, `mid`, `idx`, `articleId`, `isOriginal`, `articleType`, `commentId` | From the article page (full text on) | 15 / 15 |
| `contentText`, `contentMarkdown`, `wordCount`, `characterCount` | The text (an image post: its caption) | 15 / 15 |
| `author`, `description` | Byline and the author's own summary, when set | 8 / 15 |
| `accountAlias` | WeChat ID, when the account set one | 6 / 15 |
| `ipRegion`, `publisherRegion` | Region WeChat shows under the article | 15 / 15 |
| `images`, `links`, `linkedArticles` | Images, outbound links, WeChat articles linked in the text | 11 / 15, 3 / 15, 3 / 15 |
| `accountNameOnSogou` | The older name Sogou still lists when the account was renamed | 2 / 15 |
| `hashtags` | #topics in the text | 3 / 15 (the posts that use them) |
| `albums` | Albums the article belongs to | on album articles |
| `permanentUrl`, `sn` | Permanent link: album rows and pasted links (a search result's page carries none) | album / link rows |
| Account rows: `accountId`, `appId`, `biz`, `avatarUrl`, `accountType`, `qrCodeUrl`, `profileUrl` | | 15 / 15 |
| Account rows: `description`, `verifyStatus`, `accountAlias`, `originalArticles` | | 13, 12, 6, 1 of 15 |

`articleUrl` from a search is the link WeChat signs for Sogou. It opens for a limited time, so store the article (or its `articleId`) rather than relying on the link later.

### How much does it cost to scrape WeChat articles?

| Event | Price | When |
|---|---|---|
| Article | $0.000045 | each article row delivered |
| Article full text | $0.0009 | each article delivered with its text (only with **Full text** on) |
| Account profile | $0.0045 | each account row delivered |

| Run | Cost |
|---|---|
| 100 articles | $0.0045 |
| 100 articles with full text | $0.0945 |
| 1,000 articles | $0.045 |
| 1,000 articles with full text and 300 account profiles | $2.295 |

There is no start fee. Duplicates, filtered articles, articles a monitor run already delivered, deleted articles and pages WeChat did not serve are not charged. Set a spending limit on the run and the actor stops when the next row would not fit: a $0.005 limit with full text on delivered 5 articles and charged exactly 5 articles + 5 texts.

### How many articles does one run return?

- **Search**: up to ~100 per keyword (Sogou's 10 pages to a signed-out visitor; page 10 often holds fewer than 10). Measured: 2 keywords → 180-192 articles in 3-3.5 minutes.
- **Albums**: the whole album, newest first, 20 articles per request (or up to **Max articles per album**).
- **Accounts**: the account's articles that Sogou lists under its name (20 by default).
- **Memory**: 256 MB by default. Searches run the same at 128 MB; the full text works there too but reads pages about 4 times slower.
- Sogou ranks by relevance, not date. Many results are older articles (in one 180-row run, 77 were from 2026 and the rest from 2016-2025). Use **Published within** or **Order: newest first** for fresh articles.

### Run it on a schedule

Turn on **Only new articles** and give the schedule its own **Monitor name**. Each run delivers only articles that earlier runs with that name did not. Measured: the first run delivered 10. A second run delivered the next 10 (it skipped the 10 it had already sent). A third run delivered 0 and charged nothing, at a platform cost of $0.00017.

```json
{
    "keywords": ["你的品牌名", "竞品名"],
    "monitorMode": true,
    "monitorStoreName": "brand-watch",
    "publishedWithin": "week",
    "includeContent": true
}
```

Create the schedule in **Schedules** in the Apify Console (for example daily at 08:00), or call the API on your own timer. A webhook on the run can push each new batch to Slack, Google Sheets, Make, Zapier or n8n.

### Integrations, API and MCP

- **API**: start a run and read its dataset with [`apify-client`](https://docs.apify.com/api/client/js) for JavaScript or [Python](https://docs.apify.com/api/client/python), or with plain HTTP. The **API** tab of this actor shows ready-made calls.
- **MCP**: AI agents (Claude, ChatGPT, Cursor) can call the actor through the Apify MCP server. Use `compact: true` for small rows.
- **Exports**: JSON, CSV, Excel, XML, RSS, HTML. Integrations with Google Sheets, Slack, Make, Zapier, n8n and webhooks.

### Use cases

- 📈 **Brand and competitor monitoring**: daily new WeChat articles that mention a brand, with the account and region.
- 🇨🇳 **China market research**: what industry media and associations publish on a topic, with the full text.
- 🧠 **AI / RAG**: clean Chinese text and Markdown with title, account and date for embeddings and summarisation.
- 🤝 **KOL and media lists**: account profiles with gh\_ id, WeChat ID, AppID and QR code from a topic search.
- 📚 **Album archiving**: every article of a 合集 with permanent links.
- 📰 **News tracking**: a topic's newest articles every day with **Published within: Last 24 hours**.

### FAQ

#### Does WeChat Articles Scraper need a WeChat login or cookies?

No. It reads Sogou WeChat search and the public article and album pages that anyone can open. No account, cookie, QR scan or API key is used.

#### Why do search results have a temporary article link?

Sogou links each result to an address WeChat signs for Sogou visitors. It opens the article for a limited time. Album rows and pasted links carry the permanent `__biz / mid / idx / sn` link, and every full-text row carries `articleId` (biz:mid:idx), which identifies the article for good.

#### Can WeChat Articles Scraper get read counts, likes or comments?

No. WeChat serves read counts, likes and comments only inside the WeChat app (the article page answers "no session" for them). This actor returns what the public pages show.

#### How many articles can I get per keyword?

About 100. Sogou shows 10 pages to a visitor who is not signed in. Use several narrower keywords for more.

#### Can I schedule WeChat Articles Scraper to watch a brand?

Yes. Turn on **Only new articles**, set a **Monitor name** and add a schedule; each run then returns only new articles. A run with nothing new is free.

#### Why did an account return no articles?

Sogou lists some accounts' articles only under other searches (e.g. 人民日报). Check the name is exactly as WeChat shows it, or paste one of the account's article links to get its profile.

#### Can I use WeChat Articles Scraper through the API or MCP?

Yes, through the Apify API (any language), the JavaScript and Python clients, and the Apify MCP server for AI agents.

#### Why is a row's account name different from the search result?

Accounts can be renamed. The article page shows the current name (`accountName`). When Sogou still lists the old one it is kept in `accountNameOnSogou`.

#### Do I pay for articles that were deleted?

No. A result whose page says it was deleted (or that its account moved) is skipped when the full text is on, and nothing is charged for it.

#### Your feedback

Found a missing field or a run that did not return what you expected? Open an issue in the **Issues** tab and we will look at it.

### Other China data scrapers

- [Weibo Scraper](https://apify.com/TopApi/weibo-scraper): Weibo posts by keyword, user and URL, with comments and hot search.
- [Bilibili Scraper](https://apify.com/TopApi/bilibili-scraper): Bilibili videos, creators and comments.
- [Douyin Scraper](https://apify.com/TopApi/douyin-scraper): Douyin videos and creators.

# Actor input Schema

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

One search per line, Chinese or English, e.g. "人工智能", "新能源汽车", "Tesla". Each search returns up to ~100 articles (Sogou's 10 pages). A Sogou WeChat search link works here too.

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

mp.weixin.qq.com article links, short (/s/xxxx) or long (/s?\_\_biz=...). Each one comes back with its full text and account fields. Album links pasted here are listed as albums.

## `albumUrls` (type: `array`):

WeChat album links, e.g. https://mp.weixin.qq.com/mp/appmsgalbum?\_\_biz=...\&action=getalbum\&album_id=... Every article of the album, newest first, with permanent links.

## `accounts` (type: `array`):

Official Account display names (e.g. "人民日报", "36氪") or a link to one of the account's articles. Returns the account's profile row and the articles Sogou lists for it.

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

Sogou WeChat article search links (https://weixin.sogou.com/weixin?type=2\&query=...). Reading starts at the page in the link.

## `maxPagesPerQuery` (type: `integer`):

Sogou result pages to read per keyword (10 articles each). Sogou shows at most 10 pages per search to a visitor who is not signed in.

## `sortBy` (type: `string`):

Relevance keeps Sogou's order. Newest first reads every page of a search, then delivers the newest articles first.

## `publishedWithin` (type: `string`):

Keep only articles published in this window. Older articles are skipped before they are charged.

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

Date, YYYY-MM-DD (e.g. 2026-10-01). Empty = no start date.

## `publishedBefore` (type: `string`):

Date, YYYY-MM-DD. Empty = no end date.

## `excludeKeywords` (type: `array`):

Skip articles whose title or summary contains any of these words, e.g. "广告", "招聘".

## `onlyFromAccounts` (type: `array`):

Keep only articles published by these account display names (exact name, e.g. "36氪"). Empty = every account.

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

Open each article page: full text (and Markdown), author, gh\_ id, WeChat ID, original (原创) flag, region, images, links, word count. Charged per article that comes back with its text.

## `includeMarkdown` (type: `boolean`):

With the full text: also `contentMarkdown` (headings, bold, links and images kept), for LLM / RAG pipelines.

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

With the full text: also `contentHtml`, the article body as WeChat publishes it (large).

## `includeAccounts` (type: `boolean`):

One profile row per account behind the articles: name, gh\_ id, WeChat ID, signature, avatar, account type, original-article count, region, recent articles. Charged per account row.

## `resolveArticleUrls` (type: `boolean`):

Follow each Sogou result to its mp.weixin.qq.com address (`articleUrl`, a link WeChat signs and keeps open for a limited time). One extra request per row; turn it off for a faster, cheaper run with Sogou's link only.

## `translateToEnglish` (type: `boolean`):

Add `titleEn` and `summaryEn` (machine translation). No extra charge.

## `monitorMode` (type: `boolean`):

Skip articles (and accounts) delivered by earlier runs with the same monitor name; they are not charged. Pairs with a daily schedule.

## `monitorStoreName` (type: `string`):

Name of the store that remembers delivered articles. Use a different name for each schedule, e.g. "brand-watch".

## `resetMonitor` (type: `boolean`):

Forget what earlier runs delivered (this run delivers everything again).

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

Most article rows in the whole run. Sogou shows ~100 per search signed out; use more keywords for more. 0 = no limit.

## `maxItemsPerQuery` (type: `integer`):

Most articles per keyword, Sogou link or account. 0 = up to Sogou's ~100 (20 for an account).

## `maxArticlesPerAlbum` (type: `integer`):

Most articles per album, newest first. 0 = the whole album.

## `compact` (type: `boolean`):

Core fields only (title, summary, account, date, link, cover, text): small rows for AI agents and MCP.

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

Optional. By default the run goes direct, then through Apify's datacenter and residential proxy only when Sogou refuses a route. Give your own proxy to use it instead.

## `requestDelaySecs` (type: `number`):

Sogou is read slowly on purpose so it keeps answering. Default 0.5 s.

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

Article pages read at once for the full text and profiles. Default: 2 at 128 MB, 3 at 256 MB, 4 above.

## Actor input object example

```json
{
  "keywords": [
    "人工智能"
  ],
  "maxPagesPerQuery": 10,
  "sortBy": "relevance",
  "publishedWithin": "any",
  "includeContent": false,
  "includeMarkdown": true,
  "includeHtml": false,
  "includeAccounts": false,
  "resolveArticleUrls": true,
  "translateToEnglish": false,
  "monitorMode": false,
  "monitorStoreName": "wechat-articles-monitor",
  "resetMonitor": false,
  "maxItems": 20,
  "maxArticlesPerAlbum": 100,
  "compact": false,
  "requestDelaySecs": 0.5
}
```

# Actor output Schema

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

One item per WeChat article (type article) and, when asked, per Official Account (type account).

# 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 = {
    "keywords": [
        "人工智能"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/wechat-articles-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 = {
    "keywords": ["人工智能"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/wechat-articles-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 '{
  "keywords": [
    "人工智能"
  ],
  "maxItems": 20
}' |
apify call topapi/wechat-articles-scraper --silent --output-dataset

```

## MCP server setup

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