{
  "openapi": "3.0.1",
  "info": {
    "title": "Realestate.com.kh Scraper: Cambodia Property Listings",
    "description": "Scrape realestate.com.kh, the Cambodia property portal: sale and rent listings with USD prices, rooms, areas, GPS and photos, plus new developments, boreys, agencies, developers and area market stats. Export CSV, Excel, JSON, XML.",
    "version": "0.1",
    "x-build-id": "r1dc7ct6Ii02BwKRB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~realestate-kh-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-realestate-kh-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~realestate-kh-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-realestate-kh-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~realestate-kh-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-realestate-kh-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": {
          "section": {
            "title": "Section",
            "enum": [
              "sale",
              "rent",
              "new-developments",
              "boreys",
              "agencies",
              "developers",
              "location-profiles"
            ],
            "type": "string",
            "description": "What to collect. Sale and rent return property rows, new developments and boreys return project rows, agencies and developers return company rows, location profiles return market statistics per area. Ignored when you paste URLs in Start URLs.",
            "default": "sale"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Places to cover, one per line, as they appear in realestate.com.kh URLs: \"phnom-penh\", \"siem-reap\", \"sihanoukville\", \"kep\", \"kampot\" or a district such as \"bkk-1\" or \"sen-sok\". Names with spaces and capitals are fine. Leave empty for the whole country. For location profiles, the profiles whose path contains the place are returned.",
            "items": {
              "type": "string"
            }
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Only for sale and rent. One search per type. Leave empty for the site default (all homes). Commercial covers every commercial type, the other commercial types narrow it.",
            "items": {
              "type": "string",
              "enum": [
                "apartment",
                "house",
                "villa",
                "twin-villa",
                "flat-house",
                "penthouse",
                "serviced-apartment",
                "shophouse",
                "land",
                "commercial",
                "offices",
                "retail",
                "warehouse",
                "building",
                "hotel",
                "business",
                "agricultural-farm-land"
              ],
              "enumTitles": [
                "Apartment and condo",
                "House",
                "Villa",
                "Twin villa",
                "Flat house",
                "Penthouse",
                "Serviced apartment",
                "Shophouse",
                "Land",
                "Commercial (all types)",
                "Offices",
                "Retail",
                "Warehouse and factory",
                "Building",
                "Hotel",
                "Business for sale",
                "Agricultural and farm land"
              ]
            },
            "default": []
          },
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "search",
              "catalog"
            ],
            "type": "string",
            "description": "Search reads the pages of the site search with every filter below (the site serves up to 10,000 results per query; larger searches are split by price automatically). Catalog reads the site map newest first and opens every listing page, which has no filters except the place; use it to sweep everything or to find the newest listings.",
            "default": "search"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date-desc",
              "date-asc",
              "price-asc",
              "price-desc",
              "floor-area-asc",
              "floor-area-desc",
              "price-sqm-asc",
              "price-sqm-desc"
            ],
            "type": "string",
            "description": "Order of the results. Newest first is the default so that Max items returns the most recent listings and the only-new mode can stop early.",
            "default": "date-desc"
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in US dollars. For rent this is the monthly rent. 0 means no limit.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in US dollars. For rent this is the monthly rent. 0 means no limit.",
            "default": 0
          },
          "minBedrooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties with at least this many bedrooms. 0 means no limit.",
            "default": 0
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties with at least this many bathrooms. 0 means no limit.",
            "default": 0
          },
          "minArea": {
            "title": "Minimum floor area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties with at least this built area in square meters. 0 means no limit.",
            "default": 0
          },
          "maxArea": {
            "title": "Maximum floor area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties with at most this built area in square meters. 0 means no limit.",
            "default": 0
          },
          "minLandArea": {
            "title": "Minimum land area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties on at least this much land in square meters. 0 means no limit.",
            "default": 0
          },
          "minYearBuilt": {
            "title": "Built in or after (year)",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties built in this year or later, for example 2020. 0 means no limit.",
            "default": 0
          },
          "minParking": {
            "title": "Minimum parking spaces",
            "minimum": 0,
            "type": "integer",
            "description": "Only properties with at least this many parking spaces. 0 means no limit.",
            "default": 0
          },
          "features": {
            "title": "Required features",
            "type": "array",
            "description": "Only properties that have all the selected features.",
            "items": {
              "type": "string",
              "enum": [
                "swimmingpool",
                "garden",
                "gym",
                "lift",
                "fullyfurnished",
                "airconditioning",
                "servicedproperty",
                "balcony"
              ],
              "enumTitles": [
                "Swimming pool",
                "Garden",
                "Gym or fitness center",
                "Lift or elevator",
                "Fully furnished",
                "Air conditioning",
                "Serviced property",
                "Balcony"
              ]
            },
            "default": []
          },
          "dealTag": {
            "title": "Deal tag",
            "enum": [
              "any",
              "price_negotiable",
              "urgent_sale",
              "price_reduced",
              "luxury_property",
              "ready_to_move_in"
            ],
            "type": "string",
            "description": "Only listings the advertiser marked with this tag.",
            "default": "any"
          },
          "projectHighlight": {
            "title": "Project highlight",
            "enum": [
              "any",
              "guaranteed_leaseback",
              "high_return_yield",
              "brand_developer",
              "high_appreciation_value",
              "developer_financing",
              "bank_loans_available",
              "project_complete",
              "promotional_discount"
            ],
            "type": "string",
            "description": "Only for new developments and boreys: projects that carry this highlight.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "agency",
              "private"
            ],
            "type": "string",
            "description": "Agency listings only, private sellers only, or both. Private seller rows never contain names or phone numbers.",
            "default": "any"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free text matched by the site search, for example \"riverside\" or \"pool\". Leave empty for no keyword.",
            "default": ""
          },
          "publishedWithinDays": {
            "title": "Published within days",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings published in the last N days. With newest first sorting the scan stops as soon as older pages begin. 0 means no limit.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "km",
              "zh-hans",
              "fr",
              "th",
              "ja",
              "ru"
            ],
            "type": "string",
            "description": "Language of titles, descriptions and labels. Prices stay in US dollars and ids and URLs do not change.",
            "default": "en"
          },
          "scrapeDetails": {
            "title": "Open each listing page",
            "type": "boolean",
            "description": "Open the page of every listing or project for the full description, all photos, amenities, floor plans, unit mix, payment plans and market comparison. Switch off for the cheaper search card data only.",
            "default": true
          },
          "includeAgencyProfiles": {
            "title": "Add agency and developer profiles",
            "type": "boolean",
            "description": "Also output one profile row for each agency or developer behind the listings (counted in Max items).",
            "default": false
          },
          "includeContactDetails": {
            "title": "Include business contact details",
            "type": "boolean",
            "description": "Add the public phone number and e-mail of agencies and developers. Private sellers are never included and phone numbers typed into listing texts are removed unless this is on.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw site fields",
            "type": "boolean",
            "description": "Add a raw column with the site fields that have no column of their own (tags, flags, badges).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new results (monitor mode)",
            "type": "boolean",
            "description": "Skip listings delivered by an earlier run of the same search and charge only for new ones. The list of seen ids is kept in a named store of your account.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor label",
            "type": "string",
            "description": "Optional label to keep separate monitors for the same filters, for example \"phnom-penh-weekly\".",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget what earlier runs delivered for this search before starting.",
            "default": false
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste realestate.com.kh pages instead of using the section and locations: search pages (/buy/..., /rent/..., /new-developments/search/, /boreys/search/, with their filters), listing and project pages, agency or developer pages (/offices/...) and location profile pages (/phnom-penh/).",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rows to deliver in total (listings, projects, agencies, developers and locations). 0 means no limit; the Apify max charge per run still applies. Free plan runs are limited to 10 rows.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The site answers plain requests from Apify servers, and the actor switches to the Apify datacenter proxy by itself if it meets a browser check. Switch it on only to force a proxy from the first request.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}