{
  "openapi": "3.0.1",
  "info": {
    "title": "Bayut Scraper — UAE Property Listings, Agents & Agencies",
    "description": "Scrape Bayut.com UAE real estate listings (sale & rent), agent contacts, and agencies. HTTP-only via Algolia, no proxy needed. MCP-ready.",
    "version": "0.1",
    "x-build-id": "ihH9pGklvtgMf42fk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~bayut-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-bayut-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/khadinakbar~bayut-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-bayut-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/khadinakbar~bayut-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-bayut-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": {
          "mode": {
            "title": "Mode (auto by default)",
            "enum": [
              "auto",
              "search",
              "url",
              "property",
              "agency",
              "agent"
            ],
            "type": "string",
            "description": "Which Bayut surface to scrape. 'auto' picks based on what you provide (startUrls -> url, agencyIds -> agency, etc.). 'search' = filtered property search. 'url' = parse Bayut property/search URLs. 'property' = direct property externalIDs. 'agency'/'agent' = agency or agent records (+ optional listings). Defaults to 'auto'.",
            "default": "auto"
          },
          "purpose": {
            "title": "Purpose (sale or rent)",
            "enum": [
              "for-sale",
              "for-rent"
            ],
            "type": "string",
            "description": "Listing purpose. 'for-sale' = properties for sale; 'for-rent' = rentals. Use with rentFrequency for rental search. Defaults to 'for-sale'. Only used in search mode (URL mode infers from URL).",
            "default": "for-sale"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "UAE emirate / city. Example: 'Dubai', 'Abu Dhabi', 'Sharjah', 'Ajman', 'Ras Al Khaimah'. Resolved to a Bayut location externalID via the Algolia locations index. NOT a neighborhood (use locationQuery for those)."
          },
          "locationQuery": {
            "title": "Location query (neighborhood / area)",
            "type": "string",
            "description": "Free-text location at any level: emirate, area, sub-area, building. Example: 'Dubai Marina', 'Downtown Dubai', 'Business Bay'. Resolves to the closest matching Bayut location externalID. Overrides 'city' when set."
          },
          "locationExternalID": {
            "title": "Location externalID (advanced)",
            "type": "string",
            "description": "Bayut location externalID (e.g. '5002' for Dubai, '5003' for Dubai Marina). Use when you already know the exact ID for max precision. Overrides city/locationQuery."
          },
          "query": {
            "title": "Free-text search query",
            "type": "string",
            "description": "Free-text keyword search across title/description (e.g. 'sea view', 'penthouse', 'Burj Khalifa'). Combined with the city/location filter. Leave blank to return everything matching the filters."
          },
          "category": {
            "title": "Category slug",
            "type": "string",
            "description": "Bayut category slug. 'apartments', 'villas', 'townhouses', 'penthouses', 'hotel-apartments', 'residential-building', 'residential-floor', 'residential-land', 'commercial', 'offices', 'shops', 'warehouses'. Empty = all categories."
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "",
              "property",
              "project"
            ],
            "type": "string",
            "description": "'property' (default — single units), 'project' (off-plan developments). Empty returns both.",
            "default": ""
          },
          "minBeds": {
            "title": "Min bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum number of bedrooms (Bayut 'rooms'). 0 = studio. Empty = no minimum."
          },
          "maxBeds": {
            "title": "Max bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of bedrooms. Empty = no maximum."
          },
          "minBaths": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum bathrooms. Empty = no minimum."
          },
          "maxBaths": {
            "title": "Max bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum bathrooms. Empty = no maximum."
          },
          "minPrice": {
            "title": "Min price (AED)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in AED. Sales are absolute; rentals are per rentFrequency (yearly/monthly). Empty = no minimum."
          },
          "maxPrice": {
            "title": "Max price (AED)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in AED. Empty = no maximum."
          },
          "minArea": {
            "title": "Min area (sqm)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum built-up area in square meters (1 sqm = 10.76 sqft)."
          },
          "maxArea": {
            "title": "Max area (sqm)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum built-up area in square meters."
          },
          "furnishingStatus": {
            "title": "Furnishing",
            "enum": [
              "",
              "furnished",
              "unfurnished"
            ],
            "type": "string",
            "description": "'furnished', 'unfurnished', or empty for both.",
            "default": ""
          },
          "completionStatus": {
            "title": "Completion status",
            "enum": [
              "",
              "completed",
              "under-construction"
            ],
            "type": "string",
            "description": "'completed' = ready, 'under-construction' = off-plan. Empty = both.",
            "default": ""
          },
          "rentFrequency": {
            "title": "Rent frequency (rentals only)",
            "enum": [
              "",
              "yearly",
              "monthly",
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "For 'for-rent' purpose: 'yearly', 'monthly', 'weekly', 'daily'. Empty = any frequency.",
            "default": ""
          },
          "verifiedOnly": {
            "title": "Verified listings only",
            "type": "boolean",
            "description": "Only return Bayut-verified listings (TruCheck). Reduces volume but improves quality. Default false.",
            "default": false
          },
          "startUrls": {
            "title": "Start URLs (URL mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Bayut URLs. Each can be a property detail page (https://www.bayut.com/property/details-15597302.html) or a search page (https://www.bayut.com/for-sale/apartments/dubai/). URL mode auto-detects from these.",
            "items": {
              "type": "string"
            }
          },
          "propertyIds": {
            "title": "Property externalIDs (property mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "List of Bayut property externalIDs (e.g. '15597302'). Useful for bulk lookup. NOT internal numeric ids.",
            "items": {
              "type": "string"
            }
          },
          "agencyIds": {
            "title": "Agency externalIDs (agency mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Bayut agency externalIDs. Returns agency profile records. Set includeAgencyListings=true to also pull every listing the agency posts.",
            "items": {
              "type": "string"
            }
          },
          "agencyQuery": {
            "title": "Agency name search (agency mode)",
            "type": "string",
            "description": "Free-text search across Bayut agency names. Returns agency profiles ranked by relevance."
          },
          "includeAgencyListings": {
            "title": "Include agency listings",
            "type": "boolean",
            "description": "When true and agencyIds are provided, also push every property posted by those agencies. Counts toward maxResults.",
            "default": false
          },
          "agentIds": {
            "title": "Agent externalIDs (agent mode)",
            "uniqueItems": true,
            "type": "array",
            "description": "Bayut agent externalIDs. Returns agent profile records (name, phone, agency, TruBroker badge, etc.).",
            "items": {
              "type": "string"
            }
          },
          "agentQuery": {
            "title": "Agent name search (agent mode)",
            "type": "string",
            "description": "Free-text search across Bayut agent names."
          },
          "includeAgentListings": {
            "title": "Include agent listings",
            "type": "boolean",
            "description": "When true and agentIds are provided, also push every property posted by those agents. Counts toward maxResults.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on records returned (1-5000). Caps cost at $0.005 per record + $0.00005 start. Default 50. Tune higher for bulk pulls.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}