# 亞洲社群輿情監控｜連登、PTT、HardwareZone、Telegram 品牌聲量聚合 (`claude_code_reviewer/asia-social-listening`) Actor

一站監控亞洲論壇與社群的品牌聲量：香港連登、台灣 PTT、新加坡 HardwareZone、Telegram。輸入品牌關鍵字自動跨平台抓取、去重、輕量情緒分析，支援競品聲量比較（share of voice）與增量抓取，按去重提及計費。品牌危機預警、市場研究、社群口碑監測必備。

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

## Pricing

from $50.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

## 亞洲社群輿情監控｜連登、PTT、HardwareZone、Telegram 品牌聲量聚合

輸入一個品牌關鍵字，一次抓香港連登（LIHKG）、台灣 PTT、新加坡 HardwareZone、Telegram 四個平台的相關討論，自動跨平台去重、輕量情緒分析，並支援競品聲量比較（share of voice）。走各平台的公開端點直連抓取，**不呼叫我們自己的其他 actor**（不會讓你被子 actor 的計費再收一次錢），輸出結構化的單一 mention 列表。

### 這是什麼／不是什麼

- 這是一個 **meta-actor**：自己用輕量 HTTP（`got-scraping`）直接打各平台的公開端點，重用（複製）我們自家 LIHKG／PTT／HardwareZone／Telegram 爬蟲的解析邏輯，**不是**跑一個會另外收費的子 actor。
- LIHKG 是**全站真搜尋**；PTT、HardwareZone、Telegram 是**指定目標（看板／板塊／頻道）內的關鍵字/標題過濾**，不是全站搜尋——過濾式平台抓不到清單以外的討論，見下方注意事項。
- Threads（亞洲・真搜尋）規劃於 **v1.1**——它需要瀏覽器（無 JSON 端點），$0.05/mention 的定價撐得起，但 v1 先出這四個純 HTTP 平台。

### 輸出欄位（MentionRow）

| 欄位名稱 | 型別 | 說明 |
|---------|------|------|
| mention\_id | string | `{platform}:{原始ID}`，跨 run 穩定，deltaMode 用這個比對新舊 |
| platforms | array | 勾選來源：`lihkg` / `ptt` / `hardwarezone` / `telegram`（預設全開） |
| brand\_matched | string | 命中的品牌詞（主品牌 brandKeyword 或某個 competitorBrands） |
| is\_competitor | boolean | 是否為競品（false = 主品牌本身） |
| matched\_alias | string | null | 命中的別名詞（searchAliases），主詞命中則為 null |
| text | string | null | 貼文標題／內容／訊息文字 |
| author | string | null | 作者/發文者 |
| url | string | null | 原始貼文連結 |
| created\_at | string | null | 發文時間（ISO 8601，各平台原始精度不同） |
| engagement\_likes | number | null | 讚數（多數平台無此欄位，誠實回 null） |
| engagement\_replies | number | null | 回覆/推文數 |
| engagement\_views | number | null | 瀏覽/觀看數 |
| sentiment | string | null | `positive` / `neutral` / `negative`，關閉情緒分析時為 null |
| sentiment\_score | number | null | -1（負面）～1（正面），關閉情緒分析時為 null |
| is\_duplicate | boolean | 是否為重複 mention（同貼文或跨平台轉貼），只有 false 的會被計費 |
| duplicate\_of | string | null | 重複時指向第一筆的 mention\_id，否則為 null |
| source\_query | string | 實際命中的查詢/過濾詞（主詞或別名） |
| scraped\_at | string | 抓取時間（ISO 8601） |

### 平台能力

| 平台 | 關鍵字能力 | 需要目標清單？ |
|---|---|---|
| LIHKG（香港） | 🟢 全站真搜尋 | 否 |
| PTT（台灣） | 🟡 指定看板內標題過濾 | 是（`pttBoards`，預設 Gossiping／Stock） |
| HardwareZone（新加坡） | 🟡 指定板塊內標題過濾 | 是（`hwzForums`，預設 16／EDMW 吹水板） |
| Telegram | 🟡 指定頻道內文字過濾 | 是（`telegramChannels`，未填會自動跳過並警告） |

### 輸入欄位

| 欄位 | 型別 | 預設 | 說明 |
|-----|------|------|------|
| brandKeyword | string | — | 要監控的品牌/關鍵字（必填） |
| competitorBrands | array | `[]` | 競品品牌，各自也跑一輪，輸出可比較聲量 |
| searchAliases | array | `[]` | 主品牌額外搜法（英文名/簡稱/常見錯拼），只套用在主品牌 |
| platforms | array | 全五個 | 要監控的平台，見上方「平台能力」 |
| pttBoards | array | `["Gossiping","Stock"]` | platforms 含 ptt 時適用 |
| hwzForums | array | `["16"]` | platforms 含 hardwarezone 時適用 |
| telegramChannels | array | `[]` | platforms 含 telegram 時必填，否則自動跳過並警告 |
| lookbackDays | integer | 7 | 只抓最近幾天內的內容，範圍 1-90 |
| maxMentionsPerPlatform | integer | 100 | 每平台每品牌（含別名合併後）上限，範圍 1-1000 |
| sentimentAnalysis | boolean | true | 是否做情緒分析（輕量關鍵字詞表，非 AI） |
| deduplication | boolean | true | 是否做跨平台/站內去重 |
| deltaMode | boolean | false | 是否只回傳上次執行之後的新 mention |
| proxyConfiguration | proxy | Apify datacenter proxy | 預設開啟，避免與其他 run 共用出口 IP 被限流 |

### 輸入範例

#### 單一品牌，只看連登＋PTT

```json
{
  "brandKeyword": "誠品",
  "platforms": ["lihkg", "ptt"],
  "lookbackDays": 30,
  "maxMentionsPerPlatform": 40
}
```

#### 品牌＋競品比較，含 PTT／HardwareZone 目標清單

```json
{
  "brandKeyword": "麥當勞",
  "competitorBrands": ["肯德基"],
  "platforms": ["lihkg", "ptt", "hardwarezone"],
  "pttBoards": ["Gossiping"],
  "hwzForums": ["16"],
  "lookbackDays": 30,
  "maxMentionsPerPlatform": 30
}
```

### 品牌監控排程

`lookbackDays` 搭配 `deltaMode` 是設計給 **Apify Schedule** 排程用的：

- 第一次跑：`deltaMode: false`（或省略），拿到完整的歷史基準資料。
- 之後排程（例如每天/每週跑一次）：把 `deltaMode` 打開，`lookbackDays` 設得比排程間隔長一點（例如每天跑、`lookbackDays: 3`）當緩衝，每次 run 只會回傳「上次執行之後」還沒看過的新 mention（用品牌專屬的命名 KV store `SEEN-{brand的hash}` 記錄已見過的 `mention_id`，跨 run 比對）——不會因為某次 run 沒跑而漏資料，也不會重複看到舊的。
- 已經看過但這次被 deltaMode 濾掉的 mention 仍會計入 run 摘要的 `skipped_delta`，方便確認排程有在正常運作（數字不會一直是 0）。
- 每次 run 結束都會在 KV store 存一份 `SUMMARY`（各平台筆數、情緒分佈、聲量比較），適合接 dashboard 或另外拉出來做趨勢圖。

### 注意事項

- **情緒分析是輕量規則式關鍵字詞表（繁中 + 英文各 10 個正/負面詞），不是 AI／LLM 模型**。分數 = (正面命中 − 負面命中) / (正面 + 負面 + 1)，門檻 ±0.15 切 positive/neutral/negative。適合快速抓「大致風向」，不適合當成精確情緒判讀依據。
- **只抓公開內容**，不需要帳號或登入。PTT 的 18+ 看板會自動處理 over18 cookie，其餘平台皆為完全公開頁面。
- **真搜尋 vs 過濾式平台的差異**：LIHKG 是打全站搜尋，理論上能搜到全站任何符合關鍵字的討論；PTT／HardwareZone／Telegram 只會在你填的看板/板塊/頻道清單「內」做標題/內文關鍵字過濾——清單外的看板、沒設定的頻道，完全不會被看到。品牌若在其他看板/頻道被討論，需要自行把該看板/頻道加進清單。
- **Threads 規劃於 v1.1**：Threads 搜尋是瀏覽器渲染、無公開 JSON 端點，需要開瀏覽器；本 actor v1 走純 HTTP 直連四平台。$0.05/mention 的定價其實撐得起 Threads 的瀏覽器成本，v1.1 會用獨立的瀏覽器 adapter 補上。
- **searchAliases 只套用在主品牌**：競品品牌固定只用自己的品牌詞搜尋/過濾，不會套用主品牌的別名清單。
- **去重規則**：站內以原始 ID 去重（同一則貼文只計一次）；跨平台以正規化文字（去除網址/標點/emoji/空白後轉小寫）的雜湊比對，抓出跨平台轉貼/重複內容，第一筆為準，之後的標記 `is_duplicate: true`。**只有非重複的 mention 會被計費**。
- **maxMentionsPerPlatform 是「該平台該品牌」的上限**：主品牌若有設 searchAliases，主詞＋別名合併去重後才套用這個上限，不是每個別名各自的上限。
- HardwareZone／PTT／LIHKG 若日後改版或加上反爬機制，會反映在該平台回傳 0 筆＋一則警告，不會讓整次 run 失敗——其他平台照常收集資料。

### 常見問題（FAQ）

**Q: 為什麼有些欄位（engagement\_likes 等）都是 null？**

A: 不是每個平台都公開讚數。誠實回傳 null 不是欄位失效，是那個平台的公開頁面本來就沒有這個資訊。

**Q: 為什麼 mention 數量比預期少很多？**

A: 最常見原因是 PTT／HardwareZone／Telegram 是「目標清單內過濾」不是全站搜尋——確認 `pttBoards`／`hwzForums`／`telegramChannels` 有涵蓋品牌可能被討論的地方；也可能是 `lookbackDays` 設太短，或 `deltaMode` 開著、大部分 mention 上次已經抓過。

**Q: is\_duplicate 的貼文為什麼還會出現在 dataset 裡？**

A: 為了讓你看到完整的原始資料與重複關係（可以追 duplicate\_of 找到原始那一筆），重複的 mention 一樣會 push 進 dataset，只是不計費。

**Q: 可以只看競品、不看主品牌自己嗎？**

A: 目前不行，brandKeyword 一定會跑；如果只是想比較 competitorBrands 彼此，可以把 competitorBrands 填多個、忽略輸出裡 brand\_matched 等於 brandKeyword 的列即可。

### 免責聲明

本工具僅供學術研究及合法商業分析用途。使用者應遵守各平台（LIHKG、PTT、HardwareZone、Telegram）的服務條款及相關法規。請勿以本工具進行任何侵害他人隱私、散布虛假資訊或其他違法行為。情緒分析結果為輕量規則式演算法產出，僅供參考，不構成專業意見。作者不對任何濫用行為承擔責任。

***

輿情監控、社群監聽、品牌聲量、連登、PTT、HardwareZone、Telegram、social listening、brand monitoring

# Actor input Schema

## `brandKeyword` (type: `string`):

要監控的品牌或關鍵字（必填），例如「誠品」。所有選定平台都會用這個詞搜尋/過濾。

## `competitorBrands` (type: `array`):

（選填）競品品牌/關鍵字，各自也會跑一輪抓取，輸出的 brand\_matched／is\_competitor 欄位可用來比較聲量（share of voice）。

## `searchAliases` (type: `array`):

（選填）主品牌的額外搜法：英文名、簡稱、常見錯拼等。只套用在主品牌（brandKeyword），不套用在競品。同一則貼文被主詞和別名都搜到時，以主詞為準（matched\_alias 為 null）。

## `platforms` (type: `array`):

要監控哪些平台？連登／Threads 是全站真搜尋；PTT／HardwareZone／Telegram 是板塊/頻道內關鍵字過濾（需要下面對應的目標清單）。

## `pttBoards` (type: `array`):

監控平台含 PTT 時適用。要在哪些看板內做標題關鍵字過濾，例如 Gossiping（八卦板）、Stock（股票板）。18+ 看板會自動處理 over18 cookie。

## `hwzForums` (type: `array`):

監控平台含 HardwareZone 時適用。HardwareZone 板塊 ID（數字），例如 16（Eat-Drink-Man-Woman／EDMW 吹水板）。

## `telegramChannels` (type: `array`):

監控平台含 Telegram 時適用（必填，否則會自動跳過 Telegram 並警告）。填頻道帳號（不含 @），例如 durov。只能抓公開頻道。

## `lookbackDays` (type: `integer`):

只抓最近幾天內的內容（依發文/最後回覆時間判斷，會提早停止翻頁以節省成本）。

## `maxMentionsPerPlatform` (type: `integer`):

每個平台、每個品牌（含競品）最多抓幾筆 mention（含主品牌別名合併後的上限）。上限 1000。

## `sentimentAnalysis` (type: `boolean`):

開啟後為每筆 mention 加上 sentiment／sentiment\_score。用輕量繁中/英文關鍵字詞表判斷，不是 AI 模型（見 README 說明）。關閉則兩欄位皆為 null。

## `deduplication` (type: `boolean`):

開啟後會標記同一篇貼文（同平台同 ID）及跨平台轉貼/重複內容（正規化文字相同）為 is\_duplicate，只有非重複的 mention 會被計費。

## `deltaMode` (type: `boolean`):

開啟後只回傳「上次執行之後」的新 mention（用品牌專屬的命名 KV store 記錄已見過的 mention\_id，跨 run 比對）。適合排程監控，避免重複看到舊資料。

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

預設走 Apify datacenter proxy：不用 proxy 時會跟平台上其他 run 共用出口 IP，容易被個別平台限流。五個平台的回應都不大，proxy 流量費可忽略。自備 proxy 或本機測試才關掉。

## Actor input object example

```json
{
  "brandKeyword": "誠品",
  "platforms": [
    "lihkg",
    "ptt",
    "hardwarezone",
    "telegram"
  ],
  "pttBoards": [
    "Gossiping",
    "Stock"
  ],
  "hwzForums": [
    "16"
  ],
  "lookbackDays": 7,
  "maxMentionsPerPlatform": 100,
  "sentimentAnalysis": true,
  "deduplication": true,
  "deltaMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "brandKeyword": "誠品",
    "platforms": [
        "lihkg",
        "ptt",
        "hardwarezone",
        "telegram"
    ],
    "pttBoards": [
        "Gossiping",
        "Stock"
    ],
    "hwzForums": [
        "16"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/asia-social-listening").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 = {
    "brandKeyword": "誠品",
    "platforms": [
        "lihkg",
        "ptt",
        "hardwarezone",
        "telegram",
    ],
    "pttBoards": [
        "Gossiping",
        "Stock",
    ],
    "hwzForums": ["16"],
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/asia-social-listening").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 '{
  "brandKeyword": "誠品",
  "platforms": [
    "lihkg",
    "ptt",
    "hardwarezone",
    "telegram"
  ],
  "pttBoards": [
    "Gossiping",
    "Stock"
  ],
  "hwzForums": [
    "16"
  ]
}' |
apify call claude_code_reviewer/asia-social-listening --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,claude_code_reviewer/asia-social-listening"
        }
    }
}

```

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/RYmoChIIJWdOcKA9v/builds/XLJf46Zf2tXubgF27/openapi.json
