# HardwareZone 爬蟲｜新加坡最大論壇貼文、回覆、輿情監控（免 API） (`claude_code_reviewer/hardwarezone-scraper`) Actor

免登入抓新加坡最大論壇 HardwareZone：板塊主題列表（可關鍵字過濾）、主文與全部回覆，含作者、回覆數、瀏覽數、時間，輸出 JSON／CSV／Excel。配合排程做新加坡品牌聲量每日監控。新加坡社群輿情、品牌口碑、市場研究必備。

- **URL**: https://apify.com/claude\_code\_reviewer/hardwarezone-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 2 total users, 2 monthly users, 90.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

## HardwareZone 爬蟲｜新加坡最大論壇（免 API・免登入）

抓 HardwareZone（forums.hardwarezone.com.sg）——新加坡最大論壇：板塊最新主題列表、單一主題全文及所有回覆，走公開 HTML 端點，輸出結構化資料。

### 輸出欄位

#### 板塊主題列表（ListingRow，content 為 null）

| 欄位名稱 | 型別 | 說明 |
|---------|------|------|
| post\_id | string | 主題 ID |
| site | string | 固定 `hardwarezone` |
| board | string | null | 板塊 ID（查詢時輸入的 forumId） |
| title | string | null | 標題 |
| author | string | null | 發起人 |
| reply\_count | number | null | 回覆數（原始頁面可能是 "895" 或 "29K" 這種縮寫，已轉換成整數） |
| view\_count | number | null | 瀏覽數（同樣處理 "104K"／"4M" 縮寫） |
| created\_at | string | null | 發文時間（ISO 8601，含 +0800 時區偏移） |
| last\_reply\_at | string | null | 最後回覆時間（ISO 8601，含 +0800 時區偏移） |
| post\_url | string | null | 主題連結 |
| content | string | null | 內文（列表模式為 null） |
| source\_mode | string | 抓取模式 |
| source\_query | string | 查詢條件（板塊 ID） |
| scraped\_at | string | 抓取時間（ISO 8601） |

#### 主文（ThreadRow，同上欄位，多 content 有值）

| 欄位名稱 | 型別 | 說明 |
|---------|------|------|
| content | string | null | 主文全文（已去除 HTML 標籤、空白已壓縮） |

主文的 `board` 一律 `null`（主題模式沒有輸入板塊 ID，板塊資訊不在主題頁上）；`reply_count`／`view_count`／`last_reply_at` 一律 `null`（這些是板塊列表頁才有的欄位）。

#### 回覆（ReplyRow，僅完整主題模式）

| 欄位名稱 | 型別 | 說明 |
|---------|------|------|
| reply\_id | string | 回覆 ID（樓層貼文的元素 ID；缺少時退回 `{主題ID}-{樓層}`） |
| post\_id | string | 所屬主題 ID |
| site | string | 固定 `hardwarezone` |
| floor | number | null | 樓層（1-based，跨頁連續編號；年齡驗證牆遮蔽的貼文讀不到樓層時為 null，見下方注意事項） |
| author | string | null | 作者 |
| content | string | null | 回覆內容（已去除 HTML 標籤、空白已壓縮；被年齡驗證牆遮蔽時為 null） |
| created\_at | string | null | 回覆時間（ISO 8601，含 +0800 時區偏移；被遮蔽時為 null） |
| scraped\_at | string | 抓取時間（ISO 8601） |

### 模式說明

| 模式 | 輸入 | 輸出 | 計費 |
|-----|------|------|------|
| forum | forumIds（板塊 ID） | 主題列表 | $0.002/筆 |
| thread | threadIds / threadUrls | 主文（$0.008/篇）＋所有回覆（$0.003/則） | 依數量 |

### 輸入欄位

| 欄位 | 型別 | 預設 | 說明 |
|-----|------|------|------|
| mode | enum | forum | 模式：forum / thread（必填） |
| forumIds | array | `["16"]` | 板塊 ID，例如 16（Eat-Drink-Man-Woman 美食）、234（Chill-out/Happenings 吹水）、9（Mobile Communication Technology 手機）。更多板塊到 forums.hardwarezone.com.sg 找 |
| threadIds | array | — | 主題 ID |
| threadUrls | array | — | 主題網址，自動抽出主題 ID |
| bulkInput | textarea | — | 批量貼上，一行一個，依目前模式自動併入對應欄位 |
| keywords | array | — | 板塊主題模式：標題關鍵字過濾（留空不過濾） |
| maxItems | integer | 50 | 板塊主題模式：每個板塊最多抓幾筆；完整主題模式：最多抓幾篇（回覆不受此限）。上限 2000 |
| dateFrom | string | — | 板塊主題模式適用，依主題發文時間或最後回覆時間（取較新者）判斷。格式 `3d`、`12h`、`2w`（相對時間）或 `MM/DD/YY`（絕對日期）。有設定時會提早停止翻頁（置頂主題不受此篩選及早停判斷影響），排程監控更省成本 |
| proxyConfiguration | proxy | Apify datacenter proxy | 預設開啟；不用 proxy 會與其他 run 共用出口 IP 而被論壇限流。自備 proxy 或本機測試才關 |

### 輸入範例

#### 板塊主題列表

```json
{
  "mode": "forum",
  "forumIds": ["16", "234"],
  "maxItems": 50
}
```

#### 完整主題及回覆

```json
{
  "mode": "thread",
  "threadUrls": [
    "https://forums.hardwarezone.com.sg/threads/official-blood-donation-thread-give-blood-save-lives.7166857/"
  ]
}
```

### 新加坡輿情監控

HardwareZone（尤其是它的吹水板 EDMW）是新加坡最大論壇，也是本地社群輿情監測最常打包的來源。想要更完整的亞洲論壇輿情拼圖？搭配作者的其他繁中輿情 actor：LIHKG（`lihkg-scraper`，香港）、PTT（`ptt-scraper`，台灣）。三隻 actor 輸出欄位同一套慣例（snake\_case、缺值 null、附 ISO 時間戳），方便合併分析。

### 注意事項

- 只抓公開內容，不需要帳號或 token
- 走公開 HTML 端點（XenForo 論壇引擎），不用瀏覽器，速度快、成本低
- 內文已自動去除 HTML 標籤，空白已壓縮成單一空格
- 板塊 ID／主題 ID 用純數字即可（例如 `forumIds: ["16"]`），Actor 會自動組出網址；HardwareZone 會把純數字網址導向含板名的完整網址，效果一樣
- **部分貼文有年齡驗證牆**：HardwareZone 對部分內容（不限成人版）要求登入並完成年齡驗證才能看到全文，未登入抓取時這類貼文只會拿到 `author`（仍然有值），`content`／`created_at`／`floor` 則誠實回傳 `null`——不會用猜測值頂替。主題本身的第一篇（主文）目前觀察不受此限制
- `reply_count`／`view_count` 在原始頁面常以 "104K"／"4M" 這種縮寫呈現（不只是大數字才會，中量級數字也可能縮寫），已統一轉換成整數
- 連續 5 頁無新資料時自動停止，不空轉燒費用；設了 dateFrom 的話，整頁非置頂主題都比 dateFrom 舊就會直接停止翻頁（更省成本，僅 forum 模式適用；置頂主題永遠保留、不受此篩選影響）
- HardwareZone（XenForo）未來若改版或加上反爬機制，判斷方式：以 Apify cloud smoke test 結果為準（go/no-go）；若被擋，備援方案是改用 Apify residential proxy，不預先過度設計

### 常見問題（FAQ）

**Q: 需要登入才能看嗎？**

A: 不需要。本 Actor 只抓公開主題列表及貼文，不涉及任何需要登入的功能。少數貼文本身有年齡驗證牆（見上方注意事項），這類貼文的內文本來就無法在未登入狀態下取得，不在支援範圍。

**Q: 為什麼有些回覆的 `content`／`created_at`／`floor` 是 null？**

A: 這些回覆被 HardwareZone 的年齡驗證牆遮蔽，未登入無法讀到內文與時間。誠實回報 null，不做假資料；`author` 仍然拿得到，`reply_id` 也一定有值。

**Q: 可以同時抓多個板塊嗎？**

A: 可以。在 forumIds 填多個 ID，或用 bulkInput 一行一個貼上。

**Q: threadIds 跟 threadUrls 有什麼不同？**

A: 效果一樣，threadUrls 會自動抽出數字 ID。兩種都支援純數字網址（`/threads/{id}/`）跟完整網址（`/threads/{標題slug}.{id}/`）。

**Q: `board` 欄位在完整主題模式下為什麼是 null？**

A: 主題頁本身沒有板塊資訊（板塊 ID 只出現在板塊列表頁的網址上），完整主題模式的輸入也只有 threadId，不知道它屬於哪個板塊，因此誠實回傳 null。

### 免責聲明

本工具僅供學術研究及合法商業分析用途。使用者應遵守 HardwareZone 服務條款及相關法規。請勿以本工具進行任何侵害他人隱私、散布虛假資訊或其他違法行為。作者不對任何濫用行為承擔責任。

***

HardwareZone 爬蟲、新加坡論壇、Singapore forum scraper、HWZ、EDMW、社群輿情、品牌監控

# Actor input Schema

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

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

## `forumIds` (type: `array`):

HardwareZone 板塊 ID（數字，即網址的 forums/{slug}.{id}/），例如 16（Eat-Drink-Man-Woman 美食）、234（Chill-out/Happenings 吹水）、9（Mobile Communication Technology 手機）。更多板塊可到 forums.hardwarezone.com.sg 找。板塊主題模式用這個。

## `threadIds` (type: `array`):

HardwareZone 主題 ID（數字，即網址的 threads/{slug}.{id}/），例如 7166857。完整主題模式用這個。

## `threadUrls` (type: `array`):

HardwareZone 主題完整網址，例如 https://forums.hardwarezone.com.sg/threads/official-blood-donation-thread-give-blood-save-lives.7166857/。會自動抽出主題 ID。

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

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

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

（選填）板塊主題模式：只保留標題包含任一關鍵字的項目。留空表示不過濾。

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

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

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

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

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

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

## Actor input object example

```json
{
  "mode": "forum",
  "forumIds": [
    "16"
  ],
  "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": "forum",
    "forumIds": [
        "16"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/hardwarezone-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": "forum",
    "forumIds": ["16"],
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/hardwarezone-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": "forum",
  "forumIds": [
    "16"
  ]
}' |
apify call claude_code_reviewer/hardwarezone-scraper --silent --output-dataset

```

## MCP server setup

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