{
  "openapi": "3.0.1",
  "info": {
    "title": "Egyptian Real Estate Scraper",
    "description": "Scrapes property listings from Dubizzle, Aqarmap, and PropertyFinder Egypt. Extracts prices, areas, bedrooms, GPS coordinates, payment plans, agent info, and amenities into normalized structured data.",
    "version": "1.0",
    "x-build-id": "eamkfgvc0Ve3ASUxc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/constructive_calm~egypt-real-estate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-constructive_calm-egypt-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~egypt-real-estate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-constructive_calm-egypt-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~egypt-real-estate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-constructive_calm-egypt-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": "Select which Egyptian real estate platforms to scrape. Choose individual platforms or 'All' for comprehensive coverage.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "aqarmap",
                "propertyfinder",
                "dubizzle"
              ],
              "enumTitles": [
                "All Platforms",
                "Aqarmap (450K+ properties)",
                "PropertyFinder (richest data)",
                "Dubizzle/OLX (168K+ listings)"
              ]
            },
            "default": [
              "all"
            ]
          },
          "listingType": {
            "title": "Listing Type",
            "enum": [
              "sale",
              "rent",
              "both"
            ],
            "type": "string",
            "description": "Scrape properties for sale, for rent, or both.",
            "default": "sale"
          },
          "propertyCategory": {
            "title": "Property Category",
            "enum": [
              "residential",
              "commercial"
            ],
            "type": "string",
            "description": "Residential properties (apartments, villas) or commercial (shops, offices).",
            "default": "residential"
          },
          "propertyType": {
            "title": "Property Type",
            "enum": [
              "",
              "apartment",
              "villa",
              "studio",
              "duplex",
              "penthouse",
              "townhouse",
              "chalet",
              "land",
              "shop",
              "office",
              "commercial"
            ],
            "type": "string",
            "description": "Filter by specific property type. Leave empty for all types. A platform that has no exact match for the type is skipped with a warning instead of returning other property types (PropertyFinder is residential only; Aqarmap has no working land search; Dubizzle covers apartments/duplexes, villas, chalets and commercial)."
          },
          "location": {
            "title": "Location",
            "enum": [
              "",
              "cairo",
              "new-cairo",
              "6th-of-october",
              "alexandria",
              "giza",
              "hurghada",
              "north-coast",
              "sheikh-zayed",
              "ain-sokhna",
              "madinaty",
              "shorouk"
            ],
            "type": "string",
            "description": "Filter by Egyptian city or area. Leave empty for all locations. Each platform is searched with its own location filter; if a platform has no match for the area (Aqarmap has no separate Giza area), that platform is skipped with a warning instead of returning listings from elsewhere."
          },
          "priceMin": {
            "title": "Minimum Price (EGP)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in Egyptian Pounds. Filtering is done after extraction for accuracy."
          },
          "priceMax": {
            "title": "Maximum Price (EGP)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in Egyptian Pounds. Filtering is done after extraction for accuracy."
          },
          "areaMin": {
            "title": "Minimum Area (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum property area in square meters."
          },
          "areaMax": {
            "title": "Maximum Area (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum property area in square meters."
          },
          "bedrooms": {
            "title": "Bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Filter by minimum number of bedrooms."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "newest",
              "price_asc",
              "price_desc",
              "area_asc",
              "area_desc"
            ],
            "type": "string",
            "description": "How to sort listings on platforms that support it.",
            "default": "newest"
          },
          "maxListingsPerPlatform": {
            "title": "Max Listings per Platform",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of listings to extract from each platform. Default 25 keeps runs under 5 minutes; raise to 1000+ for large datasets (run time scales with this value).",
            "default": 25
          },
          "enrichListings": {
            "title": "Enrich with Full Details (phone numbers, GPS, full description)",
            "type": "boolean",
            "description": "Visit each listing's detail page to extract phone number, GPS coordinates, and full description. Adds ~1-2s per Aqarmap listing and ~5-10s per Dubizzle listing. PropertyFinder already includes phones without enrichment. No extra charge beyond the per-listing price.",
            "default": false
          },
          "useAI": {
            "title": "AI-Enhanced Extraction",
            "type": "boolean",
            "description": "Automatically use AI vision when standard extraction fails (at most 2 AI page reads per run). A one-time $0.03 AI Extraction charge applies only when the AI finds at least one listing matching your filters and those listings are delivered (at most once per run). Never charged for block/captcha pages (they are not sent to the AI), for 0 listings, or when the AI service errors.",
            "default": true
          },
          "useBrowser": {
            "title": "Browser Rendering Mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Auto uses fast HTTP for Aqarmap/PropertyFinder and browser for Dubizzle. 'Always' renders all pages in browser.",
            "default": "auto"
          },
          "detectChanges": {
            "title": "Detect Listing Changes",
            "type": "boolean",
            "description": "Compare results with the last run of the same search (same filters) to flag price changes, new listings and removed listings. The first run of a search records a baseline and reports no changes. Each platform is compared with its own last scan of the search; a platform with no earlier scan records a baseline. Listings are reported removed only when a platform was scanned to its last page, and at most Max Listings per Platform removed listings are reported per platform per run (the rest on the next run). Each result carries a searchKey, so several searches can share one named dataset.",
            "default": false
          },
          "datasetName": {
            "title": "Named Dataset",
            "pattern": "^(([a-zA-Z0-9._-]{1,64}~)?[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)?$",
            "maxLength": 129,
            "type": "string",
            "description": "Named dataset for persistent storage. Enables automatic change detection between scheduled runs. 1-63 letters, digits or hyphens, not starting or ending with a hyphen (e.g. egypt-listings), optionally prefixed with username~."
          },
          "webhookUrl": {
            "title": "Webhook URL for Alerts",
            "type": "string",
            "description": "URL to POST notifications when price changes or new listings are detected."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum concurrent requests. Lower values are gentler on target sites.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Recommended for production use to avoid rate limiting.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}