{
  "openapi": "3.0.1",
  "info": {
    "title": "Gathern Scraper — Saudi Vacation Rentals Data & API",
    "description": "Gathern scraper & short-term-rental data API for Saudi Arabia's leading vacation-rental marketplace. Chalets, istraha, apartments, resorts & camps across Riyadh, Jeddah, Dammam & more: nightly price (SAR), capacity, beds, rating & reviews, amenities, GPS, photos — clean JSON/CSV. No API key needed.",
    "version": "1.0",
    "x-build-id": "jfZixqO4QUgJ7u1d5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~gathern-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-gathern-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/sian.agency~gathern-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-gathern-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/sian.agency~gathern-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-gathern-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": {
          "searchMode": {
            "title": "🧭 Search by",
            "enum": [
              "byCity",
              "bySearchUrl"
            ],
            "type": "string",
            "description": "🧭 How to tell the scraper what to fetch:\n\n- **By city** — type one or more Saudi city names (e.g. \"Riyadh\", \"Jeddah\", \"Dammam\"). Combine with the unit type, dates, language and sort below.\n- **By search URL** — paste a gathern.co search-results URL; its city, unit type, dates and ordering are honored.",
            "default": "byCity"
          },
          "cities": {
            "title": "🏙️ Cities",
            "type": "array",
            "description": "🏙️ Saudi city names (English or Arabic), e.g. \"Riyadh\", \"Jeddah\", \"Dammam\", \"AlUla\", \"الرياض\". Used when **Search by = By city**.\n\n**TIP:** Add several — each city is searched in turn until **Max results** is reached. City names are resolved automatically.",
            "items": {
              "type": "string"
            }
          },
          "unitType": {
            "title": "🏠 Unit type (optional)",
            "enum": [
              "",
              "resort",
              "chalet",
              "istraha",
              "apartment",
              "camp",
              "farm",
              "hotel",
              "serviced-apartment"
            ],
            "type": "string",
            "description": "🏠 Filter by rental unit type. Leave empty for all types. Applies to By city searches.",
            "default": ""
          },
          "checkIn": {
            "title": "📅 Check-in (optional)",
            "type": "string",
            "description": "📅 Check-in date (YYYY-MM-DD). When set with Check-out, prices and availability reflect those nights. Applies to By city searches."
          },
          "checkOut": {
            "title": "📅 Check-out (optional)",
            "type": "string",
            "description": "📅 Check-out date (YYYY-MM-DD). Applies to By city searches."
          },
          "lang": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "ar"
            ],
            "type": "string",
            "description": "🌐 Response language. English returns Latin-script city/district/type names; Arabic returns the native names (both Arabic and English geo fields are always populated).",
            "default": "en"
          },
          "sort": {
            "title": "↕️ Sort order (optional)",
            "enum": [
              "points",
              "price",
              "rate",
              "newest"
            ],
            "type": "string",
            "description": "↕️ Order the search results. Applies to By city searches.",
            "default": "points"
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "type": "array",
            "description": "🔗 gathern.co search-results URLs to scrape. Used when **Search by = By search URL**.\n\n**TIP:** Build any search on gathern.co (pick the city, unit type, dates, ordering), then copy the URL from the address bar.\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 Maximum rental units to extract this run.\n\n- **FREE tier:** capped at 25 units per run.\n- **PAID tier:** unlimited — set as high as you need.",
            "default": 100
          },
          "maxPages": {
            "title": "📄 Max pages per city",
            "minimum": 1,
            "type": "integer",
            "description": "📄 Maximum search pages to fetch per city (10 units each). Caps very large By city runs.",
            "default": 20
          },
          "proxyCountry": {
            "title": "🌐 Proxy country (optional)",
            "enum": [
              "",
              "SA"
            ],
            "type": "string",
            "description": "🌐 Leave empty to run **direct** (no proxy — the default, fastest & cheapest). Set to \"SA\" to route through a Saudi residential proxy, only needed to dodge an IP rate-limit on very large runs.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}