# 高登討論區爬蟲｜香港論壇貼文、回覆、輿情一鍵匯出（免 API） (`claude_code_reviewer/hkgolden-scraper`) Actor

免登入抓高登討論區（HKGolden）香港論壇：指定台主題列表（可標題關鍵字過濾）、主文全文與所有回覆，含推／踩數與時間，輸出 JSON／CSV／Excel。香港輿情監測、品牌口碑、社群風向分析必備。

- **URL**: https://apify.com/claude\_code\_reviewer/hkgolden-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** AI, News, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 台主題列表

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

## 高登討論區爬蟲｜香港論壇貼文、回覆、輿情一鍵匯出（免 API）

一個 Actor 抓 **HKGolden 高登討論區**（香港元老級論壇）：指定台的最新主題列表（可用標題關鍵字過濾）、單一主題全文及所有回覆。走高登公開 JSON 端點直連，**不用登入、不用 token、不用瀏覽器**，輸出統一的 snake\_case 結構化資料，缺值補 `null`，一律附 ISO 8601 時間戳。香港輿情監測、品牌口碑、社群風向研究必備。

配合 [LIHKG 連登爬蟲](https://apify.com/claude_code_reviewer/lihkg-scraper) 一起用，覆蓋香港兩大討論區的同一群社群監測需求。

### 輸出欄位

| 欄位 | 型別 | 說明 |
|---|---|---|
| topic\_id | string | 主題 ID（高登 thread id） |
| site | string | 固定 `hkgolden` |
| channel | string | null | 台代碼（如 `BW`） |
| channel\_name | string | null | 台名稱（如 `吹水台`） |
| reply\_id | string | （回覆列）回覆 ID |
| floor | number | null | （回覆列）樓層／高登回覆序號（1 起算；主文是獨立那一列） |
| title | string | null | 主題標題 |
| author | string | null | 作者暱稱 |
| author\_gender | string | null | `M`（男）／`F`（女）／`null` |
| content | string | null | 主文／回覆內文（HTML 已轉純文字；純貼圖回覆為 `null`） |
| content\_images | array | 內文中的圖片／貼圖 URL 陣列（無則 `[]`） |
| reply\_count | number | null | 主題回覆總數 |
| marks\_good | number | null | 推（好評）數 |
| marks\_bad | number | null | 踩（負評）數 |
| total\_pages | number | null | 主題總頁數 |
| created\_at | string | null | 發文／留言時間（ISO 8601） |
| last\_reply\_at | string | null | 最後回覆時間（ISO 8601，主題列適用） |
| topic\_url | string | 主題公開網址 |
| source\_mode | string | 來源模式（`channel`／`thread`） |
| source\_query | string | 命中的查詢條件（台代碼或主題 ID） |
| scraped\_at | string | 抓取時間（ISO 8601） |

### 模式

| 模式 | 抓什麼 | 需要的輸入 | 計費 |
|---|---|---|---|
| `channel`（台主題，預設） | 指定台的最新主題列表，可用標題關鍵字過濾 | `channels`（台代碼） | 主題列表每筆 `search-listing` $0.002 |
| `thread`（完整主題） | 單一主題主文 + 全部回覆（自動翻頁） | `topicIds`／`topicUrls` | 主文每篇 `product-detail` $0.008、回覆每則 `review-item` $0.003 |

> ℹ️ **這是「台內標題過濾」，不是全站搜尋。** 高登全站關鍵字搜尋需要驗證碼（reCAPTCHA），規劃於 v1.1。要監控品牌聲量時，選幾個相關台（如財經台 FN、時事台 CA、硬件台 HW）再用 `keywords` 過濾標題即可。

### 輸入欄位

| 欄位 | 型別 | 預設 | 說明 |
|---|---|---|---|
| mode | string | `channel` | `channel` 或 `thread` |
| channels | array | `["BW"]` | 台代碼（2 個英文字母），台主題模式用 |
| topicIds | array | `[]` | 主題 ID（數字），完整主題模式用 |
| topicUrls | array | `[]` | 主題完整網址，會自動抽出 ID |
| bulkInput | string | — | 一行一個，依模式自動當台代碼／主題 ID／網址 |
| keywords | array | `[]` | 台主題模式：只保留標題含任一關鍵字的項目，留空不過濾 |
| maxItems | integer | 50 | 台主題模式每台上限／完整主題模式主題數上限（上限 500） |
| dateFrom | string | — | 只要這時間後的主題，相對（`3d`／`12h`／`2w`）或絕對（`MM/DD/YY`），並提早停止翻頁 |
| proxyConfiguration | object | `{ useApifyProxy: true }` | 預設 datacenter proxy（見注意事項） |

#### 常用台代碼

`BW` 吹水台、`CA` 時事台、`FN` 財經台、`GM` 遊戲台、`HW` 硬件台、`MP` 手機台、`SP` 體育台、`ED` 飲食台、`LV` 感情台、`TS` 汽車台、`AN` 動漫台、`ET` 娛樂台、`VI` 影視台、`TR` 旅遊台、`CO` 潮流台、`ST` 學術台、`BB` 親子台、`AU` 成人台。（完整清單見輸入表單說明。）

### 輸入範例

**1. 抓吹水台最新 20 個主題**

```json
{
    "mode": "channel",
    "channels": ["BW"],
    "maxItems": 20
}
```

**2. 在財經台、時事台過濾含「樓市」「加息」的近 7 天主題**

```json
{
    "mode": "channel",
    "channels": ["CA", "FN"],
    "keywords": ["樓市", "加息"],
    "maxItems": 30,
    "dateFrom": "7d"
}
```

**3. 抓單一主題的主文與全部回覆**

```json
{
    "mode": "thread",
    "topicIds": ["8080431"]
}
```

**4. 用網址抓多個主題**

```json
{
    "mode": "thread",
    "topicUrls": [
        "https://forum.hkgolden.com/thread/8080431",
        "https://forum.hkgolden.com/thread/8081196"
    ]
}
```

**5. 批量貼上台代碼（一行一個）**

```json
{
    "mode": "channel",
    "bulkInput": "BW\nCA\nFN",
    "maxItems": 50
}
```

### 注意事項

- **台內過濾 ≠ 全站搜尋**：`keywords` 只在你指定的台內、對標題做過濾。高登全站搜尋受驗證碼保護（v1.1 再支援）。要涵蓋品牌全站聲量時，挑選相關台一起抓。
- **預設走 Apify datacenter proxy**：不用 proxy 會跟平台上其他 run 共用出口 IP，容易被論壇站限流（429、缺頁）。JSON 回應很小，proxy 流量費可忽略。本機測試或自備 proxy 才關掉。
- **純貼圖回覆**：高登很多回覆只有貼圖，這種列 `content` 會是 `null`，圖片 URL 放在 `content_images`。
- **計費只在資料成功寫入後**：每筆主題列表 $0.002、每篇主文 $0.008、每則回覆 $0.003。單次 run 結束會 log `total_items / charged / skipped`。
- **提早停止**：設 `dateFrom` 後，整頁主題都比截止時間舊就停止翻頁；連續多頁無新資料也會停，排程監控時省成本。

### FAQ

**Q：可以搜尋整個高登嗎？**
A：v1 不行——高登全站搜尋需要驗證碼。請改用「指定台 + 標題關鍵字過濾」。全站搜尋規劃於 v1.1。

**Q：要登入或 cookie 嗎？**
A：不用。只抓公開內容，免登入、免 token。

**Q：回覆抓得完嗎？**
A：完整主題模式會依主題的總頁數自動翻頁，抓完所有回覆。

**Q：台代碼去哪找？**
A：見上方「常用台代碼」或輸入表單的欄位說明；也可從高登網址 `forum.hkgolden.com/channel/{代碼}` 對照。

### 免責聲明

本 Actor 僅抓取高登討論區的**公開內容**，供輿情研究、學術與市場分析用途。使用者須自行遵守高登討論區的服務條款、當地法律及個資規範，並對抓取行為與資料用途負責。本工具不抓取需登入的私人內容。

***

*關鍵字：高登討論區爬蟲、HKGolden scraper、香港論壇爬蟲、香港輿情監測、社群聆聽、品牌口碑、討論區資料、貼文回覆匯出、繁中論壇、連登高登、社群輿情分析、免 API 爬蟲、JSON CSV Excel 匯出*

# Actor input Schema

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

要抓什麼？選一個模式，填下面對應欄位就好。

## `channels` (type: `array`):

高登台代碼（2 個英文字母），例如 BW（吹水台）、CA（時事台）、GM（遊戲台）、HW（硬件台）、SP（體育台）、ED（飲食台）、FN（財經台）、LV（感情台）、TS（汽車台）、AN（動漫台）。台主題模式用這個。

## `topicIds` (type: `array`):

高登主題 ID（數字，即網址 forum.hkgolden.com/thread/{ID} 的 ID），例如 8081196。完整主題模式用這個。

## `topicUrls` (type: `array`):

高登主題完整網址，例如 https://forum.hkgolden.com/thread/8081196。會自動抽出主題 ID。

## `bulkInput` (type: `string`):

**一行一個**，按 Enter 換行，不要加引號或逗號。依目前模式自動當成台代碼／主題 ID 或網址，執行時自動併入上面對應欄位。從 Google Sheet / Excel 複製一整欄貼進來最快。

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

（選填）台主題模式：只保留標題包含任一關鍵字的項目。留空表示不過濾。注意：這是「台內標題過濾」，不是全站搜尋（高登全站搜尋需驗證碼，規劃於 v1.1）。要監控品牌聲量時，選幾個相關台再用關鍵字過濾。

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

台主題模式：每個台最多抓幾筆。完整主題模式：最多抓幾篇主題（每篇的回覆不受此限）。上限 500。

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

台主題模式適用，依主題發文時間或最後回覆時間（取較新者）判斷。格式：相對時間 3d（3 天內）、12h（12 小時內）、2w（2 週內），或絕對日期 MM/DD/YY。留空表示不過濾。有設定時也會提早停止翻頁，排程監控時省成本。

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

預設走 Apify datacenter proxy：不用 proxy 時會跟平台上其他 run 共用出口 IP，容易被論壇站限流（429、缺頁）。JSON 回應不大，proxy 流量費可忽略。自備 proxy 或本機測試才關掉。

## Actor input object example

```json
{
  "mode": "channel",
  "channels": [
    "BW"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "mode": "channel",
    "channels": [
        "BW"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/hkgolden-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 = {
    "mode": "channel",
    "channels": ["BW"],
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/hkgolden-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 '{
  "mode": "channel",
  "channels": [
    "BW"
  ]
}' |
apify call claude_code_reviewer/hkgolden-scraper --silent --output-dataset

```

## MCP server setup

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