{
  "openapi": "3.0.1",
  "info": {
    "title": "Midland Realty Scraper – HK Listings & Transactions (No API)",
    "description": "Scrape Midland Realty Hong Kong without an API: 44K for-sale and for-rent listings, 1.8M historical transactions and 18K estates. Price, rent, saleable area, price per sq ft, bedrooms, school net and coordinates as JSON/CSV/Excel — for HK property research and agency inventory comparison.",
    "version": "1.0",
    "x-build-id": "g6JibpTQKA43kxnkQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~midland-scraper-en/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-midland-scraper-en",
        "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-en/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-midland-scraper-en",
        "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-en/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-midland-scraper-en",
        "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": "🎯 Mode",
            "enum": [
              "search",
              "transactions",
              "estates"
            ],
            "type": "string",
            "description": "What to scrape. Pick one mode and fill in the matching fields below.",
            "default": "search"
          },
          "dealType": {
            "title": "🏠 Sale or rent",
            "enum": [
              "buy",
              "rent"
            ],
            "type": "string",
            "description": "Scrape for-sale or for-rent listings. Ignored in Estates mode.",
            "default": "buy"
          },
          "regions": {
            "title": "📍 Regions",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Which regions to scrape. Leave empty to cover all three. Accepts Hong Kong Island, Kowloon, New Territories (Chinese names also work).",
            "items": {
              "type": "string"
            }
          },
          "bulkRegions": {
            "title": "📋 Regions (one per line)",
            "type": "string",
            "description": "Paste many at once: one region per line. Merged with the field above."
          },
          "bedrooms": {
            "title": "🛏 Bedrooms",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Keep only properties with exactly N bedrooms. Leave empty for no filter."
          },
          "bathrooms": {
            "title": "🛁 Bathrooms",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Keep only properties with exactly N bathrooms. Leave empty for no filter."
          },
          "schoolNet": {
            "title": "🎓 Primary school net",
            "minimum": 1,
            "maximum": 999,
            "type": "integer",
            "description": "Keep only properties in this primary school net, e.g. 41 (Kowloon City) or 62 (Yuen Long). Leave empty for no filter."
          },
          "sort": {
            "title": "↕️ Sort order",
            "enum": [
              "default",
              "latest",
              "price",
              "price_desc",
              "net_area",
              "net_area_desc",
              "net_ft_price",
              "net_ft_price_desc"
            ],
            "type": "string",
            "description": "How to order the listings.",
            "default": "default"
          },
          "language": {
            "title": "🌐 Data language",
            "enum": [
              "zh-hk",
              "en"
            ],
            "type": "string",
            "description": "Language for region, estate and building names. Field names are always English snake_case.",
            "default": "en"
          },
          "maxItems": {
            "title": "🔢 Max rows",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum rows to output for this run, across all regions combined. Default 50, max 500.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy (Apify residential proxy on by default)",
            "type": "object",
            "description": "Runs through the Apify residential proxy by default. Midland returns 403 to datacenter egress — even the page that issues the access token is blocked — so residential is a hard requirement for this Actor to work at all (measured: direct 200, datacenter 403, residential 200). JSON responses are about 4KB per row, so proxy traffic cost is negligible. Turn it off only for your own proxy or local testing.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}