# WeChat Official Account Scraper: Articles & Search (`luzivanlt/wechat-official-account-scraper`) Actor

WeChat Official Account articles by keyword, link or album (合集): full text, Markdown and every image. $0.90 per 1,000 articles. Search results $0.045 per 1,000. Filters, new-only runs and stable ids. No login.

- **URL**: https://apify.com/luzivanlt/wechat-official-account-scraper.md
- **Developed by:** [Luzi](https://apify.com/luzivanlt) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.63 / 1,000 full articles

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

Get WeChat Official Account (公众号) articles three ways: search the public
article index by keyword, paste an article's own link or id, or paste an album
(合集) link and get every article in that series. One row per article: title,
account, author, publish time, cover, every body image, the full text and the
same text as Markdown. Search results also carry the keyword, the page and the
position that found them. No WeChat account or cookies needed.

Tested end to end on 2026-11-14: one search page returned 10 results, two full
articles came back with 24,690 and 2,887 characters of text, and a 23-article
album listed every entry across three pages, with an entry opened at 3,981
characters.

### What does this Actor do?

You give it search keywords, article links, album links, or any mix. For a
keyword it reads up to 10 result pages, about 100 articles, and saves each
result once. For a link or an id it opens that article and saves the body as
plain text and as Markdown, with headings, bold, links and images kept. For an
album link it walks the whole series, newest first, and reads every entry in
full, tagging each row with the album's name and the article's place in it. A
run stops when it runs out of input, reaches a limit you set, or the search has
no more results.

Optional filters narrow the rows after they are read: a publish window, words
to leave out, and accounts to keep. A row a filter leaves out is never charged.
**Only new rows** turns the run into a monitor: run the same input on a
schedule and each run adds just the articles that were not delivered before.

Search results are the index's view of an article: title, account, publish
time, snippet, cover and a link. That link is signed and stops working after a
while, so save the row. For the full text, give the article's own
`mp.weixin.qq.com/s/...` link in **Article links or IDs**, or an album link.

Each article comes with:

- The title, the Official Account that published it, the byline and the
  publish time.
- The full body as plain text, one paragraph per block, with the article's own
  headings, lists, quotes and code kept.
- The same body as Markdown, so an AI agent or a database gets clean structure
  instead of HTML.
- Every image in the body as a direct link, in reading order, plus the cover
  image.
- The character count of the body.
- Stable ids: the account's biz id, the message id, the item index, the
  article's own code and the account's gh\_ id. The same article keeps them
  across runs, so you can join runs or match an article read from a link with
  a search result later.
- For a search result: the keyword, the result page, the position on that
  page, the snippet the index shows and the index's link to the article.
- For an album article: the album's id, its name and the article's position in
  it.

### Why use it?

- **The whole article, not just the headline.** Most keyword tools stop at a
  title and a link. This Actor saves the body, the images and the Markdown of
  every article you give it a link for.
- **Whole series, not one article at a time.** An album link returns the
  series with its own order and date for every entry, so a topic read does not
  need a list of links.
- **Built for agents and pipelines.** Markdown keeps headings, bold, links and
  images, so a language model reads a real document instead of a wall of text.
- **Ids that let you join runs.** biz, mid, idx and the article code name the
  same article every time, across search results, album rows and full reads.
- **A monitor, not another one-off run.** **Only new rows** keeps the history
  per input, so a scheduled run tells you what changed instead of repeating
  last week's articles.
- **You pay for what is saved.** A search that finds nothing, an article that
  cannot be read, a filtered row and an article already saved in this run cost
  nothing.
- **Export anywhere.** Download the dataset as JSON, CSV or Excel, or read it
  through Apify's API.

### How to use it

1. Type words into **Search keywords**, one per line, such as 人工智能 or
   新能源汽车. Each keyword reads up to about 100 results.
2. Paste article links or article ids into **Article links or IDs**, one per
   line, to get full text. A link is the article's own
   `https://mp.weixin.qq.com/s/...` address or just its id.
3. Paste album links into **Album links**, one per line, to read a whole series
   in full.
4. Set **Result pages per keyword**, **Maximum search results** or **Maximum
   articles** if you want a smaller run, and add a filter if you want a
   narrower one.
5. Turn on **Only new rows** when the same input will run on a schedule.

A run with no input uses the prefill: one search page for 人工智能 and two full
articles, about a minute and a handful of rows.

#### Links that work

```
https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg
https://mp.weixin.qq.com/s?__biz=MzI5MTcxMTA3Mw==&mid=2247505908&idx=1&sn=12d38f85ea07cf92cbd1382283c776bf&chksm=0000&scene=21
Lboi50dy3SZoODxAJUheBQ
https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzIzNjc1NzUzMw==&album_id=3694842984618131457&action=getalbum&scene=173#wechat_redirect
```

A short `/s/` link or a bare id is the shortest form. A full share link works
as it is: the Actor keeps its ids and completes the link when a permanent link
arrives without its share parameters, as one pasted from an email, an RSS
reader or another tool does. An album link works with or without its extra
share parameters. A Sogou `weixin.sogou.com/link?url=...` result link stops
working after a while; the run stops and asks for the article's own link
instead. A link to an article the publisher later deleted reports `gone` and
is not charged.

### Input

| **Title** (`key`) | What it does | Default |
| --- | --- | --- |
| **Search keywords** (`searchKeywords`) | Words to search in the public article index, one per line. Each keyword returns up to about 100 results. Empty skips the search. | empty |
| **Result pages per keyword** (`pagesPerKeyword`) | How many result pages to read per keyword, 10 results per page. 10 reads everything the index shows. | 10 |
| **Maximum search results** (`maxSearchResults`) | Save at most this many search results across all keywords, in the order found, up to 10,000. 0 saves every result. | 0 |
| **Article links or IDs** (`articleUrls`) | One article per line: an `mp.weixin.qq.com/s/...` link or the article's own id. A line that is not an article stops the run before anything is read and names the line. | empty |
| **Album links** (`albumUrls`) | One album (合集) link per line, such as `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=...&album_id=...`. Every entry is opened in full up to 50 albums. A line that is not an album link stops the run before anything is read and names the line. | empty |
| **Maximum articles** (`maxArticles`) | Save at most this many full articles across article links and albums, in the order read, up to 2,000. 0 saves every article. | 0 |
| **Published within days** (`publishedWithinDays`) | Keep only rows published in this many days, counted back from the run. 0 keeps every date, and a row with no date is kept. Applied after reading; rows left out are never charged. | 0 |
| **Exclude keywords** (`excludeKeywords`) | Drop any row whose title or snippet contains one of these words, one per line. Empty keeps every row. Applied after reading; rows left out are never charged. | empty |
| **Only from accounts** (`onlyFromAccounts`) | Keep only rows from these WeChat account names, one per line. Empty keeps every account. Applied after reading; rows left out are never charged. | empty |
| **Only new rows** (`onlyNew`) | Save only rows this input has not delivered before. The first run saves everything; later runs add just the new articles. The history is kept per keyword, album and filter set. | off |

Give at least one keyword, one article link or one album link. An empty form
runs the sample.

```json
{
  "searchKeywords": ["人工智能"],
  "pagesPerKeyword": 1,
  "articleUrls": ["https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg"],
  "albumUrls": ["https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzIzNjc1NzUzMw==&album_id=3694842984618131457&action=getalbum"],
  "publishedWithinDays": 30,
  "excludeKeywords": ["招聘"]
}
```

### Output

One row per article or search result in one dataset. A search row and a full
read of the same article are two rows with the same `article_id`; the `type`
field says which is which.

```json
{
  "type": "article",
  "id": "urnBmheAWXNCDM5A8tAFYg",
  "url": "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
  "title": "《麻省理工科技评论》万字长文：什么是人工智能？",
  "summary": "从定义、能力到风险，五个问题没有标准答案。",
  "account": "麻省理工科技评论APP",
  "author": "Will•D•Heaven",
  "published_at": "2024-07-14T14:03:50.000Z",
  "cover_url": "https://mmbiz.qpic.cn/cover/0?wx_fmt=jpeg",
  "keyword": null,
  "page": null,
  "rank": null,
  "snippet": null,
  "album_id": null,
  "album_title": null,
  "album_position": null,
  "article_id": "MzI5MTcxMTA3Mw==:2247505908:1",
  "biz": "MzI5MTcxMTA3Mw==",
  "mid": "2247505908",
  "idx": "1",
  "sn": "12d38f85ea07cf92cbd1382283c776bf",
  "gh_id": "gh_c4608d233c81",
  "copyright_stat": 0,
  "image_count": 21,
  "images": ["https://mmbiz.qpic.cn/..."],
  "char_count": 24690,
  "content_text": "互联网上的恶意、谩骂以及其它非琐碎、足以改变世界的意见不合...",
  "content_markdown": "![image](https://mmbiz.qpic.cn/...)"
}
```

| Field | What it holds |
| --- | --- |
| `type` | `article` for a full article you gave a link or id for or that an album contains, `search` for a result from a keyword search. |
| `id` | The stable id of the row: the article's short link id for a full article, the index's id for a search result. A row found twice in a run is saved once. |
| `url` | For an article, the `mp.weixin.qq.com/s/...` link. For a search result, the index's link, which is signed and stops working after a while. |
| `title` | The article's title as the account wrote it. |
| `summary` | The short description the article page carries; empty when it carries none. |
| `account` | The Official Account that published the article. |
| `author` | The byline the account set; empty when it set none. |
| `published_at` | When the article was published, ISO 8601. |
| `cover_url` | Link to the article's cover image. |
| `keyword` | The search keyword that found this row; empty on a full article. |
| `page` | The result page the row was found on, starting at 1; empty on a full article. |
| `rank` | The row's position on its result page, starting at 1; empty on a full article. |
| `snippet` | The excerpt the search result shows; empty on a full article. |
| `album_id` | The album the article was listed in, as the account's biz id and the album's id joined with a colon; empty when you gave the article's own link. |
| `album_title` | The album's own name, such as 智谱; empty when you gave the article's own link. |
| `album_position` | The article's place in its album, counting from 1 at the album's first article; empty when you gave the article's own link. |
| `article_id` | The account, message and item ids joined with colons; the same article keeps it across runs. Empty when the page does not state them. |
| `biz` | The account's internal id that WeChat puts in article links. |
| `mid` | The message id of the article within its account. |
| `idx` | Which article of that message this is, usually `1`. |
| `sn` | The article's own code that WeChat puts in article links. |
| `gh_id` | The account's gh\_ id; the same account keeps it across articles. |
| `copyright_stat` | The page's own copyright code: `0` when the article is not marked original, another number when it is. |
| `image_count` | How many images the article body has. |
| `images` | One link per image in the article body, in reading order. The cover is separate and not repeated here. |
| `char_count` | Characters of body text, spaces excluded. |
| `content_text` | The article body as plain text, one paragraph per block. Empty on a search result. |
| `content_markdown` | The same body as Markdown, with headings, bold, links and images kept. Empty on a search result. |

A search row has no body, so `content_text`, `content_markdown`, `image_count`,
`images`, `char_count`, `article_id`, `biz`, `mid`, `idx`, `sn`, `gh_id` and
`copyright_stat` are empty on it. A full article row has no `keyword`, `page`,
`rank` or `snippet`. An article read from its own link has no `album_id`,
`album_title` or `album_position`; an article read from an album has all three.
An account that sets no byline gives an empty `author`; a page that states no
ids gives an empty `article_id`. Search results fill `account`, `published_at`
and `cover_url` for every row that has them.

### How much does it cost?

You pay for what you get:

- **$0.90 per 1,000 full articles** ($0.0009 each). Charged when an article's
  body is saved, whether it came from a link or from an album. An article that
  cannot be read, a duplicate and an article already saved in this run are not
  charged.
- **$0.045 per 1,000 search results** ($0.000045 each). Charged when a result
  is saved. A result found twice in a run is charged once, and a search that
  finds nothing is not charged.

A run of one keyword at 10 pages that saves 95 search results and 20 full
articles costs $0.02: 95 × $0.000045 = $0.0043, plus 20 × $0.0009 = $0.018,
for $0.0223.

Apify plan discounts apply: Bronze 10% off, Silver 20% off, Gold 30% off.

### How long does a run take?

One search page and two full articles take about a minute, including the
start-up of the run. A single keyword at 10 pages takes about 15 seconds of
reading. A full article takes about 5 seconds, so a one-hour run saves about
700 of them; the 2,000-article cap and the 5.8-hour timeout are sized for each
other. Ten keywords at 10 pages each is about 100 pages and close to two
minutes. An album page lists 20 entries in one read, so a 100-article album
adds about 5 pages of listing to the same 5 seconds an article.

### Good to know

- **Search depth is the index's.** A keyword shows at most about 10 pages of
  results, and **Result pages per keyword** goes to 10. Ten keywords can cover
  a whole day of news; one keyword cannot reach older articles than the index
  still shows.
- **Albums are public series, not whole accounts.** An album link returns the
  articles the account put in that series, newest first, and each row carries
  its place in the series. An account's complete history is still not public.
- **Search links expire.** A search row's `url` is signed and stops working
  after a while. Save the row, and use the article's own link when you want the
  full text.
- **Permanent links are completed, not refused.** A `__biz/mid/idx/sn` link
  opens even when its share parameters were lost on the way, as one pasted
  from an email or an RSS reader has: the Actor keeps the ids and completes
  the link. If the page still asks for a verification, the run counts it as
  unread and does not charge it.
- **Deleted and blocked articles are counted, not charged.** A page with no
  body is reported in the run summary.
- **Filters never cost anything.** The publish window, the excluded words and
  the account list are applied after a row is read. A row they leave out is not
  saved and not charged.
- **A monitor run that finds nothing new is a success.** With **Only new rows**
  on, a run that only saw articles from an earlier run ends as `nothing-new`,
  not as a failure, so a daily schedule stays quiet when the series has not
  moved.
- **Read counts, likes and comments are not included.** They are not available
  without a logged-in WeChat client.
- **Images are links.** The Actor does not download image files.
- **A run that saves nothing fails** with the reason in the run summary, so a
  scheduled run tells you when the site stops answering. The two exceptions
  are a monitor run with nothing new and a run whose rows were all filtered,
  which are normal answers.
- **Duplicates are skipped.** The same article found on two search pages, in
  two albums, or given twice, is saved and charged once.

### FAQ

**Can I get every article an account ever published?**
No. The article index searches by keyword, and an account's complete history
is not public. An album (合集) link does return every article in that public
series, which is the closest an account gets to a full list. Search the
account's name as a keyword to find recent articles that mention it.

**How do I watch an album for new articles?**
Paste the album link into **Album links**, turn on **Only new rows**, and run
the input on a schedule. The first run saves the whole series; each later run
adds only the entries that were not delivered before.

**What does an album link look like?**
`https://mp.weixin.qq.com/mp/appmsgalbum?__biz=...&album_id=...&action=getalbum#wechat_redirect`.
Any extra share parameters are fine; the Actor keeps `__biz` and `album_id`.

**Why did my Sogou link stop the run?**
A `weixin.sogou.com/link?url=...` address is a temporary redirect that expires.
Open the article and paste its own `mp.weixin.qq.com/s/...` link instead.

**Can I get the article as clean text for an AI model?**
Yes. `content_markdown` is ready to embed, and `content_text` is the same
article without markup.

**Does it need a WeChat account?**
No account, cookies or login.

**What happens with a keyword that has no results?**
That keyword is skipped, the run continues with the next one, and nothing is
charged for it.

# Actor input Schema

## `searchKeywords` (type: `array`):

Words to search in WeChat's public article index, one per line, such as 人工智能 or 新能源汽车. Each keyword returns up to about 100 results. Leave empty to skip the search. A keyword that finds nothing is not charged.

## `pagesPerKeyword` (type: `integer`):

How many pages of results to read for each keyword, 10 results per page. 10 reads everything the index shows. Fewer pages make a faster, cheaper run.

## `maxSearchResults` (type: `integer`):

Save at most this many search results across all keywords, in the order they are found. 0 saves every result. Search results are $0.045 per 1,000, so 0 on many keywords can cost more than you expect.

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

One full article per line: an mp.weixin.qq.com/s/... link or the article's own id. Each returns its full text, Markdown, author, account, publish time and images. A line that is not an article stops the run before anything is read and names the line.

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

One album (合集) link per line, such as https://mp.weixin.qq.com/mp/appmsgalbum?\_\_biz=...\&album_id=.... Each entry is opened in full, with the album's name and the article's place in it, and charged as an article. A line that is not an album link stops the run before anything is read and names the line.

## `maxArticles` (type: `integer`):

Save at most this many full articles across article links and albums, in the order they are read. 0 saves every article. Articles are $0.90 per 1,000, so 0 on a long album can cost more than you expect.

## `publishedWithinDays` (type: `integer`):

Keep only rows published in this many days, counted back from the run, such as 7 for the last week. 0 keeps every date, and a row with no date is kept. Applied after reading; rows left out are never charged.

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

Drop any row whose title or snippet contains one of these words, one per line, such as 招聘. Empty keeps every row. Applied after reading; rows left out are never charged.

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

Keep only rows from these WeChat account names, one per line, such as 量子位. Empty keeps every account. Applied after reading; rows left out are never charged.

## `onlyNew` (type: `boolean`):

Save only rows this input has not delivered before. The first run saves everything and later runs add just the new articles, which is what a scheduled run wants. The history is kept per keyword, album and filter set, so changing the filters starts a fresh history.

## Actor input object example

```json
{
  "searchKeywords": [
    "人工智能"
  ],
  "pagesPerKeyword": 10,
  "maxSearchResults": 0,
  "articleUrls": [
    "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
    "https://mp.weixin.qq.com/s/Lboi50dy3SZoODxAJUheBQ"
  ],
  "maxArticles": 0,
  "publishedWithinDays": 0
}
```

# Actor output Schema

## `rows` (type: `string`):

One row per search result and per full article in the default dataset; open the link for the overview view.

# 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 = {
    "searchKeywords": [
        "人工智能"
    ],
    "articleUrls": [
        "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
        "https://mp.weixin.qq.com/s/Lboi50dy3SZoODxAJUheBQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("luzivanlt/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 = {
    "searchKeywords": ["人工智能"],
    "articleUrls": [
        "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
        "https://mp.weixin.qq.com/s/Lboi50dy3SZoODxAJUheBQ",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("luzivanlt/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 '{
  "searchKeywords": [
    "人工智能"
  ],
  "articleUrls": [
    "https://mp.weixin.qq.com/s/urnBmheAWXNCDM5A8tAFYg",
    "https://mp.weixin.qq.com/s/Lboi50dy3SZoODxAJUheBQ"
  ]
}' |
apify call luzivanlt/wechat-official-account-scraper --silent --output-dataset

```

## MCP server setup

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