{
  "openapi": "3.0.1",
  "info": {
    "title": "美聯物業爬蟲｜香港樓盤、成交紀錄、屋苑資料一鍵匯出（免 API）",
    "description": "免登入抓香港美聯物業公開資料：4.4 萬在售出租樓盤、190 萬筆歷史成交、1.8 萬個屋苑，含售價、月租、實用面積、實用呎價、房廳、小學校網與經緯度，輸出 JSON／CSV／Excel。香港房產市調、估價模型與代理庫存比較必備。",
    "version": "1.0",
    "x-build-id": "GQpaO4aMKqz7E2Njg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~midland-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-midland-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/claude_code_reviewer~midland-scraper/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-midland-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/claude_code_reviewer~midland-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-midland-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "🎯 模式",
            "enum": [
              "search",
              "transactions",
              "estates"
            ],
            "type": "string",
            "description": "要抓什麼？選一個模式，填下面對應欄位就好。",
            "default": "search"
          },
          "dealType": {
            "title": "🏠 買/租",
            "enum": [
              "buy",
              "rent"
            ],
            "type": "string",
            "description": "抓買盤（放售）還是租盤（出租）。屋苑目錄模式不受此影響。",
            "default": "buy"
          },
          "regions": {
            "title": "📍 地區",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "要抓哪幾區。留空＝三區全抓。可填：港島 / 九龍 / 新界（也接受 Hong Kong Island、Kowloon、New Territories）。",
            "items": {
              "type": "string"
            }
          },
          "bulkRegions": {
            "title": "📋 地區（一行一個）",
            "type": "string",
            "description": "大量貼上用：一行一個地區，會和上面的欄位自動合併。"
          },
          "bedrooms": {
            "title": "🛏 房數",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "只留剛好 N 房的物業。留空＝不限。"
          },
          "bathrooms": {
            "title": "🛁 廁數",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "只留剛好 N 個廁所的物業。留空＝不限。"
          },
          "schoolNet": {
            "title": "🎓 小學校網",
            "minimum": 1,
            "maximum": 999,
            "type": "integer",
            "description": "只留指定小學校網編號的物業，例如 41（九龍城）、62（元朗）。留空＝不限。"
          },
          "sort": {
            "title": "↕️ 排序",
            "enum": [
              "default",
              "latest",
              "price",
              "price_desc",
              "net_area",
              "net_area_desc",
              "net_ft_price",
              "net_ft_price_desc"
            ],
            "type": "string",
            "description": "樓盤列表的排序方式。",
            "default": "default"
          },
          "language": {
            "title": "🌐 資料語言",
            "enum": [
              "zh-hk",
              "en"
            ],
            "type": "string",
            "description": "地區、屋苑、大廈名稱要用哪種語言回傳。欄位名稱一律是英文 snake_case。",
            "default": "zh-hk"
          },
          "maxItems": {
            "title": "🔢 最多抓幾筆",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "本次最多輸出幾筆（所有地區合計）。預設 50、上限 500。",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy（預設開啟 Apify residential proxy）",
            "type": "object",
            "description": "預設走 Apify residential proxy。美聯對 datacenter 出口回 403，連取存取權杖的頁面都拿不到（實測：直連 200、datacenter 403、residential 200），所以 residential 是這隻 actor 能運作的前提。JSON 回應每筆僅約 4KB，proxy 流量費可忽略。自備 proxy 或本機測試才關掉。",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}