{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayut Scraper | UAE Saudi Egypt Bahrain Qatar",
    "description": "Scrape Bayut UAE, Saudi Arabia, Egypt, Bahrain & Qatar listings for sale or rent. Extract prices, beds, agency & photos. Bayut API alternative.",
    "version": "0.6",
    "x-build-id": "4KdeAPea86FwcFZag"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~bayut-uae-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-bayut-uae-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/lentic_clockss~bayut-uae-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-bayut-uae-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/lentic_clockss~bayut-uae-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-bayut-uae-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Bayut search (SRP) or listing detail (LDP) URLs for any supported host (bayut.com / .sa / .eg / .bh / .qa). Search URLs override market/channel/location when provided.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "market": {
            "title": "Market",
            "enum": [
              "AE",
              "SA",
              "EG",
              "BH",
              "QA",
              "all"
            ],
            "type": "string",
            "description": "Single market code. Use markets=[] or market=all for all active countries. JO/OM/KW are not supported yet.",
            "default": "AE"
          },
          "markets": {
            "title": "Markets (multi)",
            "type": "array",
            "description": "Optional list of market codes. Overrides market when non-empty. Include \"all\" to expand to AE+SA+EG+BH+QA.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channel": {
            "title": "Channel",
            "enum": [
              "BUY",
              "RENT"
            ],
            "type": "string",
            "description": "BUY (for-sale) or RENT (to-rent). Ignored when startUrls include search URLs.",
            "default": "BUY"
          },
          "location": {
            "title": "Location slug",
            "type": "string",
            "description": "Bayut location path slug. Leave empty to use each market default (dubai / riyadh / cairo / bahrain / qatar). If set to dubai on a non-AE market, the market default is used instead.",
            "default": "dubai"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "property",
              "apartments",
              "villas",
              "townhouses",
              "penthouse",
              "hotel-apartments",
              "villa-compound",
              "residential-plots",
              "residential-lands",
              "residential-floor",
              "residential-building",
              "chalets",
              "farms",
              "office-spaces",
              "offices",
              "shops",
              "warehouses",
              "showrooms",
              "industrial-land",
              "commercial-plots",
              "commercial-villas",
              "commercial-floors",
              "buildings",
              "factories",
              "labour-camps"
            ],
            "type": "string",
            "description": "Category slug in the URL path. property / properties / all = market all-types slug.",
            "default": "apartments"
          },
          "propertyTypes": {
            "title": "Property types (multi)",
            "type": "array",
            "description": "Optional list of category slugs. Overrides propertyType when non-empty. Fair-split maxItems across URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "expandPrimaryCategories": {
            "title": "Expand primary categories",
            "type": "boolean",
            "description": "When true and propertyType is all/property, expand to primary slugs (apartments, villas, shops, …) instead of a single all-types SRP.",
            "default": false
          },
          "maxItems": {
            "title": "Max listings (max 2,000; free users capped at 1,000/run)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum listing records to emit (1–2,000; fair-split across markets × types when building URLs). Free Apify plan users: capped at 1,000 per run and limited to 10 total runs of this Actor (Actor developer policy).",
            "default": 1
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum SRP pages to crawl per search URL (≈24 listings per page).",
            "default": 1
          },
          "scrapeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "When true, open each listing LDP and merge window.state.property.data.",
            "default": false
          },
          "requestDelayMillis": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Pause before the first navigation of a page fetch (ms).",
            "default": 800
          },
          "maxMarketConcurrency": {
            "title": "Max market concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many country browser sessions may run in parallel (1–5). Higher uses more memory/proxy.",
            "default": 1
          },
          "strictQuality": {
            "title": "Strict quality gate",
            "type": "boolean",
            "description": "Fail the run if Dataset rows miss required fields (url/source/market/channel/scrapedAt) or have invalid URLs.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify RESIDENTIAL recommended when the worker does not supply PROXY_URL. Leave apifyProxyCountry empty so each market uses a matching country (AE/SA/EG/BH/QA). Ignored when Actor env WORKER_PROVIDES_PROXY=1.",
            "default": {
              "useApifyProxy": true
            }
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override worker origin for this run. Default: Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}