# WeChat Article Search & Text Extractor — Sogou (`happyfirst/weixin-sogou-mcp-worker`) Actor

Search public WeChat articles via Sogou and optionally extract readable article text. Get titles, account names, original links and per-item status in JSON or CSV. No WeChat login required.

- **URL**: https://apify.com/happyfirst/weixin-sogou-mcp-worker.md
- **Developed by:** [happyfirst](https://apify.com/happyfirst) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 wechat 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 Search & Text Extractor — Sogou

Search public WeChat Official Account articles indexed by Sogou and optionally extract readable article text. No WeChat login is required.

通过搜狗微信按关键词搜索公开的微信公众号文章，解析微信原文地址，并可提取可读正文。支持 JSON、CSV 导出，无需微信登录。

### Quick start

Use this input for your first run:

```json
{
  "query": "新能源汽车",
  "limit": 3,
  "fetchContent": true
}
```

1. Enter a keyword in `query`.
2. Choose a result limit from 1 to 10.
3. Set `fetchContent` to true to retrieve article text.
4. Start the Actor and open its Output tab.
5. Check each row's `status` before using the results; export the dataset as JSON or CSV.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| query | string | Required | Non-empty search keyword. Chinese keywords generally match Chinese-language content more directly. |
| limit | integer | 3 | Maximum results from one search page; allowed range 1–10. Actual count can be lower. |
| fetchContent | boolean | false | When true, retrieve readable text after resolving the article URL. When false, still resolve article links. |

Suggested starting settings: 512 MB memory and a 300-second timeout.

### Output

One article is saved per dataset row. The Output tab provides an overview and an article-text view. Missing source metadata is omitted rather than invented.

| Field | Meaning |
| --- | --- |
| query | Original search keyword |
| title | Article title |
| source | Official Account name, when available |
| publishedAt | Publication time or date as extracted from the search result, when available |
| snippet | Search-result excerpt, when available |
| url | Original Sogou result URL |
| realUrl | Resolved WeChat article URL, when successful |
| resolvedUrl | Alias of the successfully resolved article URL |
| content | Readable article text when requested and successfully fetched |
| resolutionStatus | resolved, failed, or deferred |
| status | resolved, fetched, or failed |
| error | Processing error for a failed row |
| resolutionError | Link-resolution diagnostic, when applicable |

- `resolved`: the WeChat URL was resolved; article text was not requested.
- `fetched`: readable article text was retrieved.
- `failed`: inspect `error`. A title or search excerpt is not proof that article text was fetched.

The default key-value store record `OUTPUT` contains the query, requested limit, count, succeeded and failed counts, and a summary status: `complete`, `partial`, `failed`, or `empty`.

If every returned article fails, the run fails after saving the article rows and summary. A search with no results is recorded as `empty`. Search and storage errors fail the run. Previously saved rows remain available if a later operation fails.

### What you can use it for

- Discover articles about a topic or brand in Chinese-language public content.
- Collect source text for research or downstream summarization.
- Export structured article records into your own analysis workflow.
- Run keyword searches through the Apify API or your own scheduled tasks.

This Actor produces source data; it does not summarize articles or track changes between runs.

### Current limitations

- One keyword and one search page per run, at most 10 articles.
- Search covers Sogou's available index, not every WeChat article.
- No full Official Account history, guaranteed real-time coverage, or strict account filtering.
- No private, paid-access, or deleted article access.
- No engagement metrics such as reads, likes, or comments.
- Text extraction does not perform OCR on images or download article media.
- Verification challenges, expired links, and source availability can prevent resolution or text extraction.
- Links are handled serially; already resolved URLs are reused. A Sogou verification challenge stops further Sogou link resolution. No automatic CAPTCHA-solving, proxy, or browser fallback is configured.

### Pricing

Check this Actor's Pricing tab for the currently effective charges and any platform usage charges.

The dataset intentionally includes failed rows for diagnosis. If default-dataset-item billing is enabled, those rows may also incur result charges. This version does not implement custom success-only billing; do not interpret a failed run as a guarantee of zero charges.

### Support

Use this Actor's Issues tab and include the input JSON, run ID, and exact error message. Never include API tokens or other credentials.

本工具当前适合小批量资料检索。遇到失败请查看 `error`，并提供关键词、运行 ID 和报错信息；不要提供 Token。

This is an independent tool and is not affiliated with Tencent, WeChat, or Sogou.

# Actor input Schema

## `query` (type: `string`):

WeChat article search keyword

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

Fetch readable article text after resolving links. Images are not OCR processed.

## `limit` (type: `integer`):

One search page, at most 10 articles. Start with 3.

## Actor input object example

```json
{
  "query": "人工智能",
  "fetchContent": false,
  "limit": 1
}
```

# Actor output Schema

## `articles` (type: `string`):

No description

## `summary` (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 = {
    "query": "人工智能",
    "fetchContent": false,
    "limit": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("happyfirst/weixin-sogou-mcp-worker").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 = {
    "query": "人工智能",
    "fetchContent": False,
    "limit": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("happyfirst/weixin-sogou-mcp-worker").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 '{
  "query": "人工智能",
  "fetchContent": false,
  "limit": 1
}' |
apify call happyfirst/weixin-sogou-mcp-worker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happyfirst/weixin-sogou-mcp-worker"
        }
    }
}

```

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/w6EZKuwIlxCpcX3I4/builds/hJF6lKk3bO9qUagSG/openapi.json
