{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayut KSA Property Scraper",
    "description": "Extract property listings from Bayut.sa with optional full listing details and agent information.",
    "version": "1.0",
    "x-build-id": "sVryDrBuaJNISX9Yc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigelbytes~bayut-sa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigelbytes-bayut-sa-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/rigelbytes~bayut-sa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rigelbytes-bayut-sa-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/rigelbytes~bayut-sa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rigelbytes-bayut-sa-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": [
          "purpose",
          "location",
          "category",
          "subCategory"
        ],
        "properties": {
          "purpose": {
            "title": "Purpose",
            "enum": [
              "for-sale",
              "for-rent"
            ],
            "type": "string",
            "description": "Property listing purpose. Example: for-sale.",
            "default": "for-sale"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, neighbourhood, or hierarchical path, e.g. Riyadh, Al Narjis (with parentLocation), or riyadh/north-riyadh/al-narjis.",
            "default": "Riyadh"
          },
          "parentLocation": {
            "title": "Parent city",
            "enum": [
              "",
              "Riyadh",
              "Jeddah",
              "Dammam",
              "Makkah",
              "Madinah",
              "Al Khobar",
              "Dhahran",
              "Al Ahsa",
              "Taif",
              "Abha",
              "Tabuk",
              "Hail",
              "Jazan",
              "Najran",
              "Buraidah",
              "Yanbu",
              "Jubail",
              "Khamis Mushait",
              "Al Qassim"
            ],
            "type": "string",
            "description": "Only for sub-areas. Select the parent city when location is a neighbourhood (e.g. Riyadh for Al Narjis). Leave as None for top-level cities or full paths.",
            "default": ""
          },
          "category": {
            "title": "Category",
            "enum": [
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Property category. Example: residential.",
            "default": "residential"
          },
          "subCategory": {
            "title": "Property Type",
            "enum": [
              "apartments",
              "villas",
              "townhouses",
              "penthouse",
              "villa-compound",
              "hotel-apartments",
              "residential-plots",
              "residential-floors",
              "residential-building",
              "offices",
              "warehouses",
              "commercial-villas",
              "commercial-plots",
              "commercial-buildings",
              "industrial-land",
              "showrooms",
              "shops",
              "labour-camps",
              "bulk-units",
              "commercial-floors",
              "factories",
              "mixed-use-land",
              "commerical-properties"
            ],
            "type": "string",
            "description": "Specific property type slug. Example: apartments.",
            "default": "apartments"
          },
          "status": {
            "title": "Completion Status",
            "enum": [
              "all",
              "ready",
              "off-plan"
            ],
            "type": "string",
            "description": "Property completion status. Example: all.",
            "default": "all"
          },
          "rentFrequency": {
            "title": "Rent Frequency",
            "enum": [
              "yearly",
              "monthly",
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "Rent payment frequency (for rent listings only). Example: yearly."
          },
          "furnishingStatus": {
            "title": "Furnishing Status",
            "enum": [
              "all",
              "furnished",
              "unfurnished"
            ],
            "type": "string",
            "description": "Property furnishing status. Example: furnished."
          },
          "roomsMin": {
            "title": "Minimum Bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bedrooms. Example: 2."
          },
          "roomsMax": {
            "title": "Maximum Bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of bedrooms. Example: 4."
          },
          "bathsMin": {
            "title": "Minimum Bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bathrooms. Example: 1."
          },
          "bathsMax": {
            "title": "Maximum Bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of bathrooms. Example: 3."
          },
          "areaMin": {
            "title": "Minimum Area (sqft)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum property area in square feet. Example: 800."
          },
          "areaMax": {
            "title": "Maximum Area (sqft)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum property area in square feet. Example: 2500."
          },
          "priceMin": {
            "title": "Minimum Price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum property price in Saudi Riyal. Example: 500000."
          },
          "priceMax": {
            "title": "Maximum Price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum property price in Saudi Riyal. Example: 2000000."
          },
          "superHot": {
            "title": "Superhot Listings",
            "type": "boolean",
            "description": "Restrict results to superhot listings (for-sale with all completion statuses).",
            "default": false
          },
          "scrapePropertyDetails": {
            "title": "Scrape property details",
            "type": "boolean",
            "description": "When enabled, fetch the full listing detail payload for each property (charged as a separate property-details event). Disabled by default.",
            "default": false
          },
          "scrapeAgentInformation": {
            "title": "Scrape agent information",
            "type": "boolean",
            "description": "When enabled, fetch the agent profile for each property (charged as a separate agent-information event). Disabled by default.",
            "default": false
          },
          "detailsConcurrency": {
            "title": "Details concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many property-detail and agent requests to run in parallel. Example: 5.",
            "default": 5
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of search pages to scrape. Example: 1. Leave empty for all pages.",
            "default": 1
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum total listings to collect (0 = unlimited). Example: 50.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy groups used for search and rotated per property-detail / agent request.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "SA"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}