# China A-Share Guba Scraper (股吧) — Posts & Filings (`alexsyin/guba-scraper`) Actor

Scrape Eastmoney Guba (东方财富股吧) investor posts and official China A-share announcements by stock code. No login. MCP-friendly JSON, only-new mode. $3 per 1,000 posts, $1 per 1,000 filings; failed and duplicate items are free.

- **URL**: https://apify.com/alexsyin/guba-scraper.md
- **Developed by:** [Shilin (Alex) Yin](https://apify.com/alexsyin) (community)
- **Categories:** News, Social media, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 guba posts

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/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 China A-Share Guba Scraper do?

Collect **public Eastmoney Guba (东方财富股吧)** investor posts and **official China A-share company announcements** (公司公告 / filings) for one or more stock codes, and return them as clean, MCP-friendly JSON.

No login, no browser, no Xueqiu (雪球). You are charged only for items that are actually saved. Public sources are [Guba](https://guba.eastmoney.com) and Eastmoney's official announcement pages.

**Typical use cases**

- Monitor retail-investor sentiment on a stock's 股吧, optionally with a built-in bullish/bearish score per post
- Watch official filings (董事会决议, 利润分配, 调研活动, …) for a watchlist
- Hourly or daily schedules with `onlyNew` so you pay only for what is new
- Feed Claude Code, Cursor or any MCP client a typed dataset of posts and announcements

#### Example output

You can download the dataset as JSON, HTML, CSV or Excel.

A Guba post:

```json
{
  "type": "post",
  "id": "1803569585",
  "stock_code": "600519",
  "stock_name": "贵州茅台",
  "title": "深沪北百元股数量达164只，电子行业占比最高",
  "url": "https://guba.eastmoney.com/news,600519,1803569585.html",
  "published_at": "2026-11-30T17:32:50+08:00",
  "text": "以最新收盘价计算，A股平均股价为12.79元……",
  "abstract": "以最新收盘价计算，A股平均股价为12.79元……",
  "author_name": "贵州茅台资讯",
  "author_id": "7344113638256342",
  "reads": 371,
  "replies": 1,
  "likes": 1,
  "post_type": "1",
  "categories": null,
  "pdf_url": null,
  "fetched_at": "2026-11-30T11:40:00.000Z",
  "first_seen_at": "2026-11-30T11:40:00.000Z",
  "is_new": true
}
```

An official announcement:

```json
{
  "type": "announcement",
  "id": "AN202611271832113732",
  "stock_code": "600519",
  "stock_name": "贵州茅台",
  "title": "贵州茅台:贵州茅台第五届董事会2026年度第八次会议决议公告",
  "url": "https://data.eastmoney.com/notices/detail/600519/AN202611271832113732.html",
  "published_at": "2026-11-28T00:00:00+08:00",
  "text": "证券简称：贵州茅台    证券代码：600519……",
  "categories": ["分配预案", "董事会决议公告"],
  "pdf_url": "https://pdf.dfcfw.com/pdf/H2_AN202611271832113732_1.pdf",
  "fetched_at": "2026-11-30T11:40:00.000Z",
  "first_seen_at": "2026-11-30T11:40:00.000Z",
  "is_new": true
}
```

A `STATUS` record in the default key-value store lists per-stock `ok` / `fetched` / `returned` / `error` for posts and announcements.

Times: `published_at` is Beijing time with a `+08:00` offset. `fetched_at` is UTC.

### Why scrape Eastmoney Guba and A-share announcements?

Guba is one of the largest retail-investor forums for China A-shares. Official announcements are the primary source for board resolutions, dividends and other filings. This Actor gives agents and analysts both in one input schema, without a data-vendor contract.

- Stable fields: `type`, `id`, `stock_code`, `stock_name`, `title`, `url`, `published_at`, `text`
- `onlyNew` mode for schedules: pay only for new post and announcement ids
- Full text is optional. Turn it on for post bodies and official announcement text (plus a PDF link); turn it off for a faster title-only pass
- Failed requests and duplicates are not charged
- Schedule it, call it via API or [Apify MCP](https://mcp.apify.com), and export JSON, CSV or Excel

### What data can Guba Scraper extract?

| Field | Type | Meaning |
| --- | --- | --- |
| `type` | string | `post` or `announcement` |
| `id` | string | Guba post id, or announcement `art_code` |
| `stock_code` | string | Six-digit A-share code |
| `stock_name` | string | null | Short name, such as 贵州茅台 |
| `title` | string | Headline |
| `url` | string | Public page |
| `published_at` | string | null | Publish or official notice time, `+08:00` |
| `text` | string | null | Plain-text body when `includeFullText` is on |
| `abstract` | string | null | Guba abstract when available |
| `author_name` / `author_id` | string | null | Guba author (posts only) |
| `reads` / `replies` / `likes` | integer | null | Guba engagement (posts only) |
| `categories` | string\[] | null | Official announcement categories |
| `pdf_url` | string | null | Announcement PDF |
| `fetched_at` | string | Snapshot time, UTC |
| `first_seen_at` | string | First time this id was stored for `memoryName` |
| `is_new` | boolean | New to memory, or back after `rememberHours` |
| `sentiment_score` | number | null | -1 (bearish) to 1 (bullish), posts only, when `sentiment` is on |
| `sentiment_label` | string | null | `positive` (bullish), `neutral` or `negative` (bearish), posts only, when `sentiment` is on |
| `sentiment_terms` | string\[] | null | Matched lexicon terms such as `看多`, `涨停`, `割肉` (`¬` = negated) |

### How to scrape Guba posts and A-share announcements

1. Click **Try for free**. The form is prefilled with `600519` (Kweichow Moutai / 贵州茅台) and `000001` (Ping An Bank / 平安银行) so a default run returns real posts and filings.
2. Keep **Both posts and announcements**, or switch to posts-only or announcements-only.
3. Optionally set `maxItems`, a Beijing-time date range, a title keyword, or `onlyNew` for a Schedule.
4. Run and download JSON, CSV or Excel, or call the Actor via API / [Apify MCP](https://mcp.apify.com).

See the **Input** tab for every field.

#### Input example

```json
{
  "stockCodes": ["600519", "000001"],
  "mode": "both",
  "maxItems": 15,
  "includeFullText": true,
  "onlyNew": false,
  "sentiment": true
}
```

#### Sentiment scores (optional, lexicon-based)

Set `"sentiment": true` (**Add sentiment score** in the form) and every **post** gets:

```json
{
  "sentiment_score": 0.933,
  "sentiment_label": "positive",
  "sentiment_terms": ["看多", "涨停", "加仓"]
}
```

- `sentiment_score` is from **-1** (bearish / negative) to **1** (bullish / positive). `sentiment_label` is `positive` (≥ 0.2, read as bullish), `negative` (≤ -0.2, bearish) or `neutral`.
- A `SENTIMENT_SUMMARY` record in the key-value store gives per stock the average score, bullish / neutral / bearish counts and ratios (`bullishRatio`, `bearishRatio`, `netSentiment`) and the most frequent matched terms.
- **How it works, honestly:** a hand-curated rule-based lexicon of about 640 terms: A-share slang (看多, 看空, 涨停, 跌停, 割肉, 被套, 抄底, 利好, 利空 …) at full weight plus general Chinese sentiment words at lower weight, with negation (不 / 没 / 别), degree words (很 / 太 / 有点) and "but" (但是 / 不过) handling. It is **not** a machine-learning model and calls no external API. It is useful for the overall mood across dozens or hundreds of posts. It does **not** understand sarcasm, irony, stock-specific jargon or very short posts, and many Guba posts are sarcastic, so never treat one score as a verdict. This is data, not investment advice.
- Only posts are scored; official announcements are not. Items without any text are not scored or charged.
- Billed **$0.0005 per scored post**. Off by default; nothing extra is charged when off.

#### Hourly schedule example

In [Apify Console](https://console.apify.com) go to **Schedules** → **Create**.

- Cron: `0 * * * *` (every hour, UTC)
- Input:

```json
{
  "stockCodes": ["600519", "000001"],
  "mode": "both",
  "maxItems": 30,
  "includeFullText": true,
  "onlyNew": true,
  "memoryName": "hourly-watchlist"
}
```

The first `onlyNew` run returns the full page of results and stores the baseline. Later runs return (and charge for) only new ids.

### How much does it cost to scrape Guba and A-share filings?

Pay per event. You only pay for rows written to the dataset.

| Event | Price |
| --- | --- |
| Actor start | $0.00005 |
| Guba post saved | $0.003 ($3 / 1,000) |
| Announcement saved | $0.001 ($1 / 1,000) |
| Sentiment score (only when **Add sentiment score** is on) | $0.0005 ($0.50 / 1,000), per scored post |

Failed requests, invalid tickers, empty boards, and items filtered by `onlyNew`, dates or `keyword` are **not charged**.

Example: 2 stocks × 15 posts + 2 × 15 announcements ≈ $0.12 + the start fee, when full text is on. A first try with the prefilled tickers and `maxItems: 10` is typically well under $0.15.

### Use it from Claude Code, Cursor or any MCP client

Add the [Apify MCP server](https://mcp.apify.com) so an agent can call this Actor directly:

```bash
claude mcp add apify --transport http "https://mcp.apify.com/?actors=alexsyin/guba-scraper" \
  --header "Authorization: Bearer $APIFY_TOKEN"
```

You can also add the general server at `https://mcp.apify.com` and ask the agent to run `alexsyin/guba-scraper`.

For Cursor, install the official integration with the Apify CLI, or add the same MCP URL in Cursor's MCP settings:

```bash
apify mcp install cursor
```

Example prompt:

> Use the Apify MCP tools to run `alexsyin/guba-scraper` for stock codes 600519 and 000001, mode both, maxItems 15, includeFullText true. Summarize investor sentiment on each 股吧 and list the latest official announcements.

Or via the Apify API:

```bash
curl -X POST "https://api.apify.com/v2/acts/alexsyin~guba-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stockCodes":["600519","000001"],"mode":"both","maxItems":15}'
```

The API tab on this Actor's page has client snippets in JavaScript, Python and more.

### FAQ

#### Do I need a login or a Xueqiu (雪球) account?

No. Public Guba pages and official Eastmoney announcement APIs only. Xueqiu is not supported.

#### How accurate is the sentiment score?

It is a transparent lexicon heuristic, not a trained model. Expect it to be directionally right on posts that state a view (看多 / 割肉 / 涨停) and unreliable on sarcasm, questions and neutral news-style posts. Averages across many posts are far more meaningful than one score. `sentiment_terms` shows exactly which words drove each score.

#### Are Guba comments included?

No. The public comment endpoints were empty or unstable without a login, so comments are out of scope for this version.

#### Why are some post timestamps off if I turn full text off?

Without `includeFullText`, post timestamps come from the list page and may be the last-update time, not the exact publish time. Turn full text on for accurate `published_at` and the body.

#### How far back can I go?

Each stock paginates through a limited number of Guba list pages (about 80 posts per page). For a longer history, use `dateFrom` with several runs, or schedule `onlyNew`. Announcement PDFs are linked, not downloaded into the dataset.

#### Is it legal to scrape Guba and company announcements?

This Actor only collects public forum posts and official public filings. Scraped text may include personal data protected by PIPL, GDPR or other laws. Only collect it if you have a legitimate reason, and consult a lawyer if unsure.

> Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union, by PIPL in China, and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

Eastmoney may add anti-bot checks. If a source starts failing, the error is recorded in `STATUS` and the rest of the run still succeeds. Cloud runs automatically retry blocked requests through an Apify CN residential proxy when one is available.

Questions or feature requests? Open an issue on the **Issues** tab.

***

### Related China data Actors

- [China Hot Search Scraper](https://apify.com/alexsyin/china-trending-topics) — Weibo, Douyin, Baidu, Zhihu, Bilibili and Toutiao hot-search lists
- [Weibo Scraper](https://apify.com/alexsyin/weibo-scraper) — Sina Weibo posts, comments and keyword search, no login
- [China App Store Rankings](https://apify.com/alexsyin/china-app-rankings) — Apple App Store (CN), TapTap and Xiaomi charts

***

### 中文说明

按股票代码抓取**东方财富股吧**的公开帖子和**A 股官方公告**，输出统一 JSON，适合散户舆情监控、公告跟踪，以及 AI agent / MCP 调用。无需登录，不抓雪球。某个股票或某类数据失败不会让整次运行失败，失败项和 `onlyNew` 过滤掉的重复项都不计费。

**常见用途**：盯某只股票股吧情绪（可选内置多空情绪打分）；跟踪董事会决议、利润分配、调研活动等公告；用 `onlyNew` 做定时增量；把数据交给 Claude Code 或 Cursor。

输入已预填 `600519`（贵州茅台）和 `000001`（平安银行），直接运行即可看到真实帖子和公告。**示例输出**见上方 JSON。`published_at` 为北京时间（`+08:00`）。

#### 输入

见 Input 页。`stockCodes` 必填，支持 `600519`、`SH600519`、`600519.SH`、`sz000001` 等。`mode` 为 `posts` / `announcements` / `both`（默认）。`maxItems` 为每只股票、每类数据的上限，默认 30。`includeFullText` 默认开启。`onlyNew` 适合定时任务，第一次会建立基线。`dateFrom` / `dateTo` 为北京时间 `YYYY-MM-DD`。

#### 情绪打分（可选）

输入 `sentiment: true` 后，每条**股吧帖子**会多出 `sentiment_score`（-1 看空到 1 看多）、`sentiment_label`（`positive` 看多 / `neutral` / `negative` 看空）和命中的词 `sentiment_terms`；键值存储里另有 `SENTIMENT_SUMMARY`，按股票汇总平均分、看多 / 看空占比。基于内置词典（约 640 个词，含 看多、涨停、割肉、被套 等 A 股黑话，处理了否定词、程度词和转折），**不是机器学习模型，也不调用外部 API**。适合看整体情绪，不识别讽刺和反话，不能用来判断单条帖子，也不构成投资建议。只给帖子打分，公告不打分。每条 $0.0005，默认关闭。

#### 计费

按成功写入数据集的条目计费：**每条股吧帖子 $0.003，每条公告 $0.001**，另有极小的启动费用；开启情绪打分后每条帖子另加 $0.0005。失败请求、被 `onlyNew` / 日期 / 关键词过滤掉的条目不计费。预填两只股票、`maxItems: 10` 的首次试用通常低于 $0.15。

#### 在 Claude Code / MCP 中调用

```bash
claude mcp add apify --transport http "https://mcp.apify.com/?actors=alexsyin/guba-scraper" \
  --header "Authorization: Bearer $APIFY_TOKEN"
```

然后让 agent 运行 `alexsyin/guba-scraper`，例如总结茅台和平安银行的股吧情绪并列出最新公告。也可使用通用地址 <https://mcp.apify.com>。

#### 常见问题

- **要不要登录？要不要雪球？** 都不需要。
- **包不包含股吧评论？** 不包含，不登录时评论接口不稳定。
- **关闭全文时时间可能不准**：列表页时间可能是最后更新时间，精确发布时间请打开全文。
- **合规**：只采集公开帖子和官方公告。数据可能含个人信息，请依据 PIPL、GDPR 等法规合法使用。

问题和建议请走本页的 **Issues**。

#### 相关 Actor

- [中国热搜](https://apify.com/alexsyin/china-trending-topics)：微博、抖音、百度、知乎等热搜
- [微博爬虫](https://apify.com/alexsyin/weibo-scraper)：搜索、用户微博和评论
- [中国应用商店榜单](https://apify.com/alexsyin/china-app-rankings)：Apple 中国区、TapTap、小米

### Changelog

#### 0.2

- New optional **Add sentiment score** input (`sentiment`): lexicon-based bullish/bearish score, label and matched terms per post, plus a per-stock `SENTIMENT_SUMMARY` record. New event `sentiment-item` ($0.0005), charged only when the option is on. Existing prices unchanged.
- Complete dataset, key-value store and output schemas (field descriptions, examples, posts / announcements / sentiment views).
- Clearer error messages: invalid tickers, reversed date ranges and total source failure now end the run with a plain-language status.

#### 0.1.1

- Store listing and README update for discoverability (titles, MCP examples, FAQ). Pricing unchanged.

#### 0.1

- First public release: Guba posts + official A-share announcements, `onlyNew` memory, full text, date and keyword filters, pay-per-event pricing.

# Actor input Schema

## `stockCodes` (type: `array`):

China A-share tickers to collect from Eastmoney Guba (东方财富股吧) and official announcements. Accepts 600519, 000001, SH600519, 600519.SH, sz000001, BJ830799, and similar forms. The sample codes 600519 (Kweichow Moutai / 贵州茅台) and 000001 (Ping An Bank / 平安银行) return real public data. Xueqiu (雪球) is not supported.

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

Guba (股吧) forum posts, official A-share announcements / filings (公司公告), or both.

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

Maximum items written for each stock code, for each selected type. Example: two stocks, mode=both, maxItems=20 can return up to 80 rows (20 posts + 20 announcements per ticker). A first try of 10 per type is enough to see real posts and filings at a lower cost.

## `includeFullText` (type: `boolean`):

Fetch the full body of each Guba post, and the official text of each announcement when the public content API provides it. Turn off for a faster, cheaper title-only pass. Timestamps are more accurate when this is on.

## `sentiment` (type: `boolean`):

If true, every Guba post gets sentiment_score (-1 bearish to 1 bullish), sentiment_label (positive/neutral/negative) and the matched terms (sentiment_terms), and a per-stock SENTIMENT_SUMMARY record (average score, bullish/bearish ratio) is saved to the key-value store. Uses a built-in A-share lexicon (看多, 涨停, 割肉 ...), no external API; it is a heuristic that misses sarcasm, so use it for mood across many posts. Posts only; announcements are not scored. Billed $0.0005 per scored post.

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

Return only posts and announcements that were not seen in earlier runs that share the same Memory name. Ideal for a Schedule: you get (and pay for) just what is new. The first run returns everything and sets the baseline.

## `memoryName` (type: `string`):

Runs that share this name share one memory of seen post and announcement ids. Use a different name for each separate monitor (for example one per Schedule).

## `rememberHours` (type: `integer`):

A previously saved post or announcement counts as new again after this many hours. Default is 720 hours (30 days).

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

Only keep items on or after this calendar date, as YYYY-MM-DD, in Beijing time (UTC+8). Leave empty for no lower bound. Applied to a post's publish time (or the list time if full text is off) and to an announcement's official notice date.

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

Only keep items on or before this calendar date, as YYYY-MM-DD, in Beijing time (UTC+8). Leave empty for no upper bound.

## `keyword` (type: `string`):

If set, only keep posts and announcements whose title contains this text (case-insensitive, works with Chinese).

## Actor input object example

```json
{
  "stockCodes": [
    "600519",
    "000001"
  ],
  "mode": "both",
  "maxItems": 10,
  "includeFullText": true,
  "sentiment": false,
  "onlyNew": false,
  "memoryName": "default",
  "rememberHours": 720
}
```

# Actor output Schema

## `dataset` (type: `string`):

Guba posts and official A-share announcements in the default dataset.

## `status` (type: `string`):

Per-stock, per-type counts and errors for this run.

## `sentimentSummary` (type: `string`):

Bullish/bearish ratios per stock. Only available when the sentiment input is on.

# 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 = {
    "stockCodes": [
        "600519",
        "000001"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexsyin/guba-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 = {
    "stockCodes": [
        "600519",
        "000001",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("alexsyin/guba-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 '{
  "stockCodes": [
    "600519",
    "000001"
  ],
  "maxItems": 10
}' |
apify call alexsyin/guba-scraper --silent --output-dataset

```

## MCP server setup

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