{
  "openapi": "3.0.1",
  "info": {
    "title": "Saudi Real Estate — Bayut, Wasalt, Aqar.fm, PropertyFinder",
    "description": "Saudi-only real estate intelligence across 4 verified platforms: Bayut.sa (72K listings), Wasalt.sa PIF-owned (24K), Aqar.fm, PropertyFinder.sa. REGA license cross-reference, installment plans, Vision 2030 zone tagging, Arabic district normalization. $4/1K listings.",
    "version": "0.1",
    "x-build-id": "JCmFc82qwpKUji4jn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~saudi-real-estate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-saudi-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/constructive_calm~saudi-real-estate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-saudi-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/constructive_calm~saudi-real-estate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-saudi-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": [
          "platforms"
        ],
        "properties": {
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Pick one or more Saudi real estate platforms. Bayut.sa (72,468 listings) + Wasalt.sa (PIF-owned, 24,308 REGA-verified) + Aqar.fm (1.5M total, KSA #1) + PropertyFinder.sa.",
            "items": {
              "type": "string"
            },
            "default": [
              "bayut_sa"
            ]
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by Saudi cities (optional). Common: Riyadh, Jeddah, Makkah, Madinah, Dammam, Khobar, Abha, Tabuk, Hail, Buraidah. Arabic names also accepted (الرياض, جدة, الدمام).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categories": {
            "title": "Property categories",
            "type": "array",
            "description": "Filter by property category. Accepted: apartment, villa, land, building, commercial, townhouse, penthouse, hotel-apartment, office, shop. Leave empty for all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "listingType": {
            "title": "Listing type",
            "enum": [
              "sale",
              "rent",
              "off_plan",
              "auction",
              "all"
            ],
            "type": "string",
            "description": "Sale, rent, off-plan, or auction. Default = sale.",
            "default": "sale"
          },
          "maxListingsPerPlatform": {
            "title": "Max listings per platform",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap how many listings to fetch from EACH selected platform. Total dataset rows = this × number of platforms selected. Range 1-5000.",
            "default": 200
          },
          "priceMinSar": {
            "title": "Min price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in Saudi Riyals (optional). Leave 0 for no lower bound.",
            "default": 0
          },
          "priceMaxSar": {
            "title": "Max price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in Saudi Riyals (optional). Leave 0 for no upper bound.",
            "default": 0
          },
          "bedroomsMin": {
            "title": "Min bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum bedroom count (optional). 0 = no filter.",
            "default": 0
          },
          "bathroomsMin": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum bathroom count (optional). 0 = no filter.",
            "default": 0
          },
          "areaMinSqm": {
            "title": "Min area (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum area in square meters (optional). 0 = no filter.",
            "default": 0
          },
          "regaVerifiedOnly": {
            "title": "REGA-verified listings only",
            "type": "boolean",
            "description": "Filter to only listings with a verifiable REGA (Saudi Real Estate General Authority) license number. Excludes Aqar.fm listings since Aqar doesn't expose REGA license. Lower volume, higher trust.",
            "default": false
          },
          "vision2030ZonesOnly": {
            "title": "Vision 2030 mega-project zones only",
            "type": "boolean",
            "description": "Filter to listings tagged as NEOM, Red Sea, Diriyah Gate, ROSHN, Qiddiya, or King Salman Park. Auto-tagged via description regex + coordinate bounds.",
            "default": false
          },
          "fetchBayutRegaDetails": {
            "title": "Fetch Bayut.sa detail-page REGA fields",
            "type": "boolean",
            "description": "For Bayut.sa listings, do an extra detail-page fetch to extract permitNumber + permitUrl (cross-reference to rega.gov.sa). Adds ~1 extra request per Bayut listing.",
            "default": false
          },
          "useProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Route requests via Apify proxy. Required for PropertyFinder.sa pages 2+ (rate-limited from many IPs). Auto-engaged for PF.sa even when this is off. Other platforms work without proxy.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration (used when useProxy=true). Defaults to RESIDENTIAL with US country pin (BUYPROXIES94952 group, 27 IPs available).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "BUYPROXIES94952"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}