# Haraj Scraper - Saudi Classifieds Listings (حراج) (`dottti/haraj-listings`) Actor

Listings from Haraj.com.sa by keyword, category, city, seller or link: title, price in SAR, city, tags, dates, images, description, comments, seller username, car make, model, year and mileage. New-listing alerts. No login.

- **URL**: https://apify.com/dottti/haraj-listings.md
- **Developed by:** [Dottti](https://apify.com/dottti) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 1,000 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

## Haraj Scraper: Saudi Classifieds Listings (حراج)

Get listings from [Haraj.com.sa](https://haraj.com.sa/), the largest classifieds site in Saudi Arabia. Search by keyword, category, city or seller, or paste Haraj links. You get one clean row per listing: title, price in SAR, city and neighborhood, tags, posted and updated dates, link, all photos, the full description, comment count and the seller's public username. Car listings also get make, model, year and mileage.

No login, no cookies, no browser.

### Who it is for

- **Car dealers and buyers** who watch prices for a make and model in their city.
- **Real estate agents and investors** who track new rentals and land offers by area.
- **Price watchers** who want an alert when a new listing matches their search.
- **Analysts and researchers** who study prices and supply in the Saudi second-hand market.

### What you can search

| Input | Example | What happens |
|---|---|---|
| Keyword | `كامري`, `ايفون 15`, `شقة للايجار` | Haraj's own search, newest first. |
| Category | `cars`, `real_estate`, `devices` | One of the 21 main Haraj sections. |
| Tag | `تويوتا`, `كامري`, `شقق للايجار` | A narrower Haraj tag, as the site spells it. |
| City | `Riyadh`, `Jeddah`, `Dammam`, `Eastern Province`, `الرياض`, `جده` | English or Arabic. Region names (Eastern Province, Qassim) cover all their cities. |
| Seller username | `fros07` | Only that seller's live listings. |
| Haraj links | `https://haraj.com.sa/tags/حراج السيارات`, `https://haraj.com.sa/city/الرياض`, `https://haraj.com.sa/search/كامري`, `https://haraj.com.sa/users/fros07`, `https://haraj.com.sa/11191990880/...` | Each link runs as its own search. A listing link returns that one listing. |

Keyword, category or tag, city and seller work together. For example: keyword `كامري` in city `Jeddah`.

Filters: **posted within N days** and **only listings with images**.

Empty input runs a short demo: the 20 newest car listings in Riyadh.

#### Input example

```json
{
    "keyword": "كامري",
    "city": "Jeddah",
    "postedWithinDays": 3,
    "maxResults": 200
}
```

### Output

One row per listing. Example from a real run (2026-11-04), photos and description shortened:

```json
{
  "type": "listing",
  "id": 191991484,
  "title": "تويوتا كامري 2016 ليمتد فل كامل   نظيفة   40 000 ريال",
  "price": 45000,
  "priceText": "45,000",
  "currency": "SAR",
  "city": "جده",
  "area": null,
  "neighborhood": "السروات",
  "category": "حراج السيارات",
  "tags": ["حراج السيارات", "تويوتا", "كامري", "كامري 2016"],
  "postedAt": "2026-11-04T16:25:51.000Z",
  "updatedAt": "2026-11-04T16:25:51.000Z",
  "url": "https://haraj.com.sa/11191991484/تويوتا_كامري_2016_ليمتد_فل_كامل_نظيفة_40_000_ريال/",
  "imageUrls": ["https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-04/1350x1800_5155F0CA-F26C-4932-B3F2-529DABF371D7.jpg"],
  "imageCount": 9,
  "hasVideo": false,
  "description": "للبيع تويوتا كامري 2016 فئة ليمتد (Limited)\n\nالسيارة بحالة جيدة جدًا ...",
  "contactsRemoved": 0,
  "commentCount": 0,
  "sellerUsername": "azzaamekkeri",
  "sellerUrl": "https://haraj.com.sa/users/azzaamekkeri",
  "carMake": "تويوتا",
  "carMakeEn": "Toyota",
  "carModel": "كامري",
  "carModelEn": "Camry",
  "carYear": 2016,
  "mileageKm": 300000,
  "fuel": "GASOLINE",
  "gear": "AUTO",
  "condition": "USED",
  "saleType": "SELL",
  "regaAdLicense": null,
  "input": "keyword \"كامري\", city \"جده\""
}
```

A real estate row has `regaAdLicense`, the REGA ad licence number shown on the listing (for example `"7100347247"`). With **Include comments** on, a row also gets its comments:

```json
"comments": [
  { "id": 569756995, "date": "2026-11-04T15:54:07.000Z", "bySeller": false, "isReply": false,
    "text": "فيه غرفتين وصاله طالب اجنبي ب 2000 توصل معي واتس [phone removed]" }
]
```

Field notes:

- `title` and `description` stay in Arabic as the seller wrote them.
- `price` is the number the seller entered, in SAR. Many Haraj sellers leave the price empty. Then `price` is null and the price may be in the title or description.
- `city` is Haraj's city or region. `area` is the smaller city inside a region when Haraj gives one (for example `الخبر` inside `الشرقيه`). `neighborhood` is the district.
- `category` is the main Haraj section. `tags` is the full tag path from Haraj.
- `mileageKm` comes from Haraj's mileage field, which Haraj saves in thousands of km.
- `carMakeEn` and `carModelEn` are Haraj's own English names for the tags.

#### Privacy

The actor returns public listing data only. It does not return phone numbers, seller ids or private data. Phone numbers, e-mail addresses and WhatsApp or Telegram links inside titles, descriptions and comments are replaced with `[phone removed]` or `[contact removed]`. `contactsRemoved` counts how many were removed. Comments carry no commenter names; `bySeller` says whether the seller wrote it.

#### Status rows

Every input that returns no listings, or stops early at your max cost, gets a free row with `"type": "status"` and a `status` of `no_results`, `not_found`, `no_new_listings`, `invalid_input`, `blocked`, `api_error`, `cut_by_cost_limit`, `skipped_cost_limit` or `skipped_max_results`, plus a plain-English `error`. Status rows are never charged. The run summary (key-value store record `RUN_SUMMARY`) lists every input, the listings matched, pages read and requests used.

### Alerts for new listings

Turn on **Only new listings (alert mode)** and schedule the actor (for example every hour). The first run delivers the current listings and saves them. Each later run delivers only listings posted after the last run, for the same search and filters. Give each schedule its own **Alert list name** so lists stay separate. You pay only for new listings.

To schedule: open the actor in Apify Console, save your input as a task, then add a schedule under **Schedules**. Connect a webhook, email, Slack or Google Sheets integration to get the new rows.

### Pricing

Pay per listing delivered. Platform usage is included in the price. Photos, description and car fields are included. Comments are an optional extra event, charged only for listings that have comments. Status rows are free. You can set a maximum cost per run in Apify Console. The actor stops cleanly at that limit.

### Speed and limits

- About 60 listings per request. A run of 1,000 listings takes under a minute.
- Haraj shows up to about 3,000 listings per search (50 pages). For more, split the search by city or tag.
- Haraj search results are close to newest first. Category, city and seller lists are strictly newest first.
- Only live listings are returned. Sold or deleted listings return a `not_found` status row.
- The actor sends one request at a time with a short pause. If Haraj limits the connection, it waits, retries and moves to Apify datacenter, then residential proxy.
- Seller phone numbers are not collected.

# Actor input Schema

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

Optional. Words to search for, in Arabic or English, as you would type them on Haraj: كامري, ايفون 15, شقة للايجار, land cruiser. Works together with category, city and seller. Empty input runs a demo: the 20 newest car listings in Riyadh.

## `category` (type: `string`):

Optional. Haraj main section.

## `tag` (type: `string`):

Optional. A Haraj tag as the site spells it, for a narrower section: تويوتا, كامري, شقق للايجار, جوالات. Overrides Category.

## `city` (type: `string`):

Optional. City or region in English or Arabic: Riyadh, Jeddah, Makkah, Madinah, Dammam, Khobar, Eastern Province, Qassim, Abha, Tabuk, الرياض, جده, الشرقيه.

## `sellerUsername` (type: `string`):

Optional. Only listings of this seller, by the public username shown on Haraj (the part after haraj.com.sa/users/).

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

Optional. One per line: listing links (haraj.com.sa/11191990880/...), tag links (haraj.com.sa/tags/حراج السيارات), city links (haraj.com.sa/city/الرياض), search links (haraj.com.sa/search/كامري) or seller links (haraj.com.sa/users/name). Each link runs as its own search, next to the filters above.

## `postedWithinDays` (type: `integer`):

Optional. Only listings posted in the last N days. 0 means any date.

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

Skip listings that have no photos.

## `maxResults` (type: `integer`):

Most listings to deliver in this run, across all searches. Newest first. Haraj shows up to about 3,000 listings per search; split by city or tag for more.

## `includeComments` (type: `boolean`):

One extra request per listing that has comments, to add the comment text and dates. Commenter names are left out, and phone numbers are removed. Charged as a separate event only for listings that have comments.

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

Remembers the listings each search returned last time and delivers only new ones on the next run. Schedule the actor for alerts. The first run delivers everything and saves the baseline. You pay only for new listings.

## `stateName` (type: `string`):

Name for the saved only-new list, so several schedules (for example 'camry-riyadh' and 'villas-jeddah') keep separate memories.

## `proxyConfiguration` (type: `object`):

Optional. Leave empty: the actor starts without a proxy and moves to Apify datacenter, then residential proxy only if Haraj limits it. Set your own proxy here to use only that.

## `autoProxyFallback` (type: `boolean`):

Move to Apify Proxy when Haraj limits the direct connection.

## `allowResidentialFallback` (type: `boolean`):

Let the fallback use residential proxy as the last step. Residential traffic is included in the price.

## `maxRetries` (type: `integer`):

Retries for each request on rate limits, server errors or network errors, with growing waits.

## Actor input object example

```json
{
  "category": "cars",
  "city": "Riyadh",
  "postedWithinDays": 0,
  "onlyWithImages": false,
  "maxResults": 20,
  "includeComments": false,
  "onlyNew": false,
  "stateName": "default",
  "autoProxyFallback": true,
  "allowResidentialFallback": true,
  "maxRetries": 4
}
```

# Actor output Schema

## `results` (type: `string`):

All rows. Filter by the type field.

## `runSummary` (type: `string`):

Status per input, listings matched, requests, bytes and proxy tier used.

# 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 = {
    "category": "cars",
    "city": "Riyadh",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("dottti/haraj-listings").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 = {
    "category": "cars",
    "city": "Riyadh",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("dottti/haraj-listings").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 '{
  "category": "cars",
  "city": "Riyadh",
  "maxResults": 20
}' |
apify call dottti/haraj-listings --silent --output-dataset

```

## MCP server setup

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

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/MigThS2sp46qac3Vh/builds/I7Kw8e5juD0iTTihj/openapi.json
