{
  "openapi": "3.0.1",
  "info": {
    "title": "Homedy Real Estate Scraper",
    "description": "Scrape homedy.com - a leading Vietnam real estate marketplace. Browse by category (apartment, house, land, office, ...) and province, or fetch full listing detail by URL. Prices, area, description, images.",
    "version": "1.0",
    "x-build-id": "ExbZkTmnPJjTfZlOl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~homedy-real-estate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-homedy-real-estate-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/crawlerbros~homedy-real-estate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-homedy-real-estate-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/crawlerbros~homedy-real-estate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-homedy-real-estate-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byUrl",
              "project"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "category": {
            "title": "Category (mode=search)",
            "enum": [
              "ban-nha-dat",
              "cho-thue-nha-dat",
              "ban-can-ho-chung-cu",
              "cho-thue-can-ho-chung-cu",
              "ban-nha-rieng",
              "cho-thue-nha-rieng",
              "ban-biet-thu",
              "ban-dat-nen-du-an",
              "ban-dat",
              "ban-van-phong",
              "cho-thue-van-phong"
            ],
            "type": "string",
            "description": "Property type + transaction type.",
            "default": "ban-nha-dat"
          },
          "province": {
            "title": "Province / city (mode=search)",
            "enum": [
              "",
              "ha-noi",
              "tp-ho-chi-minh",
              "da-nang",
              "hai-phong",
              "can-tho",
              "binh-duong",
              "dong-nai",
              "khanh-hoa",
              "quang-ninh",
              "bac-ninh",
              "long-an",
              "ba-ria-vung-tau",
              "lam-dong",
              "thanh-hoa",
              "nghe-an"
            ],
            "type": "string",
            "description": "Restrict to one province/city. Leave blank for all of Vietnam. Use `Custom province slug` to target a province not in this curated list.",
            "default": "ha-noi"
          },
          "customProvinceSlug": {
            "title": "Custom province slug (mode=search, overrides Province)",
            "type": "string",
            "description": "URL slug of any Vietnamese province not in the dropdown, e.g. `thua-thien-hue`, `binh-thuan`, `an-giang`. Takes priority over `province` when set."
          },
          "districtSlug": {
            "title": "District / ward slug (mode=search, requires Province)",
            "type": "string",
            "description": "URL slug of a district/ward within the chosen province to narrow results further, e.g. `quan-ba-dinh`, `quan-1`, `thanh-pho-thu-duc`, `quan-cau-giay`. Has no effect if `province`/`customProvinceSlug` is not set (homedy.com has no district-only browse URL)."
          },
          "listingUrls": {
            "title": "Listing URLs (mode=byUrl)",
            "type": "array",
            "description": "Full homedy.com listing detail URLs (must end in `-es<id>`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "projectUrls": {
            "title": "Project URLs (mode=project)",
            "type": "array",
            "description": "Full homedy.com project (dự án) URLs (must end in `-pj<id>`), e.g. `https://homedy.com/astral-city-pj76427740`. Returns the project's own overview (developer, land area, unit count, sale status) rather than a single unit's listing.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword search (mode=search)",
            "type": "string",
            "description": "Free-text term submitted to homedy.com's own search box (e.g. `vinhomes`, `chung cư`, `biệt thự`). Re-ranks/biases browse results toward listings whose title or description match the term — a relevance boost like the site's own search, not a strict substring filter, so some results may still not literally contain the term."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "",
              "priceAsc",
              "priceDesc",
              "areaAsc",
              "areaDesc"
            ],
            "type": "string",
            "description": "Client-side sort applied to collected results (homedy.com's own sort UI is JavaScript-only and not reachable via URL, so this actor sorts the fetched page results itself).",
            "default": ""
          },
          "minPriceBillionVnd": {
            "title": "Min price (billion VND)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Drop listings cheaper than this, in billion VND (tỷ). E.g. 2 = 2,000,000,000 VND. Listings with no parseable price (e.g. \"Thỏa thuận\"/negotiable) always pass."
          },
          "maxPriceBillionVnd": {
            "title": "Max price (billion VND)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Drop listings more expensive than this, in billion VND (tỷ)."
          },
          "minAreaM2": {
            "title": "Min area (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Drop listings smaller than this area in square meters."
          },
          "maxAreaM2": {
            "title": "Max area (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Drop listings larger than this area in square meters."
          },
          "enrichDetail": {
            "title": "Fetch full listing detail",
            "type": "boolean",
            "description": "When on, each listing is enriched with a detail-page fetch adding the full description, district, and complete image gallery. When off (default), only fields visible on the browse page are emitted and the run is much faster.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "homedy.com is reachable directly from Apify's datacenter IPs in testing. The actor tries a direct connection first and only engages this proxy on a 403/429 — leave the default (Apify Proxy, automatic) unless your runs are consistently blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}