{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenSooq Scraper | 20 Markets Sale & Rent",
    "description": "Scrape OpenSooq property listings across 20 MENA markets for sale or rent. Extract prices, beds, area, location & photos. OpenSooq API alternative.",
    "version": "0.6",
    "x-build-id": "p7Pgq154JHP5h7vY2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~opensooq-real-estate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-opensooq-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/lentic_clockss~opensooq-real-estate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-opensooq-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/lentic_clockss~opensooq-real-estate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-opensooq-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",
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "OpenSooq search (SRP) or listing detail (LDP) URLs. Search URLs override market/channel/location/type when provided. Supports national (/en/property/...) and city (/en/{city}/property/...) paths.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "market": {
            "title": "Market",
            "enum": [
              "AE",
              "BH",
              "DZ",
              "EG",
              "IQ",
              "JO",
              "KW",
              "LB",
              "LY",
              "MA",
              "MR",
              "OM",
              "PS",
              "QA",
              "SA",
              "SD",
              "SY",
              "TN",
              "TR",
              "YE",
              "all"
            ],
            "type": "string",
            "description": "Primary country market (all 20 OpenSooq countries). Use all for every market. Ignored when markets is set.",
            "default": "JO"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Optional multi-select of markets. Overrides market when non-empty. maxItems is fair-split across markets × property types.",
            "items": {
              "type": "string",
              "enum": [
                "AE",
                "BH",
                "DZ",
                "EG",
                "IQ",
                "JO",
                "KW",
                "LB",
                "LY",
                "MA",
                "MR",
                "OM",
                "PS",
                "QA",
                "SA",
                "SD",
                "SY",
                "TN",
                "TR",
                "YE"
              ]
            },
            "default": []
          },
          "channel": {
            "title": "Channel",
            "enum": [
              "BUY",
              "RENT"
            ],
            "type": "string",
            "description": "Sale or rent property channel.",
            "default": "BUY"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "all",
              "residential",
              "apartment",
              "villa",
              "townhouse",
              "whole-building",
              "farm-chalet",
              "foreign-property",
              "hotel-apartment",
              "shared-rooms",
              "commercial",
              "office",
              "shop",
              "complex",
              "showroom",
              "restaurant-cafe",
              "warehouse",
              "supermarket",
              "clinic",
              "commercial-villa",
              "full-floor",
              "hotel",
              "factory",
              "staff-housing",
              "land"
            ],
            "type": "string",
            "description": "Single property category. Use all for root property-for-sale/rent. Rent-only: hotel-apartment, shared-rooms.",
            "default": "all"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Optional multi-select categories. Overrides propertyType when non-empty. Fair-split with markets.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "residential",
                "apartment",
                "villa",
                "townhouse",
                "whole-building",
                "farm-chalet",
                "foreign-property",
                "hotel-apartment",
                "shared-rooms",
                "commercial",
                "office",
                "shop",
                "complex",
                "showroom",
                "restaurant-cafe",
                "warehouse",
                "supermarket",
                "clinic",
                "commercial-villa",
                "full-floor",
                "hotel",
                "factory",
                "staff-housing",
                "land"
              ]
            },
            "default": []
          },
          "expandAllCategories": {
            "title": "Expand all categories",
            "type": "boolean",
            "description": "When propertyType is all (and propertyTypes empty), expand into every category supported for the channel instead of using the root property-for-sale/rent URL.",
            "default": false
          },
          "location": {
            "title": "Location slug",
            "type": "string",
            "description": "Optional city URL slug (e.g. amman, dubai). Leave empty for national /en/property/... search (recommended for multi-market).",
            "default": ""
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "",
              "en",
              "ar"
            ],
            "type": "string",
            "description": "URL locale prefix. Leave empty for market default (en).",
            "default": ""
          },
          "maxItems": {
            "title": "Max listings (max 2,000; free users capped at 1,000/run)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum property records to save (1–2,000; fair-split across markets × property types). Free Apify plan users: capped at 1,000 per run and limited to 10 total runs of this Actor (Actor developer policy).",
            "default": 1
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum SRP pages per search URL (~30 listings per page). Uses ?page=N.",
            "default": 1
          },
          "maxSearchUrls": {
            "title": "Max search URLs",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on markets × property-types search URL fan-out (prevents runaway runs).",
            "default": 60
          },
          "scrapeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "Fetch each listing LDP and merge JSON-LD + attribute fields.",
            "default": true
          },
          "failOnPartial": {
            "title": "Fail on partial collection",
            "type": "boolean",
            "description": "When true, abort the run if SRP/LDP failure rate is high instead of returning SUCCEEDED_PARTIAL.",
            "default": false
          },
          "requestDelayMillis": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Politeness delay between HTTP requests (adaptive throttle may raise this after blocks).",
            "default": 800
          },
          "maxConcurrency": {
            "title": "Request concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Max concurrent HTTP fetches for detail pages.",
            "default": 2
          },
          "unlockerApiKey": {
            "title": "Unlocker API key (optional)",
            "type": "string",
            "description": "Optional ScraperAPI key for HTML unlocker fallback when curl_cffi is blocked. Prefer SCRAPERAPI_KEY secret on Actor."
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override worker origin for this run. Default: Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}