{
  "openapi": "3.0.1",
  "info": {
    "title": "Haraj Saudi Arabia Real Estate Scraper: Listings & Demand",
    "description": "Scrape haraj.com.sa, the largest classifieds site in Saudi Arabia, for property ads: price in SAR, area, rooms, REGA licence data, location, coordinates, photos and Arabic text. Also wanted requests, ad counts per category and a city and neighbourhood list. No proxy, no login.",
    "version": "0.1",
    "x-build-id": "hjZppbrZNngtWEBUo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~haraj-sa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-haraj-sa-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/recordsdata~haraj-sa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-haraj-sa-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/recordsdata~haraj-sa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-haraj-sa-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": "Optional haraj.com.sa pages to read: an ad page (haraj.com.sa/11190325633/...) or a tag page of the real-estate section such as https://haraj.com.sa/tags/شقق للايجار/ or https://haraj.com.sa/tags/شقق للايجار في جده/. A tag page is read as it is, so Operation, Property types and the place inputs below are ignored for it. Leave empty to search with the inputs below.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "adIds": {
            "title": "Ad IDs",
            "type": "array",
            "description": "Optional ad ids to fetch directly, one per line: the number in the ad URL after the 11 (190325633 for https://haraj.com.sa/11190325633/). Ads outside the real-estate section and removed ads come back as one free error row each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "What to return. Listings: one row per offer (sale, rent or lease transfer) with price, area, licence facts, place and photos. Wanted requests: one row per ad in which someone asks for a property (demand leads). Market stats: the ad counts Haraj reports per category and region or neighbourhood. Locations: Haraj's own list of provinces, cities and neighbourhoods with ids and coordinates. Every row counts toward Max Items.",
            "items": {
              "type": "string",
              "enum": [
                "listings",
                "wanted-requests",
                "market-stats",
                "locations"
              ],
              "enumTitles": [
                "Listings (offers)",
                "Wanted requests (demand)",
                "Market stats (ad counts)",
                "Locations (provinces, cities, neighbourhoods)"
              ]
            },
            "default": [
              "listings"
            ]
          },
          "splitLargeSearches": {
            "title": "Split large searches",
            "type": "boolean",
            "description": "Haraj shows at most about 1,000 of the most recently updated ads for any one search. When a search fills that window, split it into regions and then neighbourhood tags so Max Items can go beyond 1,000. Needs more requests, so a run takes longer. Turn off to stay inside the first window.",
            "default": true
          },
          "locationLevels": {
            "title": "Location levels",
            "type": "array",
            "description": "Only for the Locations record type: which levels to return. Provinces are 13 rows; cities about 160; neighbourhoods are several thousand (use Cities below to pick one city).",
            "items": {
              "type": "string",
              "enum": [
                "provinces",
                "cities",
                "neighborhoods"
              ],
              "enumTitles": [
                "Provinces",
                "Cities",
                "Neighbourhoods"
              ]
            },
            "default": [
              "cities"
            ]
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "any",
              "sale",
              "rent",
              "transfer"
            ],
            "type": "string",
            "description": "For sale, for rent, lease transfer (taqbeel, handing over a shop lease), or all of them. Every row says which one it is in the operation field.",
            "default": "any"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Only these property types, as Haraj files them in its 27 real-estate categories. Leave empty for all. A type Haraj does not offer for the chosen operation (for example land for rent) returns no rows.",
            "items": {
              "type": "string",
              "enum": [
                "apartment",
                "villa",
                "land",
                "commercial-land",
                "house",
                "floor",
                "building",
                "farm",
                "rest-house",
                "chalet",
                "shop",
                "office",
                "warehouse",
                "room",
                "compound",
                "hall",
                "camp"
              ],
              "enumTitles": [
                "Apartments",
                "Villas",
                "Land",
                "Commercial land",
                "Houses",
                "Floors (one storey of a house)",
                "Buildings",
                "Farms",
                "Rest houses (istiraha)",
                "Chalets",
                "Shops",
                "Offices",
                "Warehouses",
                "Rooms",
                "Compounds",
                "Halls",
                "Camps"
              ]
            },
            "default": []
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Only ads in these Haraj regions (the 17 hubs of its region picker; a region covers the towns around it, Riyadh includes Al-Kharj and Diriyah). Leave empty for all of Saudi Arabia.",
            "items": {
              "type": "string",
              "enum": [
                "riyadh",
                "eastern-province",
                "jeddah",
                "makkah",
                "yanbu",
                "hafar-al-batin",
                "madinah",
                "taif",
                "tabuk",
                "qassim",
                "hail",
                "abha-and-aseer",
                "bahah",
                "jazan",
                "najran",
                "jouf",
                "arar-and-northern-borders"
              ],
              "enumTitles": [
                "Riyadh",
                "Eastern Province (Dammam, Khobar, Dhahran, Hofuf...)",
                "Jeddah",
                "Makkah",
                "Yanbu",
                "Hafar Al Batin",
                "Madinah",
                "Taif",
                "Tabuk",
                "Qassim (Buraydah, Unaizah...)",
                "Hail",
                "Abha and Aseer",
                "Bahah",
                "Jazan",
                "Najran",
                "Jouf",
                "Arar and Northern Borders"
              ]
            },
            "default": []
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Only ads in these cities, as Haraj lists them: Arabic (جده, بريدة, الدمام, ابها) or English (Jeddah, Buraydah, Dammam). One city per line; each is scanned in turn. A city is narrower than a region.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "neighborhoods": {
            "title": "Neighbourhoods",
            "type": "array",
            "description": "Only ads in these neighbourhoods of ONE city (put that city in Cities). Arabic with or without the word حي (الرمال, طويق, حي النرجس) or Haraj's English spelling (Al-Rwaby). Haraj files each ad under one neighbourhood.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only ads that match this word or phrase, in Arabic or English (مفروشة, villa with pool). Haraj's keyword search reaches about 300 ads per search, so combine it with a region or city for more.",
            "default": ""
          },
          "postedWithin": {
            "title": "Updated within",
            "enum": [
              "any",
              "1days",
              "3days",
              "1week",
              "1months"
            ],
            "type": "string",
            "description": "Only ads posted or renewed within this window. Haraj itself only lists ads updated in about the last month.",
            "default": "any"
          },
          "minPrice": {
            "title": "Minimum price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at least this much, in Saudi riyals. For rent it is the rent as advertised (usually per year). Ads without a price are left out when a price filter is set. 0 means no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at most this much, in Saudi riyals. Ads without a price are left out when a price filter is set. 0 means no maximum.",
            "default": 0
          },
          "minArea": {
            "title": "Minimum area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads of at least this many square meters. Ads that state no area are left out when an area filter is set. 0 means no minimum.",
            "default": 0
          },
          "maxArea": {
            "title": "Maximum area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads of at most this many square meters. Ads that state no area are left out when an area filter is set. 0 means no maximum.",
            "default": 0
          },
          "minRooms": {
            "title": "Minimum rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at least this many rooms (read from the licence data or the text). Ads that state no room count are left out when set. 0 means no minimum.",
            "default": 0
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "business",
              "individual"
            ],
            "type": "string",
            "description": "Business: the ad carries a company or office name (real estate offices, developers). Individual: everything else (owners and individual brokers). The split is read from the licence holder and account names, so it is a good guide, not a guarantee.",
            "default": "any"
          },
          "onlyLicensed": {
            "title": "Only licensed ads",
            "type": "boolean",
            "description": "Only ads that carry a REGA advertising licence (the Saudi real-estate regulator). Those ads have the most structured data: unit price, property type, building age, street width, plot and blueprint numbers.",
            "default": false
          },
          "onlyWithImages": {
            "title": "Only ads with photos",
            "type": "boolean",
            "description": "Skip ads that have no photo.",
            "default": false
          },
          "onlyWithVideo": {
            "title": "Only ads with video",
            "type": "boolean",
            "description": "Only ads that have a video.",
            "default": false
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "Only ads updated or renewed on or after this date, for example 2026-10-10 or 2026-10-10T08:00:00+03:00 (Saudi time is UTC+3). Leave empty for no cutoff. A category scan stops early once the ads are older.",
            "default": ""
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop collecting after this many seconds and return what was gathered, so a very wide search never runs unbounded.",
            "default": 1800
          },
          "onlyNew": {
            "title": "Only new rows (monitor mode)",
            "type": "boolean",
            "description": "Only new rows: skip every ad, count or location this same search already returned in an earlier run, so a scheduled run returns just the new ones and you are not charged for skipped rows. Max Items then means N new rows. Off by default.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Name of this monitor. Leave empty to derive it from your filters. Use a name to run two monitors with the same filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget everything this monitor has already seen and start from scratch (the run then returns everything again). Off by default.",
            "default": false
          },
          "includeContactDetails": {
            "title": "Include contact data",
            "type": "boolean",
            "description": "Add the contact fields Haraj ads carry: the responsible employee's name and mobile number, the licence holder when it is a person, the advertiser account name and id and the advertiser registration number. Ads' public text is always cleaned of phone numbers, links and e-mails. Off by default: you are responsible for lawful use of personal data.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}