{
  "openapi": "3.0.1",
  "info": {
    "title": "Thuviennhadat.vn Vietnam Real Estate Scraper: Sale and Rent",
    "description": "Scrape thuviennhadat.vn, Vietnam's property portal: sale and rent listings with price, area, rooms, legal status, address and photos, plus new-build projects and listing counts by province. Filter by price, area, bedrooms and direction. Export JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "wXYWNuWYizs01weU2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~thuviennhadat-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-thuviennhadat-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/recordsdata~thuviennhadat-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-thuviennhadat-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/recordsdata~thuviennhadat-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-thuviennhadat-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": {
          "recordTypes": {
            "title": "What to collect",
            "type": "array",
            "description": "Listings = one row per sale or rent ad. Projects = one row per new-build development. Market statistics = one row per search with counts. Default: Listings.",
            "items": {
              "type": "string",
              "enum": [
                "listings",
                "projects",
                "market-stats"
              ],
              "enumTitles": [
                "Listings (sale and rent ads)",
                "New-build projects",
                "Market statistics (listing counts)"
              ]
            },
            "default": [
              "listings"
            ]
          },
          "operation": {
            "title": "Sale or rent",
            "enum": [
              "sale",
              "rent",
              "both"
            ],
            "type": "string",
            "description": "Properties for sale, for rent, or both (both runs every search twice). Rows say which one in the operation field.",
            "default": "sale"
          },
          "provinces": {
            "title": "Provinces and cities",
            "type": "array",
            "description": "One search per province or city. Example: Ha Noi, Ho Chi Minh. Empty = all of Vietnam.",
            "items": {
              "type": "string",
              "enum": [
                "an-giang",
                "ba-ria-vung-tau",
                "bac-giang",
                "bac-kan",
                "bac-lieu",
                "bac-ninh",
                "ben-tre",
                "binh-dinh",
                "binh-duong",
                "binh-phuoc",
                "binh-thuan",
                "ca-mau",
                "can-tho",
                "cao-bang",
                "da-nang",
                "dak-lak",
                "dak-nong",
                "dien-bien",
                "dong-nai",
                "dong-thap",
                "gia-lai",
                "ha-giang",
                "ha-nam",
                "ha-noi",
                "ha-tinh",
                "hai-duong",
                "hai-phong",
                "hau-giang",
                "ho-chi-minh",
                "hoa-binh",
                "hung-yen",
                "khanh-hoa",
                "kien-giang",
                "kon-tum",
                "lai-chau",
                "lam-dong",
                "lang-son",
                "lao-cai",
                "long-an",
                "nam-dinh",
                "nghe-an",
                "ninh-binh",
                "ninh-thuan",
                "phu-tho",
                "phu-yen",
                "quang-binh",
                "quang-nam",
                "quang-ngai",
                "quang-ninh",
                "quang-tri",
                "soc-trang",
                "son-la",
                "tay-ninh",
                "thai-binh",
                "thai-nguyen",
                "thanh-hoa",
                "thua-thien-hue",
                "tien-giang",
                "tra-vinh",
                "tuyen-quang",
                "vinh-long",
                "vinh-phuc",
                "yen-bai"
              ],
              "enumTitles": [
                "An Giang",
                "Bà Rịa - Vũng Tàu",
                "Bắc Giang",
                "Bắc Kạn",
                "Bạc Liêu",
                "Bắc Ninh",
                "Bến Tre",
                "Bình Định",
                "Bình Dương",
                "Bình Phước",
                "Bình Thuận",
                "Cà Mau",
                "Cần Thơ",
                "Cao Bằng",
                "Đà Nẵng",
                "Đắk Lắk",
                "Đắk Nông",
                "Điện Biên",
                "Đồng Nai",
                "Đồng Tháp",
                "Gia Lai",
                "Hà Giang",
                "Hà Nam",
                "Hà Nội",
                "Hà Tĩnh",
                "Hải Dương",
                "Hải Phòng",
                "Hậu Giang",
                "Hồ Chí Minh",
                "Hòa Bình",
                "Hưng Yên",
                "Khánh Hòa",
                "Kiên Giang",
                "Kon Tum",
                "Lai Châu",
                "Lâm Đồng",
                "Lạng Sơn",
                "Lào Cai",
                "Long An",
                "Nam Định",
                "Nghệ An",
                "Ninh Bình",
                "Ninh Thuận",
                "Phú Thọ",
                "Phú Yên",
                "Quảng Bình",
                "Quảng Nam",
                "Quảng Ngãi",
                "Quảng Ninh",
                "Quảng Trị",
                "Sóc Trăng",
                "Sơn La",
                "Tây Ninh",
                "Thái Bình",
                "Thái Nguyên",
                "Thanh Hóa",
                "Thừa Thiên Huế",
                "Tiền Giang",
                "Trà Vinh",
                "Tuyên Quang",
                "Vĩnh Long",
                "Vĩnh Phúc",
                "Yên Bái"
              ]
            },
            "default": []
          },
          "locations": {
            "title": "Districts and wards (one province only)",
            "type": "array",
            "description": "District or ward names inside the ONE province chosen above. Examples: Cầu Giấy, Quận 1, Phường Dịch Vọng. An unknown or ambiguous name stops the run with a clear message.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Categories to search. Empty = all. Land is sale only; boarding rooms, offices and shops are rent only.",
            "items": {
              "type": "string",
              "enum": [
                "can-ho-chung-cu",
                "nha-tai-dinh-cu",
                "chung-cu-mini-can-ho-dich-vu",
                "nha-rieng",
                "nha-biet-thu-lien-ke",
                "nha-mat-pho",
                "nha-pho-thuong-mai",
                "shop-house",
                "condotel",
                "dat-o",
                "dat-nen-du-an",
                "kho-nha-xuong",
                "nha-tro-phong-tro",
                "van-phong",
                "cua-hang-ki-ot",
                "bat-dong-san-khac"
              ],
              "enumTitles": [
                "Apartment (Căn hộ chung cư)",
                "Resettlement house (Nhà tái định cư)",
                "Mini apartment / serviced apartment (Chung cư mini, căn hộ dịch vụ)",
                "House (Nhà riêng)",
                "Villa and townhouse (Nhà biệt thự, liền kề)",
                "Street-front house (Nhà mặt phố)",
                "Commercial townhouse (Nhà phố thương mại)",
                "Shophouse",
                "Condotel",
                "Residential land (Đất ở), sale only",
                "Project land plot (Đất nền dự án), sale only",
                "Warehouse and factory (Kho, nhà xưởng)",
                "Boarding room (Nhà trọ, phòng trọ), rent only",
                "Office (Văn phòng), rent only",
                "Shop and kiosk (Cửa hàng, ki ốt), rent only",
                "Other property (Bất động sản khác)"
              ]
            },
            "default": []
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free text matched against the listing text. Examples: mặt tiền, view hồ. Empty = none.",
            "default": ""
          },
          "minPrice": {
            "title": "Min price (million VND)",
            "minimum": 0,
            "type": "number",
            "description": "Lowest price in million VND (1000 = 1 billion). For rent it is the monthly rent. 0 = no limit.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max price (million VND)",
            "minimum": 0,
            "type": "number",
            "description": "Highest price in million VND (5000 = 5 billion). For rent it is the monthly rent. 0 = no limit.",
            "default": 0
          },
          "minArea": {
            "title": "Min area (m²)",
            "minimum": 0,
            "type": "number",
            "description": "Smallest living or plot area in whole square meters. 0 = no limit.",
            "default": 0
          },
          "maxArea": {
            "title": "Max area (m²)",
            "minimum": 0,
            "type": "number",
            "description": "Largest area in whole square meters. 0 = no limit.",
            "default": 0
          },
          "bedrooms": {
            "title": "Bedrooms",
            "type": "array",
            "description": "Bedroom counts to search (one search each). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5+"
              ],
              "enumTitles": [
                "1 bedroom",
                "2 bedrooms",
                "3 bedrooms",
                "4 bedrooms",
                "5 or more bedrooms"
              ]
            },
            "default": []
          },
          "houseDirection": {
            "title": "House direction",
            "type": "array",
            "description": "Direction the house or apartment faces (one search each). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "bac",
                "dong-bac",
                "dong",
                "tay-bac",
                "nam",
                "dong-nam",
                "tay",
                "tay-nam"
              ],
              "enumTitles": [
                "North (Bắc)",
                "North-east (Đông Bắc)",
                "East (Đông)",
                "North-west (Tây Bắc)",
                "South (Nam)",
                "South-east (Đông Nam)",
                "West (Tây)",
                "South-west (Tây Nam)"
              ]
            },
            "default": []
          },
          "balconyDirection": {
            "title": "Balcony direction",
            "type": "array",
            "description": "Direction the balcony faces (one search each). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "bac",
                "dong-bac",
                "dong",
                "tay-bac",
                "nam",
                "dong-nam",
                "tay",
                "tay-nam"
              ],
              "enumTitles": [
                "North (Bắc)",
                "North-east (Đông Bắc)",
                "East (Đông)",
                "North-west (Tây Bắc)",
                "South (Nam)",
                "South-east (Đông Nam)",
                "West (Tây)",
                "South-west (Tây Nam)"
              ]
            },
            "default": []
          },
          "brokerOnly": {
            "title": "Verified brokers only",
            "type": "boolean",
            "description": "Only listings posted by verified professional brokers.",
            "default": false
          },
          "postedWithinDays": {
            "title": "Posted within the last (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only listings posted in the last N days. Example: 7. 0 = any age.",
            "default": 0
          },
          "startUrls": {
            "title": "thuviennhadat.vn links",
            "type": "array",
            "description": "Pages to read: a listing, a project, a project list or a search page. Example: https://thuviennhadat.vn/ban-can-ho-chung-cu-quan-cau-giay. When set, the search filters above are not used.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingIds": {
            "title": "Listing IDs or URLs",
            "type": "array",
            "description": "The number after pst at the end of a listing URL. Example: 225837. Each is fetched directly with full detail.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Open every listing page (slower, more fields)",
            "type": "boolean",
            "description": "Adds full description, all photos, exact price, price per m², ward, legal status, furnishing, directions, dates and project name. Costs one request per listing. Off = faster and cheaper, search-card fields only.",
            "default": true
          },
          "includeContactDetails": {
            "title": "Broker name and profile link",
            "type": "boolean",
            "description": "Adds the public profile name and link of verified brokers. Private sellers are never named; phone numbers and emails are never returned.",
            "default": false
          },
          "includePriceBands": {
            "title": "Price bands in market statistics",
            "type": "boolean",
            "description": "Counts listings in each site price band (14 for sale, 9 for rent). Costs one extra request per band for every statistics row.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows to return",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum rows in total. Example: 100. Free plan: 10 rows (preview). Paid plans: up to 1,000,000."
          },
          "maxItemsPerSearch": {
            "title": "Max rows per search (0 = no limit)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops one big search (for example one province) from using the whole Max rows budget when several searches run.",
            "default": 0
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop after this many seconds and return what was gathered, so a very wide search never runs unbounded.",
            "default": 1800
          },
          "onlyNew": {
            "title": "Only new rows",
            "type": "boolean",
            "description": "Skip listings or projects this same search already returned. You are not charged for skipped rows. Max rows then counts new rows. Market statistics are always returned.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label to separate monitors with identical searches (for example one per client). Empty = use only the search filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset the seen list",
            "type": "boolean",
            "description": "Forget what earlier runs returned and start the monitor again.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}