{
  "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": "sUAtdJNfQL3p78Xgc"
  },
  "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": {
          "recordTypes": {
            "title": "What do you want to collect?",
            "type": "array",
            "description": "Pick one or more. Listings = offers for sale, rent or lease transfer (the default). Wanted requests = people asking for a property (demand leads). Market stats = ad counts per category and region. Locations = Haraj's list of provinces, cities and neighbourhoods. Example: Listings. Every row counts toward Max results.",
            "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"
            ]
          },
          "maxItems": {
            "title": "Max results (rows)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many rows to return in total, all record types together. Free plan: capped at 10 (preview). Paid plan: up to 1,000,000. Example: 100."
          },
          "locationLevels": {
            "title": "Location levels (only for 'Locations')",
            "type": "array",
            "description": "Used only when 'Locations' is selected above. Provinces are 13 rows, cities about 160, neighbourhoods several thousand (pick one city below to narrow them). Example: Cities.",
            "items": {
              "type": "string",
              "enum": [
                "provinces",
                "cities",
                "neighborhoods"
              ],
              "enumTitles": [
                "Provinces",
                "Cities",
                "Neighbourhoods"
              ]
            },
            "default": [
              "cities"
            ]
          },
          "startUrls": {
            "title": "Haraj links (optional)",
            "type": "array",
            "description": "Paste haraj.com.sa ad pages or real-estate tag pages, for example https://haraj.com.sa/tags/شقق للايجار في جده/. A tag page is read as it is, so Operation, Property types and place filters are ignored for it. Leave empty to search with the filters below.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "adIds": {
            "title": "Ad IDs (optional)",
            "type": "array",
            "description": "One ad id per line: the digits after the 11 in the ad URL (190325633 for https://haraj.com.sa/11190325633/). Ads outside real estate and removed ads come back as one free error row each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "any",
              "sale",
              "rent",
              "transfer"
            ],
            "type": "string",
            "description": "Sale, rent or lease transfer (taqbeel, handing over a shop lease). Every row says which one it is in the operation field. Example: For rent.",
            "default": "any"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Only these 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 (land for rent, for example) 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 (its 17 regional hubs; Riyadh includes Al-Kharj and Diriyah). Leave empty for all of Saudi Arabia. Example: Riyadh.",
            "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": "One city per line, in Arabic (جده, بريدة) or English (Jeddah, Buraydah). Each city is scanned in turn and is narrower than a region. Example: Jeddah.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "neighborhoods": {
            "title": "Neighbourhoods (of one city)",
            "type": "array",
            "description": "Neighbourhoods of ONE city, so also fill Cities with that city. Arabic with or without حي (الرمال, حي النرجس) or Haraj's English spelling (Al-Rwaby).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only ads that match this word or phrase, in Arabic or English. Haraj's keyword search reaches about 300 ads, so combine it with a region or city for more. Example: مفروشة or villa with pool.",
            "default": ""
          },
          "postedWithin": {
            "title": "Posted within",
            "enum": [
              "any",
              "1days",
              "3days",
              "1week",
              "1months"
            ],
            "type": "string",
            "description": "Only ads posted or renewed in this window. Haraj lists only ads from about the last month. Example: Last week.",
            "default": "any"
          },
          "updatedSince": {
            "title": "Updated since (exact date, optional)",
            "type": "string",
            "description": "Only ads updated 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. Use this instead of 'Posted within' when you need an exact date.",
            "default": ""
          },
          "minPrice": {
            "title": "Min price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at least this much, in Saudi riyals. For rent this is the advertised rent, usually per year. Ads with no price are left out when a price filter is set. 0 = no minimum. Example: 30000.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max price (SAR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at most this much, in Saudi riyals. Ads with no price are left out when a price filter is set. 0 = no maximum. Example: 80000.",
            "default": 0
          },
          "minArea": {
            "title": "Min area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads of at least this many square meters. Ads with no stated area are left out when set. 0 = no minimum. Example: 150.",
            "default": 0
          },
          "maxArea": {
            "title": "Max area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads of at most this many square meters. Ads with no stated area are left out when set. 0 = no maximum. Example: 400.",
            "default": 0
          },
          "minRooms": {
            "title": "Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at least this many rooms (from licence data or text). Ads with no room count are left out when set. 0 = no minimum. Example: 3.",
            "default": 0
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "business",
              "individual"
            ],
            "type": "string",
            "description": "Business = a company or office name on the ad (offices, developers). Individual = owners and individual brokers. Read from licence holder and account names, so a good guide, not a guarantee.",
            "default": "any"
          },
          "onlyLicensed": {
            "title": "Only licensed ads (REGA)",
            "type": "boolean",
            "description": "Only ads with a REGA advertising licence (the Saudi real-estate regulator). They carry the richest 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
          },
          "splitLargeSearches": {
            "title": "Go past 1,000 results (split big searches)",
            "type": "boolean",
            "description": "Haraj shows about 1,000 recent ads per search. On (default): a full search is split by region and neighbourhood so Max results can go beyond 1,000 (slower, more requests). Off: stay inside the first 1,000.",
            "default": true
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop after this many seconds and return what was gathered, so a very wide search never runs unbounded. Example: 1800 (30 minutes).",
            "default": 1800
          },
          "includeContactDetails": {
            "title": "Include contact data",
            "type": "boolean",
            "description": "Adds the advertiser's contact fields: employee name and mobile, licence holder when a person, account name and id, registration number. Ad text is always cleaned of phones, links and e-mails. Off by default: you are responsible for lawful use of personal data.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows (monitor mode)",
            "type": "boolean",
            "description": "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 skipped rows are not charged. Max results then means N new rows.",
            "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. Example: riyadh-villas.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget everything this monitor has seen and start from scratch (the run returns everything again). Off by default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}