# 香港置業爬蟲｜香港放售出租樓盤、減價盤、實用呎價一鍵匯出（免 API） (`claude_code_reviewer/hkp-scraper`) Actor

香港置業爬蟲，免登入抓公開樓盤：放售約 8 千筆、出租約 3 千筆，含售價、月租、減價前原價、實用面積、實用呎價、房數、樓層、屋苑大廈、入伙日期、居屋價錢與經緯度，可按地區、屋苑、房數、校網、價錢與面積篩選，輸出 JSON／CSV／Excel。香港房產市調、減價盤追蹤與代理庫存比較必備。

- **URL**: https://apify.com/claude_code_reviewer/hkp-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** Agents, Real estate, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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?

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

## 香港置業爬蟲（Hong Kong Property Scraper）

抓香港置業（hkp.com.hk）的**放售／出租樓盤**。走公開 JSON API，不用登入、不用申請 API key，也不用開瀏覽器。

香港置業屬美聯集團，但**盤源是自己的**：盤源編號以 `H` 開頭，跟美聯的 `M…` 不同。我們抽了 250 筆比對，以「屋苑＋價錢＋面積」配對，同一個盤同時出現在兩邊的只有 4–7%。想看全港代理庫存的話，要和美聯、中原分開抓。

| 盤源 | 可抓總量（2026-11-02）|
|---|---|
| 放售 | 約 **8,000** 筆（港島 1,455／九龍 6,173／新界 408）|
| 出租 | 約 **3,060** 筆 |

### 輸出欄位

| 欄位 | 型別 | 說明 |
|---|---|---|
| `serial_no` | string | 香港置業盤源編號，例如 `H205116467` |
| `deal_type` | string | 這次抓的是 `buy`（放售）還是 `rent`（出租）|
| `for_sale` / `for_rent` | boolean | 這個盤是否放售／放租（同一個盤可以兩者都是）|
| `region` / `subregion` / `district` / `sm_district` | string|null | 區域、分區、地區、小區，例如 九龍／油尖旺／奧運 |
| `estate` / `estate_id` | string|null | 屋苑名稱與 ID（ID 可拿來當 `estateIds` 篩選）|
| `phase` | string|null | 期數 |
| `building` / `building_id` | string|null | 大廈名稱與 ID |
| `address` | string|null | 大廈地址 |
| `floor_level` | string|null | 樓層：高層／中層／低層 |
| `flat` | string|null | 單位，例如 `D` |
| `price_hkd` | number|null | 售價（港元）。純租盤給 `null` |
| `previous_price_hkd` | number|null | 減價前的原價。沒改過價給 `null` |
| `is_hos` | boolean|null | 是否居屋等資助房屋 |
| `hos_price_hkd` | number|null | 居屋未補地價的售價（這類盤的 `price_hkd` 是 `null`）|
| `rent_hkd` | number|null | 月租（港元）。純售盤給 `null` |
| `previous_rent_hkd` | number|null | 減租前的原租 |
| `net_area_sqft` / `gross_area_sqft` | number|null | 實用面積／建築面積（平方呎）|
| `efficiency_pct` | number|null | 實用率（%）|
| `net_unit_price_hkd` | number|null | 實用呎價 |
| `net_unit_rent_hkd` | number|null | 實用呎租 |
| `monthly_mortgage_hkd` | number|null | 香港置業試算的每月供款 |
| `bedroom` / `sitting_room` | number|null | 房數／廳數。`bedroom: 0` 是開放式 |
| `orientation` | string|null | 座向，例如 西南 |
| `features` | string\[]|null | 盤源特色，例如 有匙、連露台、會所（依買／租分開）|
| `facilities` | string\[]|null | 屋苑設施，例如 會所、泳池 |
| `tags` | string\[]|null | 盤源標籤，例如 `below`、`sale` |
| `has_video` / `has_photo_360` | boolean|null | 有無影片／360 相片 |
| `building_completed_at` | string|null | 大廈入伙日期（ISO 8601）|
| `latitude` / `longitude` | number|null | 經緯度 |
| `photo_urls` | string\[]|null | 相片網址 |
| `listing_url` | string|null | 香港置業盤源頁 |
| `first_listed_at` | string|null | 首次刊登時間（ISO 8601）|
| `updated_at` | string|null | 盤源更新時間（ISO 8601）|
| `scraped_at` | string | 抓取時間（ISO 8601）|

> 欄位名稱一律是英文 snake_case。**缺值給 `null`，欄位不會省略**，可以直接寫進資料表。盤源資料沒有代理姓名或電話。

### 模式

| `dealType` | 抓什麼 | 主要用途 |
|---|---|---|
| `buy` | 放售樓盤 | 代理之間比較庫存、選盤、追蹤減價 |
| `rent` | 出租樓盤 | 租金調查、回報率試算 |

香港置業的成交紀錄和屋苑目錄跟美聯是同一個資料庫，而且只是美聯的一部分，所以這隻 Actor 不做。要成交或屋苑資料，請用美聯物業爬蟲。

### 輸入

| 欄位 | 型別 | 預設 | 說明 |
|---|---|---|---|
| `dealType` | enum | `buy` | `buy` 放售、`rent` 出租 |
| `regions` | string\[] | 全港 | 港島／九龍／新界，留空＝全港 |
| `bulkRegions` | string | — | 一行一個，與上面自動合併 |
| `estateIds` | string\[] | 不限 | 屋苑 ID，例如 `E000004317`（取自輸出的 `estate_id`）|
| `bulkEstateIds` | string | — | 一行一個，與上面自動合併 |
| `bedrooms` | string\[] | 不限 | `0`（開放式）到 `3`，可複選 |
| `schoolNet` | integer | — | 小學校網編號 |
| `priceMin` / `priceMax` | integer | — | 買盤是售價、租盤是月租，單位是港元（不是萬）|
| `netAreaMin` / `netAreaMax` | integer | — | 實用面積範圍（呎）|
| `sort` | enum | `latest` | 最新上架、價錢、減價幅度、實用面積、實用呎價 |
| `language` | enum | `zh-hk` | 地區、屋苑、樓層等名稱的語言（欄位名一律英文）|
| `maxItems` | integer | 50 | 本次最多輸出幾筆，上限 500 |
| `onlyNew` | boolean | `false` | 只回傳先前 run 沒回傳過的盤（監控用），見下方說明 |
| `stateKey` | string | 自動 | 記憶名稱，留空由篩選條件推導 |
| `proxyConfiguration` | object | residential 香港 | **請保持預設**，見注意事項 |

### 輸入範例

**1. 九龍最新放售盤 100 筆**

```json
{ "dealType": "buy", "regions": ["九龍"], "sort": "latest", "maxItems": 100 }
```

**2. 指定屋苑、1500 萬以下，價錢由低到高**

```json
{ "dealType": "buy", "estateIds": ["E000004317"], "priceMax": 15000000, "sort": "price", "maxItems": 50 }
```

**3. 港島 1–2 房租盤，月租 2 萬以下**

```json
{ "dealType": "rent", "regions": ["港島"], "bedrooms": ["1", "2"], "priceMax": 20000, "maxItems": 200 }
```

**4. 全港減價最多的放售盤**

```json
{ "dealType": "buy", "sort": "sale_perc_desc", "maxItems": 100 }
```

**5. 九龍城校網（41）實用 500 呎以上的盤，英文名稱**

```json
{ "dealType": "buy", "schoolNet": 41, "netAreaMin": 500, "language": "en", "maxItems": 100 }
```

### 在 Claude／AI agent 裡直接用（MCP）

這個 Actor 可以透過 Apify 官方託管的 MCP server 當成工具使用，不用另外安裝。計費和一般執行相同，照筆數計，MCP 不加價。

Claude Code 一行加入（`$APIFY_TOKEN` 在 Apify Console → Settings → API & Integrations 取得）：

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=claude_code_reviewer/hkp-scraper" --header "Authorization: Bearer $APIFY_TOKEN"
```

Claude Desktop、Cursor 等其他 MCP client：把 `https://mcp.apify.com` 加為自訂 connector，用 OAuth 登入。

可以直接這樣問：

> 用香港置業爬蟲抓九龍最新 300 個放售盤，按屋苑分組，列出每個屋苑的實用呎價中位數同減價盤數目

Agent 會先收到執行摘要與 dataset id，再用 `get-dataset-items` 讀資料（可以只指定需要的欄位，省 token）。

### 只抓新資料（監控用）

預設每次都抓完整結果。開啟 `onlyNew` 後，actor 會把已回傳過的盤記在你帳號下名為 `delta-state-<actor ID>` 的 key-value store（每隻 actor 一個）。之後同樣的輸入**只輸出新出現的盤**，看過的不輸出、也不收費。第一次執行等同一般抓取，同時建立記憶。沒有新盤時 run 仍然是成功，log 會寫「沒有新項目」。

排程範例（每天跑同一份輸入，只拿新上架的盤）：

```json
{ "dealType": "buy", "regions": ["九龍"], "sort": "latest", "onlyNew": true, "maxItems": 200 }
```

- **`stateKey`**：留空時由買／租、地區、屋苑、篩選和排序自動推導（`maxItems`、proxy、語言不影響），所以同一份排程輸入會接著上次繼續。不同排程或整合要各自記憶的話，請自訂名稱（英數、`_`、`-`，1–100 字）。
- **識別方式**：用 `serial_no`。
- **排序**：任何排序都能用，但監控建議用 `sort: "latest"`。其他排序遇到整頁都看過時會繼續往後翻，連續 5 頁都看過才停。
- 每個狀態名稱最多記住最近 20,000 筆；`maxItems` 只計算新的盤。

### 注意事項

- **請保持 proxy 預設值（Apify residential、香港出口）。** 香港置業對 datacenter 出口一律回 403。關掉 proxy 或改成 datacenter 會抓到 0 筆，run 狀態訊息會說明原因。每筆 JSON 約 3KB，residential 流量費可以忽略。
- **篩選條件都實測過。** 列出的每個條件，我們都用兩個不同的值比對過回傳筆數，確認真的有篩到。沒列出的條件（例如關鍵字、地區細分 ID）不開放；本 Actor 不送沒作用的參數，免得你以為有篩到。
- **房數只能篩開放式到 3 房**。香港置業的篩選對 4 房以上一律回 0 筆。要找 4 房以上，請不填 `bedrooms`，抓完再用 `bedroom` 欄位自己篩。
- `maxItems` 是**所有地區合計**的上限，不是每區。
- 純售盤的 `rent_hkd`、純租盤的 `price_hkd` 是 `null`。原始資料在這些欄位給 0，我們轉成 `null`，避免出現「售價 0 元」這種誤導的值。
- 抓取期間有新盤上架時，分頁會位移、出現重複。本 Actor 整個 run 會去重，同一個盤只輸出、只收費一次。
- 只抓公開刊登的資料，不登入、不繞過任何驗證。
- **個人資料**：盤源資料不含代理姓名或電話。若你把資料和其他來源合併，使用時仍須遵守香港《個人資料（私隱）條例》（PDPO）。
- 單一 run 最多 3 個併發請求，不會對網站造成負擔。

### 計費

單一事件 `search-listing`，**每輸出一筆 $0.002**。只有成功寫進 dataset 的資料才收費；重複的、被過濾掉的不收。

### FAQ

**Q：跟美聯物業爬蟲有什麼不同？**
A：香港置業和美聯同屬美聯集團、用同一套系統，但**放盤是各自的**，重疊很少。成交紀錄和屋苑目錄則是同一份資料，所以只在美聯物業爬蟲提供。

**Q：怎麼找屋苑 ID？**
A：先不填 `estateIds` 抓一次（例如指定地區），從輸出的 `estate_id` 欄位找到想要的屋苑，例如浪澄灣是 `E000004317`，之後填進 `estateIds`。

**Q：`priceMin`／`priceMax` 的單位是什麼？**
A：港元。買盤是售價（例如 `8000000` 代表 800 萬），租盤是月租（例如 `20000`）。不是以「萬」為單位。

**Q：`previous_price_hkd` 有值代表什麼？**
A：代表業主減過價，`previous_price_hkd` 是減價前的叫價。用 `sort: "sale_perc_desc"` 可以讓減幅最大的盤排在最前面。

**Q：居屋盤的售價為什麼在 `hos_price_hkd`？**
A：居屋等資助房屋的叫價分「未補地價」和「已補地價」兩種。香港置業把未補地價的價錢放在另一個欄位，這類盤的 `price_hkd` 會是 `null`，價錢請看 `hos_price_hkd`。

**Q：抓到的筆數比 `maxItems` 少？**
A：代表這組篩選條件下的盤已經抓完。可以放寬條件，或改抓其他地區。

**Q：開了「只抓新資料」，為什麼 run 回傳 0 筆？**
A：代表從上次用同一個狀態名稱執行到現在，沒有新的盤。這是正常結果，run 是成功、不收費。想重新拿全部資料，換一個 `stateKey` 或關掉 `onlyNew`。

### 免責聲明

本 Actor 只抓取香港置業網站上公開刊登的樓盤資料，不登入、不存取任何需要權限的內容。香港置業的免責聲明表明網站資料「按原樣」提供、只供參考，請自行核實資料是否正確。使用時請遵守香港相關法規，勿大量轉售原始資料。若網站擁有人要求停止收集，我們會停止提供本 Actor。作者不對任何因使用本工具造成的損害負責。

***

香港置業爬蟲 hkp.com.hk scraper Hong Kong Property 香港樓盤 放售樓盤 出租樓盤 租盤 實用呎價 減價盤 居屋 屋苑 香港地產代理 HK property listings real estate API 樓價 租金 物業數據

# Actor input Schema

## `dealType` (type: `string`):

抓買盤（放售）還是租盤（出租）。

## `regions` (type: `array`):

要抓哪幾區。留空＝全港。可填：港島 / 九龍 / 新界（也接受 Hong Kong Island、Kowloon、New Territories）。

## `bulkRegions` (type: `string`):

大量貼上用：一行一個地區，會和上面的欄位自動合併。

## `estateIds` (type: `array`):

只抓指定屋苑的盤，填香港置業的屋苑 ID，例如 E000004317（浪澄灣）。ID 可從任何一次輸出的 estate_id 欄位取得。留空＝不限屋苑。

## `bulkEstateIds` (type: `string`):

大量貼上用：一行一個屋苑 ID，會和上面的欄位自動合併。

## `bedrooms` (type: `array`):

只留指定房數的物業，可複選。留空＝不限。香港置業的篩選只支援開放式到 3 房（4 房以上無法篩選）。

## `schoolNet` (type: `integer`):

只留指定小學校網編號的物業，例如 41（九龍城）、62（元朗）。留空＝不限。

## `priceMin` (type: `integer`):

買盤＝售價、租盤＝月租，單位都是港元（不是萬）。例如買盤 5000000、租盤 15000。留空＝不限。

## `priceMax` (type: `integer`):

買盤＝售價、租盤＝月租，單位都是港元。留空＝不限。

## `netAreaMin` (type: `integer`):

實用面積下限（平方呎）。留空＝不限。

## `netAreaMax` (type: `integer`):

實用面積上限（平方呎）。留空＝不限。

## `sort` (type: `string`):

結果的排序方式。監控新盤請用「最新上架」。

## `language` (type: `string`):

地區、屋苑、大廈、樓層、座向名稱要用哪種語言回傳。欄位名稱一律是英文 snake_case。

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

本次最多輸出幾筆（所有地區合計）。預設 50、上限 500。

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

開啟後只回傳「先前以相同狀態名稱跑過的 run 沒回傳過」的盤；已看過的會略過、也不計費。第一次執行等同一般抓取並建立記憶。預設關閉。

## `stateKey` (type: `string`):

記憶「已回傳過哪些盤」的名稱。留空＝由買／租與篩選條件自動推導，同一份排程輸入會從上次中斷處繼續；若要為不同排程／整合各自保留記憶，請自訂名稱（多數 API 呼叫者會重複使用相同輸入）。僅限英數、底線、連字號，1–100 字。只在開啟「只抓新資料」時生效。

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

預設走 Apify residential proxy、香港出口。香港置業對 datacenter 出口回 403（實測 datacenter 3/3 失敗、residential 香港 6/6 成功），所以 residential 是這隻 actor 能運作的前提。JSON 回應每筆約 3KB，proxy 流量費可忽略。自備 proxy 或本機測試才改。

## Actor input object example

```json
{
  "dealType": "buy",
  "regions": [
    "九龍"
  ],
  "bulkRegions": "",
  "estateIds": [],
  "bulkEstateIds": "",
  "bedrooms": [],
  "sort": "latest",
  "language": "zh-hk",
  "maxItems": 50,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "HK"
  }
}
```

# 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 = {
    "dealType": "buy",
    "regions": [
        "九龍"
    ],
    "language": "zh-hk",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/hkp-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 = {
    "dealType": "buy",
    "regions": ["九龍"],
    "language": "zh-hk",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/hkp-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 '{
  "dealType": "buy",
  "regions": [
    "九龍"
  ],
  "language": "zh-hk",
  "maxItems": 50
}' |
apify call claude_code_reviewer/hkp-scraper --silent --output-dataset

```

## MCP server setup

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