# Haraj Saudi Arabia Real Estate Scraper: Listings & Demand (`recordsdata/haraj-sa-scraper`) Actor

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.

- **URL**: https://apify.com/recordsdata/haraj-sa-scraper.md
- **Developed by:** [RecordsData](https://apify.com/recordsdata) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 real estate listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![RecordsData](https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=3)

## 🏠 Haraj Saudi Arabia Real Estate Scraper: Listings & Demand

> **Haraj Saudi Arabia Real Estate Scraper exports the real estate ads of haraj.com.sa, the largest classifieds site in Saudi Arabia, as structured data: price in SAR, area, rooms, REGA licence data, region, city, neighbourhood, coordinates, photos and the full Arabic description. It also returns the "wanted" requests of buyers and tenants, the ad counts per category and neighbourhood, and the city and neighbourhood list with ids. Export CSV, Excel, JSON or XML. No login, no API key, no proxy.**

The Haraj Saudi Arabia Real Estate Scraper turns the largest informal property market of the Kingdom into a dataset you can filter, sort and join. On 2026-10-11 haraj.com.sa listed about 142,000 real estate ads in 27 categories and 17 regions: 49,512 apartments for rent, 23,144 plots of land for sale, 21,091 rest houses (istiraha) for rent, 9,692 villas for sale, 8,802 apartments for sale and 7,852 shops for lease transfer. The Actor reads the same JSON service the haraj.com.sa pages use for their own listings, so a run is fast: no browser, no proxy and no HTML parsing.

### 🎯 What does the Haraj real estate scraper do?

- Scrapes **haraj.com.sa property ads** (apartments, villas, houses, floors, buildings, land, commercial land, farms, rest houses, chalets, shops, offices, warehouses, rooms, compounds, halls and camps) for sale, for rent and for lease transfer (taqbeel).
- Returns **price in SAR, price per square meter, area, rooms, bathrooms, furnished flag, building age, facade, street width, services, blueprint and plot number** wherever the ad states them. About 6 ads in 10 carry the REGA licence block, and the Actor reads its values as typed fields.
- Gives **region, city, neighbourhood and latitude and longitude** on every ad, with a `locationAccuracy` flag that says whether the point is the map pin the advertiser filed with the licence or the point the site itself stores for the ad.
- Tells you **who sells**: individual or business, the agency name, the REGA ad licence number and its expiry date.
- Separates **offers from wanted requests**. Roughly one ad in three on Haraj is a person asking for a property ("مطلوب شقة للايجار"). Those come out as their own record type, so offers stay clean and demand becomes a data source.
- Filters by **operation, property type, place, keyword, recency, price, area, rooms, seller type and licence**, and has an **only-new mode** for scheduled runs.
- Goes past the 1,000-ad window of one Haraj query by splitting searches by region and neighbourhood.

### 📊 Haraj property data: which fields do you get?

Every row is one record with `recordType` set to `listing`, `wanted-request`, `market-stat` or `location`. A listing row carries about 55 of the 77 columns, depending on what the ad states.

| Field | Type | Example |
|---|---|---|
| `recordType` | string | listing, wanted-request, market-stat, location |
| `price` / `currency` | number / string | 29000 / SAR |
| `pricePerM2` | number | 1450 |
| `areaBuilt` / `areaLand` | number | 500 |
| `rooms`, `bathrooms` | number | 4 |
| `region`, `city`, `neighborhood` | string | Jeddah, الفيصلية |
| `latitude`, `longitude` | number | 21.575073 |
| `sellerType`, `agencyName` | string | business |
| `adLicenseNumber`, `licenseExpiresAt` | string | 7201168528, 2027-04-10 |
| `postedAt`, `updatedAt` | ISO date | 2026-10-11T13:00:58.000Z |
| `images`, `description`, `tags` | array / string | photo URLs, Arabic text |
| `adCount` (market-stat) | number | 14828 |
| `contactName`, `contactPhone` | string | only with Include contact details |

Fill rates on 150 live listings from five searches checked on 2026-10-11: title, URL, region, city, coordinates and posting time 100 percent, price 93 percent, neighbourhood 95 percent, photos 95 percent, ad licence number 96 percent, description 85 percent. Rare columns: `bathrooms` 9 percent, `furnished` 13 percent. A missing value means the ad does not state it: the key is left out, never filled with a placeholder.

### 🧾 Haraj listing example: what does a real result look like?

A real listing row (cloud run, 2026-10-11, photo list and description shortened):

```json
{
  "imageUrl": "https://img4cdn.haraj.com.sa/userfiles30/2026-10-11/720x1280-1_-GO__MTc5MTcyMzUyMzI3MzI2MDU2NDM2NA.jpg",
  "recordType": "listing",
  "listingId": "190336616",
  "url": "https://haraj.com.sa/11190336616/",
  "title": "شقة للايجار بحي الفيصلية مكونة من 4 غرف كود 910",
  "operation": "rent",
  "propertyType": "apartment",
  "category": "شقق للايجار",
  "price": 29000,
  "currency": "SAR",
  "pricePeriod": "year",
  "priceBasis": "total",
  "areaBuilt": 500,
  "rooms": 4,
  "condition": "used",
  "buildingAge": "10+",
  "services": ["water", "phone"],
  "region": "جده",
  "regionEn": "Jeddah",
  "city": "جده",
  "neighborhood": "الفيصلية",
  "country": "SA",
  "latitude": 21.575073,
  "longitude": 39.176381,
  "locationAccuracy": "advertiser-pin",
  "sellerType": "business",
  "isPrivateSeller": false,
  "agencyName": "مؤسسة محاور التقدم العقارية",
  "adLicenseNumber": "7201168528",
  "licenseExpiresAt": "2027-04-10",
  "postedAt": "2026-10-11T13:00:58.000Z",
  "updatedAt": "2026-10-11T13:00:58.000Z",
  "imageCount": 6,
  "language": "ar",
  "sourceSite": "haraj.com.sa",
  "scrapedAt": "2026-10-11T13:21:30.735Z"
}
```

Titles and descriptions stay in Arabic; structured values are English; dates are ISO 8601 UTC; prices are numbers in SAR.

### 🚀 How to scrape Haraj real estate in 4 steps

1. Create a free account at [console.apify.com](https://console.apify.com) and open this Actor.
2. Pick what to collect (listings, wanted requests, market counts or locations), then the operation (sale, rent, lease transfer or all), the property types and the place. Leave everything empty to get the newest real estate ads across the Kingdom.
3. Set **Max Items** and press Start. A 3-listing run finishes in a few seconds.
4. Download the dataset as CSV, Excel, JSON or XML, or read it through the Apify API.

To read one ad, paste its haraj.com.sa URL in **Start URLs** or the number after the 11 in **Ad IDs**. To read a Haraj category or city page, paste a tag URL such as `https://haraj.com.sa/tags/شقق للايجار في جده/`.

### 📈 Haraj scraper vs other Apify Haraj Actors

Read on 2026-10-11 from the public Store pages of the Haraj Actors.

| Feature | This Actor | Zen Studio / GetAScraper | Fervent Bus |
|---|---|---|---|
| Price per 1,000 results | 20.00 USD per 1,000 listings | 1.49 USD / 0.67 to 2.99 USD | 5.00 USD plus start fee |
| Real estate fields | Licence, area, rooms, coordinates | Generic fields, location to neighbourhood | 9 generic fields |
| Wanted requests as own records | Yes | Not shown on page | Not shown on page |
| Only-new monitor mode | Yes | Not shown on page | Not shown on page |

Both other Actors are cheaper per listing, by a wide margin: this Actor costs several times more per 1,000 results, and it also charges separately for wanted requests, market counts and locations. They cover every Haraj category, cars and electronics included, while this Actor covers only real estate. A feature marked as not shown means the Store page does not mention it, not that it is missing. If you need cheap, broad classifieds data, pick one of them. If you need typed property columns, demand records and daily new-ad runs, this one fits.

### 💼 Haraj scraper use cases

- **Real estate investors**: compare `pricePerM2` across regions and neighbourhoods, and export the shortlist with coordinates.
- **Agents and brokers**: watch new ads in a neighbourhood with the only-new mode and send them to a CRM or spreadsheet.
- **Demand researchers**: collect wanted requests to see what buyers and tenants ask for, in which city and at what budget.

### ⚙️ Input

| Input | Type | Use |
|---|---|---|
| `operation` | enum | sale, rent, transfer or any |
| `propertyTypes`, `regions`, `cities`, `neighborhoods` | arrays | narrow the place and type |
| `minPrice`, `maxPrice`, `minArea`, `maxArea` | integers | SAR and square meters |
| `recordTypes` | array | listings, wanted-requests, market-stats, locations |
| `onlyNew`, `maxItems` | boolean, integer | monitor mode and cap |

```json
{
  "recordTypes": ["listings"],
  "operation": "rent",
  "propertyTypes": ["apartment"],
  "cities": ["Jeddah"],
  "minPrice": 20000,
  "maxPrice": 60000,
  "maxItems": 50
}
```

### 🔌 Haraj scraper API, MCP and integrations

Run it from any language through the Apify API (curl, Python with apify-client, or JavaScript) with the input above (actor id `RecordsData/haraj-sa-scraper`).

Connect it to Make, Zapier, n8n, Google Sheets or Slack with the standard Apify integrations.

#### Use it from an AI agent (MCP)

Add the Actor to the Apify MCP server at `https://mcp.apify.com?tools=RecordsData/haraj-sa-scraper`. The agent sees one tool with this description: "Scrape real estate ads from haraj.com.sa in Saudi Arabia: offers, wanted requests, market counts and locations, with prices in SAR, area, rooms, coordinates and licence data."

Example agent prompt: "Use the Haraj Saudi Arabia Real Estate Scraper to get 30 apartments for rent in Jeddah between 20,000 and 60,000 SAR, then tell me the median price and the three neighbourhoods with the most ads." The agent fills `operation`, `propertyTypes`, `cities`, `minPrice`, `maxPrice` and `maxItems`, runs the Actor and reads the dataset.

### 💵 How much does it cost?

Pay per event, no start fee, live prices on 2026-10-11:

| Event | Price |
|---|---|
| Listing | $0.02 ($20.00 per 1,000) |
| Wanted request | $0.01 |
| Market count | $0.005 |
| City or neighbourhood | $0.0025 |

Worked examples:

- 1,000 apartment listings: 1,000 x $0.02 = **$20.00**.
- 500 listings plus 200 wanted requests: $10.00 + $2.00 = **$12.00**.
- About 160 cities as location rows: **$0.40**.
- A daily only-new run with 40 new ads: **$0.80**.

Free users get a 10-item preview.

### ⚖️ Is it legal to scrape Haraj?

The Actor reads the public ads that haraj.com.sa shows to every visitor, without logging in or bypassing anything, at about 3 requests per second. Only real estate ads are read. Private sellers' names, mobile numbers, messaging links and e-mails are removed; personal contact fields come out only if you turn on **Include contact details** (off by default). Business data such as the agency name and the REGA licence number are returned. The Haraj terms of use forbid copying ads to republish them elsewhere: use the data for analysis, research, lead qualification and internal tools, and check the terms that apply to you. This is not legal advice.

### FAQ: Haraj scraper questions and answers

**Does the Haraj scraper need a proxy or a Haraj account?**
No. It calls the JSON service behind the website with plain requests, a few at a time with a pause between them. It needs no login, no API key and no proxy, and the cloud runs finished without a single blocked request. You only need an Apify account to start it.

**How many real estate ads does Haraj have?**
On 2026-10-11 the site reported about 142,000 real estate ads in 27 categories: 49,512 apartments for rent, 23,144 plots of land for sale, 21,091 rest houses for rent, 9,692 villas for sale, 8,802 apartments for sale and 7,852 shops for lease transfer. The number moves every day. The market counts record type returns it per category and region or neighbourhood.

**How many results can I get from one search?**
A single Haraj query stops at about 1,000 ads. The Actor notices when a search used up its window and splits it by the 17 Haraj regions, then by neighbourhood. A test run of apartments for rent across the Kingdom delivered 3,000 unique ads from 492 neighbourhoods in 224 seconds. Turn **Split large searches** off to stop at the first window, or narrow the place to a city.

**What is a wanted request?**
A third of the ads on Haraj are people asking for a property ("مطلوب شقة للايجار حي النرجس"). The Actor tells them apart with a keyword rule on the title and the opening of the text, and ads that carry a REGA licence block are always offers. Wanted requests are their own record type with city, neighbourhood, operation, property type and, when the text names one, the `budget`.

**Why is price sometimes a per-square-meter price?**
Haraj stores no price field, so the price comes from the licence block or the advertiser's words. For land, the licence unit price is often per square meter. When a land, commercial land or farm sale shows a licence price under 30,000 SAR and a known area, `price` is the total, and `pricePerM2` and `advertisedPrice` hold the advertised figure. `priceBasis` says `per-m2` or `total`.

**Are the prices always right?**
Not always, because the advertisers type them. The licence block sometimes holds a "1" or a phone number where the price should be. The Actor drops prices outside plausible limits, tries the price written in the ad text, and otherwise leaves `price` out. In a run of 3,000 apartments for rent this removed 32 prices, 1 percent of the ads. `priceSource` says whether the number came from the licence or the text.

**What does pricePeriod mean for rentals?**
Saudi rents are usually quoted per year. For rentals, `pricePeriod` is `year` when the price is 12,000 SAR or more, otherwise the period the ad text states (year, month or day), otherwise `year` from 6,000 SAR. Below that and without a hint the field is left out, because the ad does not say. Sales have no period.

**How accurate are the coordinates?**
Every ad carries a geohash stored by the site, and most licensed ads also carry the map pin the advertiser filed. `locationAccuracy` is `advertiser-pin` or `site-geohash`. In a check of 225 pinned ads, 79 percent had the pin within 200 meters of the geohash; for the rest the pin was kilometres away. Treat `site-geohash` as neighbourhood level, with a median distance of 0.9 km to the neighbourhood centre.

**Does it return phone numbers?**
Not by default. The Actor removes the names and mobile numbers in the licence block, together with numbers typed into the description. With **Include contact details** on, rows add the responsible employee's name and mobile (`contactName`, `contactPhone` in +966 format), the licence holder when it is a person, the Haraj account name and id, and the registration number. Agency names are always returned.

**How do I filter by neighbourhood?**
Put exactly one city in **Cities** (Arabic or English, for example Riyadh) and the neighbourhood in **Neighbourhoods** (with or without the word "حي"). Cities alone scan the whole city. Regions are the 17 Haraj hubs such as Riyadh, Jeddah, Eastern Province or Abha and Aseer. The neighbourhood list for each city comes from the locations record type.

**How do I get only the new Haraj ads every day?**
Turn on **Only new rows** and schedule the Actor. It remembers the ads it already returned for the same search in a store of your own account and skips them, so each run returns just the new ads and you are not charged for skipped rows. Use **Reset monitor memory** to start over, and **Monitor name** to keep several searches apart.

**Which language are the results in?**
Titles, descriptions and place names are Arabic, the language of the site. Region names also come in English (`regionEn`) and the structured values such as operation and property type are English. Search keywords can be Arabic or English, so you can type villa with pool or the Arabic word for furnished. Dates are ISO 8601 in UTC and prices are plain numbers in SAR.

**How do I get help or ask for a missing field?**
Write to contact.punkrecordsdata@gmail.com with the search you ran and the field you need. Bug reports with a run link are the fastest to fix. Tell us the input you used, the date of the run and what you expected to see, and we will check it against the live site and reply by e-mail.

Last updated: 2026-10-11

# Actor input Schema

## `startUrls` (type: `array`):

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.

## `adIds` (type: `array`):

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.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `recordTypes` (type: `array`):

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.

## `splitLargeSearches` (type: `boolean`):

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.

## `locationLevels` (type: `array`):

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).

## `operation` (type: `string`):

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.

## `propertyTypes` (type: `array`):

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.

## `regions` (type: `array`):

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.

## `cities` (type: `array`):

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.

## `neighborhoods` (type: `array`):

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.

## `keyword` (type: `string`):

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.

## `postedWithin` (type: `string`):

Only ads posted or renewed within this window. Haraj itself only lists ads updated in about the last month.

## `minPrice` (type: `integer`):

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.

## `maxPrice` (type: `integer`):

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.

## `minArea` (type: `integer`):

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.

## `maxArea` (type: `integer`):

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.

## `minRooms` (type: `integer`):

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.

## `sellerType` (type: `string`):

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.

## `onlyLicensed` (type: `boolean`):

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.

## `onlyWithImages` (type: `boolean`):

Skip ads that have no photo.

## `onlyWithVideo` (type: `boolean`):

Only ads that have a video.

## `updatedSince` (type: `string`):

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.

## `maxRunSeconds` (type: `integer`):

Stop collecting after this many seconds and return what was gathered, so a very wide search never runs unbounded.

## `onlyNew` (type: `boolean`):

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.

## `stateKey` (type: `string`):

Name of this monitor. Leave empty to derive it from your filters. Use a name to run two monitors with the same filters.

## `resetSeen` (type: `boolean`):

Forget everything this monitor has already seen and start from scratch (the run then returns everything again). Off by default.

## `includeContactDetails` (type: `boolean`):

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.

## Actor input object example

```json
{
  "startUrls": [],
  "adIds": [],
  "maxItems": 10,
  "recordTypes": [
    "listings"
  ],
  "splitLargeSearches": true,
  "locationLevels": [
    "cities"
  ],
  "operation": "any",
  "propertyTypes": [],
  "regions": [],
  "cities": [],
  "neighborhoods": [],
  "keyword": "",
  "postedWithin": "any",
  "minPrice": 0,
  "maxPrice": 0,
  "minArea": 0,
  "maxArea": 0,
  "minRooms": 0,
  "sellerType": "any",
  "onlyLicensed": false,
  "onlyWithImages": false,
  "onlyWithVideo": false,
  "updatedSince": "",
  "maxRunSeconds": 1800,
  "onlyNew": false,
  "stateKey": "",
  "resetSeen": false,
  "includeContactDetails": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per row

## `fullData` (type: `string`):

Complete dataset with all fields

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [],
    "adIds": [],
    "maxItems": 10,
    "recordTypes": [
        "listings"
    ],
    "locationLevels": [
        "cities"
    ],
    "operation": "any",
    "cities": [],
    "neighborhoods": [],
    "postedWithin": "any",
    "sellerType": "any"
};

// Run the Actor and wait for it to finish
const run = await client.actor("recordsdata/haraj-sa-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [],
    "adIds": [],
    "maxItems": 10,
    "recordTypes": ["listings"],
    "locationLevels": ["cities"],
    "operation": "any",
    "cities": [],
    "neighborhoods": [],
    "postedWithin": "any",
    "sellerType": "any",
}

# Run the Actor and wait for it to finish
run = client.actor("recordsdata/haraj-sa-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [],
  "adIds": [],
  "maxItems": 10,
  "recordTypes": [
    "listings"
  ],
  "locationLevels": [
    "cities"
  ],
  "operation": "any",
  "cities": [],
  "neighborhoods": [],
  "postedWithin": "any",
  "sellerType": "any"
}' |
apify call recordsdata/haraj-sa-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,recordsdata/haraj-sa-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IR9871FKHZD2qPhpg/builds/hjZppbrZNngtWEBUo/openapi.json
