{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayut Property Scraper",
    "description": "Scrape Bayut.com UAE listings, property details, agency / agent / truBroker lookups, claimed-deals stats, agent stories, and location autocomplete in real time. Search by city or neighbourhood externalID with full filters (purpose, completion status, price, beds, baths, area).",
    "version": "1.0",
    "x-build-id": "M5kewe0Sl0FjeRfvS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~bayut-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-bayut-property-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/one-api~bayut-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-bayut-property-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/one-api~bayut-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-bayut-property-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": {
          "property_inputs": {
            "title": "Property externalID, Bayut URL, or details_NNN slug (one per line)",
            "type": "array",
            "description": "Auto-detects each entry: digits → externalID, http(s) URL → Bayut listing URL (we extract the externalID), `details_NNN` slug → externalID. Each row = 1 property detail call.",
            "items": {
              "type": "string"
            }
          },
          "search_inputs": {
            "title": "Location externalID or Bayut location slug (one per line)",
            "type": "array",
            "description": "Auto-detects each entry. Examples:\n• `5002` (Dubai externalID — get from /autocomplete)\n• `6020` (Abu Dhabi), `6901` (Sharjah)\n• `dubai-marina` (slug — we resolve via /autocomplete)\n• `https://www.bayut.com/to-rent/property/dubai/` (Bayut URL — we resolve)\n\nFilters below apply to every search. Each LISTING is pushed as one dataset item.",
            "items": {
              "type": "string"
            }
          },
          "purpose": {
            "title": "Purpose",
            "enum": [
              "for-sale",
              "for-rent"
            ],
            "type": "string",
            "description": "for-sale (default) or for-rent.",
            "default": "for-sale"
          },
          "category": {
            "title": "Category",
            "enum": [
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Top-level category. Defaults to residential.",
            "default": "residential"
          },
          "completionStatus": {
            "title": "Completion Status",
            "enum": [
              "",
              "completed",
              "under-construction"
            ],
            "type": "string",
            "description": "Bayut filter: `completed` (ready), `under-construction` (off-plan), or empty (any).",
            "default": ""
          },
          "priceRange": {
            "title": "Price Range (AED)",
            "type": "string",
            "description": "`min:500000`, `max:5000000`, or `min:500000,max:5000000`.",
            "default": ""
          },
          "beds": {
            "title": "Beds (exact)",
            "type": "string",
            "description": "Bayut filters by exact bed count (e.g. `2`, `5`). Empty = any. Bayut's range filter uses single values only — for studio enter `0`.",
            "default": ""
          },
          "baths": {
            "title": "Baths (exact)",
            "type": "string",
            "description": "Exact bath count (e.g. `2`). Empty = any.",
            "default": ""
          },
          "areaSqftRange": {
            "title": "Area Range (sqft)",
            "type": "string",
            "description": "`min:800`, `max:3000`, `min:800,max:3000`. Bayut's API works in sqm — we convert sqft→sqm automatically.",
            "default": ""
          },
          "furnishingStatus": {
            "title": "Furnishing",
            "enum": [
              "",
              "furnished",
              "unfurnished",
              "partly-furnished"
            ],
            "type": "string",
            "description": "Bayut furnishing filter. Empty = any.",
            "default": ""
          },
          "rentFrequency": {
            "title": "Rent Frequency (rent only)",
            "enum": [
              "",
              "yearly",
              "monthly",
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "Used when `purpose` = `for-rent`. Yearly is most common in the UAE.",
            "default": ""
          },
          "hasPanorama": {
            "title": "Has 360° Panorama",
            "type": "boolean",
            "description": "Only listings with at least one 360° panorama image.",
            "default": false
          },
          "hasVideo": {
            "title": "Has Video Tour",
            "type": "boolean",
            "description": "Only listings with at least one video tour.",
            "default": false
          },
          "hasFloorplan": {
            "title": "Has Floor Plan",
            "type": "boolean",
            "description": "Only listings with a floor plan attached.",
            "default": false
          },
          "agency_external_ids": {
            "title": "Filter by Agency externalIDs (comma-separated)",
            "type": "string",
            "description": "Restrict to listings owned by one or more agencies. e.g. `10499,29599755`.",
            "default": ""
          },
          "hitsPerPage": {
            "title": "Listings per page",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Bayut allows up to 25 listings per page (default).",
            "default": 25
          },
          "pages": {
            "title": "Pages to fetch per search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Each page = up to 25 listings. Bayut caps deep pagination — typical max useful depth is ~40 pages.",
            "default": 1
          },
          "autocomplete_inputs": {
            "title": "Autocomplete query (one per line)",
            "type": "array",
            "description": "Bayut location lookup: cities, neighbourhoods, sub-communities, towers. Use the resulting `externalID` as `search_inputs`.",
            "items": {
              "type": "string"
            }
          },
          "agency_inputs": {
            "title": "Agency externalID (one per line)",
            "type": "array",
            "description": "Get the full agency profile (name, agents count, license number, phone). The agency `externalID` is shown as `Agency ID` in any search row.",
            "items": {
              "type": "string"
            }
          },
          "agency_agents_inputs": {
            "title": "Agency externalID — list its agents (one per line)",
            "type": "array",
            "description": "Returns every agent registered under this agency, with their own externalID + slug for use in the Agent Details section.",
            "items": {
              "type": "string"
            }
          },
          "agent_inputs": {
            "title": "Agent slug, e.g. `salma-mohamed-mahmoud-hashem-2521536` (one per line)",
            "type": "array",
            "description": "Agent slug — find it from any search row's `ownerAgent.externalID` looked up via `agency_agents_inputs`, or directly from the Bayut.com agent profile URL. Format: `<name>-<externalID>`.",
            "items": {
              "type": "string"
            }
          },
          "trubroker_inputs": {
            "title": "Location externalID for truBroker leaderboard (one per line)",
            "type": "array",
            "description": "Bayut's top-ranked agents in a location, with badges (truBroker, responsive, quality lister). Same format as `search_inputs` — use a location externalID. Honours `purpose`, `category`, `completionStatus`.",
            "items": {
              "type": "string"
            }
          },
          "stories_inputs": {
            "title": "Agent externalID for stories (one per line)",
            "type": "array",
            "description": "Recent updates / posts an agent has published on Bayut. Pass agent `externalID` (digits, e.g. `2510010`).",
            "items": {
              "type": "string"
            }
          },
          "claimeddeals_inputs": {
            "title": "Agent externalID for claimed-deals stats (one per line)",
            "type": "array",
            "description": "Lifetime closed-deal stats per agent: count of pending/rejected/approved deals (For Sale, For Rent, Wanted) and their total transaction value in AED. Returns 2 dataset rows per agent (one for /count, one for /totalPrice).",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}