# Squarefoot 尋屋爬蟲｜香港放售出租樓盤、實用呎價匯出（免 API） (`claude_code_reviewer/squarefoot-scraper`) Actor

免登入抓香港 Squarefoot 尋屋（5平方）公開樓盤：放售與出租盤，含售價、月租、實用面積、實用呎價、房廁數、座向、每月供款與全部相片，刊登時間已轉成絕對時間，輸出 JSON／CSV／Excel。港島、九龍、新界、離島四區皆可抓，香港房產市調與代理庫存比較適用。

- **URL**: https://apify.com/claude\_code\_reviewer/squarefoot-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:**
- **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?

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

## 香港 Squarefoot 尋屋爬蟲（5平方）

抓香港 **Squarefoot 尋屋**（squarefoot.com.hk，中文站名「5平方」）的公開樓盤：**放售**與**出租**盤。不用登入、不用申請 API key、不開瀏覽器。

Squarefoot 屬 iProperty／REA 集團，是香港三語物業入口之一。Apify Store 上目前沒有其他人覆蓋這個站。

### 輸出欄位

| 欄位 | 型別 | 說明 |
|---|---|---|
| `property_id` | string | Squarefoot 盤源編號 |
| `deal_type` | string | `buy`（放售）或 `rent`（出租）|
| `district` | string|null | 地區，例如 九龍塘 / Tai Po |
| `estate` | string|null | 屋苑或大廈，例如 康樂園 |
| `unit_description` | string|null | 單位描述，例如 獨立屋 / Whole Block |
| `price_hkd` | number|null | 售價或月租（港元，已換算）|
| `price_text` | string|null | 價格原文，例如 `售 $410 萬元`／`Sell HKD$19.6 Millions` |
| `unit_price_per_sqft` | number|null | 實用呎價（租盤為每呎月租）|
| `saleable_area_sqft` | number|null | 實用面積（平方呎）|
| `bedroom` | number|null | 房數（開放式單位為 `0`）|
| `bathroom` | number|null | 廁所數 |
| `is_studio` | boolean | 是否為開放式單位 |
| `orientation` | string|null | 座向，例如 向東北 / South east |
| `monthly_repayment_hkd` | number|null | 每月供款試算（僅買盤）|
| `agent_remark` | string|null | 代理描述，例如 全新靚裝修 |
| `thumbnail_url` | string|null | 封面圖 |
| `photo_urls` | string\[]|null | 全部相片網址 |
| `listing_url` | string|null | 盤源頁網址 |
| `posted_text` | string|null | 刊登時間原文，例如 `11 小時前 刊登` |
| `posted_at` | string|null | 刊登時間（**已換算成 ISO 8601 絕對時間**）|
| `scraped_at` | string | 抓取時間（ISO 8601）|

> 欄位名一律英文 snake\_case；**缺值一律 `null`，不會省略欄位**。

### 輸入

| 欄位 | 型別 | 預設 | 說明 |
|---|---|---|---|
| `mode` | enum | `search` | 目前只有樓盤列表 |
| `dealType` | enum | `buy` | `buy` 放售、`rent` 出租 |
| `regions` | string\[] | 全部 | 港島／九龍／新界／**離島**，留空＝四區全抓 |
| `bulkRegions` | string | — | 一行一個，與上面自動合併 |
| `language` | enum | `zh-hk` | `zh-hk` 或 `en` |
| `maxItems` | integer | 50 | 本次最多幾筆（每頁 10 筆），上限 500 |
| `proxyConfiguration` | object | 香港 residential | **請保持預設**，見注意事項 |

### 輸入範例

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

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

**2. 港島出租盤**

```json
{ "mode": "search", "dealType": "rent", "regions": ["港島"], "maxItems": 50 }
```

**3. 離島放售盤，英文輸出**

```json
{ "mode": "search", "dealType": "buy", "regions": ["離島"], "language": "en", "maxItems": 50 }
```

**4. 全港放售盤（四區合抓）**

```json
{ "mode": "search", "dealType": "buy", "maxItems": 500 }
```

**5. 大量貼上地區**

```json
{ "mode": "search", "dealType": "buy", "bulkRegions": "港島\n九龍\n離島", "maxItems": 200 }
```

### 注意事項

- **請保持 proxy 預設（香港 residential）。** Squarefoot 用 Cloudflare 擋非住宅出口，而且**住宅代理還必須指定香港** —— 實測未指定國家時即使走 residential 也一律 403。關掉 proxy、改 datacenter、或不指定香港，都會直接抓到 0 筆。頁面有 gzip 壓縮，每筆線路流量僅約 7KB，成本可忽略。
- **Squarefoot 把香港分成四區，含「離島」** —— 這跟中原／美聯的三區、利嘉閣的「新界東／新界西」都不同。跨代理比對時要注意分區定義不一致。
- **可用的篩選只有地區。** 站方列表頁沒有價格、面積或關鍵字的查詢參數，本 Actor 因此不假裝支援；要按這些條件過濾，請拿到資料後自行篩選。
- `maxItems` 是**所有地區合計**的上限，不是每區。每頁固定 10 筆。
- **刊登時間已換算成絕對時間。** 站方只給「11 小時前」這種相對時間，本 Actor 轉成 ISO 8601 寫進 `posted_at`，原文保留在 `posted_text`。
- 開放式單位的 `bedroom` 是 `0`（不是 `null`），並以 `is_studio: true` 標示。
- 價格已換算：`售 $410 萬元` → `4100000`、`Sell HKD$19.6 Millions` → `19600000`。原文保留在 `price_text`。
- 抓取期間若有新盤上架，分頁會位移而出現重複；本 Actor 全 run 去重，同一筆只輸出並計費一次。
- 只抓公開資料，不登入、不繞過任何驗證。

### 計費

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

### FAQ

**Q：可以只抓某個屋苑或價格範圍嗎？**
A：站方列表頁沒有這些查詢參數。做法是抓該區後依 `estate`、`price_hkd` 欄位自行過濾。

**Q：`price_hkd` 對租盤是什麼？**
A：月租金。`unit_price_per_sqft` 則是每呎月租（數字會小很多，例如 64.9）。

**Q：為什麼一定要香港的住宅代理？**
A：Cloudflare 對非住宅出口一律 403，而且只認香港住宅 IP。這是站方的設定，不是本 Actor 的限制。好消息是頁面有壓縮，每筆線路流量約 7KB，成本極低。

**Q：可以跟中原、美聯、利嘉閣的資料合併比較嗎？**
A：可以。都輸出 snake\_case、實用面積與實用呎價，適合做代理間的庫存與定價比較。**注意四家的分區定義都不一樣**（Squarefoot 有離島、利嘉閣分新界東西、中原美聯是三區），建議用屋苑名做模糊比對而不是靠分區欄位。

**Q：抓到的筆數比 `maxItems` 少？**
A：代表該區的資料已抓完。可改抓其他區或放寬條件。

### 免責聲明

本 Actor 僅用於個人研究、學術分析、市場調查、房產趨勢研究等合法用途。使用時請遵守 Squarefoot（squarefoot.com.hk）服務條款及香港相關法規。請勿大量爬取、勿商業轉售原始資料。作者不對任何因使用本工具造成的損害承擔責任。

***

香港樓盤爬蟲 Squarefoot 爬蟲 5平方 尋屋 香港房產資料 HK property data 放售樓盤 出租樓盤 實用呎價 屋苑資料 香港地產 property listings Hong Kong real estate 樓盤匯出 物業數據 離島樓盤

***

### 📚 延伸教學與工具

這隻 actor 背後的實戰教學與免費工具，都在 **[AI Social API](https://aisocialapi.com/zh-hant/?utm_source=apify\&utm_medium=readme\&utm_campaign=squarefoot-scraper)**：

- 📊 原創資料：[站台涵蓋表：模式、欄位與定價](https://aisocialapi.com/zh-hant/coverage/?utm_source=apify\&utm_medium=readme\&utm_campaign=squarefoot-scraper) — 40 個站台各有哪些模式、實際回傳哪些欄位、每筆多少錢，全部從 actor 自己的 schema 生成
- 🛠 免費工具：[香港樓價查詢](https://aisocialapi.com/zh-hant/tools/hk-property/?utm_source=apify\&utm_medium=readme\&utm_campaign=squarefoot-scraper) · [Apify 成本試算](https://aisocialapi.com/zh-hant/tools/apify-cost/?utm_source=apify\&utm_medium=readme\&utm_campaign=squarefoot-scraper)
- 🤝 不想自己跑？[我幫你每天跑](https://aisocialapi.com/zh-hant/monitor/?utm_source=apify\&utm_medium=readme\&utm_campaign=squarefoot-scraper)——排程好每天送進你的 Google Sheet 或 Slack，每月 US$299 起。

由實際經營 40+ 隻上架 actor 的人維護。

# Actor input Schema

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

目前只有樓盤列表一種模式。

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

抓放售盤還是出租盤。

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

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

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

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

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

樓盤、地區與屋苑名稱要用哪種語言回傳。欄位名稱一律英文 snake\_case。

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

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

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

預設走 **香港** Apify residential proxy。Squarefoot 用 Cloudflare 擋非住宅出口，而且**住宅代理還必須指定香港**——實測未指定國家時即使走 residential 也一律 403，指定 HK 才拿得到資料。所以這是能不能跑的前提而非可選項。頁面有 gzip 壓縮，每筆線路流量僅約 7KB，成本可忽略。自備 proxy 或本機測試才關掉。

## Actor input object example

```json
{
  "mode": "search",
  "dealType": "buy",
  "regions": [
    "九龍"
  ],
  "language": "zh-hk",
  "maxItems": 50,
  "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 = {
    "mode": "search",
    "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/squarefoot-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": "search",
    "dealType": "buy",
    "regions": ["九龍"],
    "language": "zh-hk",
    "maxItems": 50,
}

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

```

## MCP server setup

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