# OpenSooq Scraper | Cars, Real Estate & More (20 Countries) (`zen-studio/opensooq-scraper`) Actor

Scrape OpenSooq listings across Saudi Arabia, UAE, Jordan, Egypt and 16 more MENA countries. 55 fields per listing: price, location, seller details, structured attributes, AI tags, images. Cars, real estate, electronics, jobs. Filter by city, category, price range. No login required.

- **URL**: https://apify.com/zen-studio/opensooq-scraper.md
- **Developed by:** [Zen Studio](https://apify.com/zen-studio) (community)
- **Categories:** Lead generation, E-commerce, Real estate
- **Stats:** 35 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

$29.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## OpenSooq Scraper | MENA Classifieds Data Extraction Across 20 Countries (2026)

Extract structured listing data from OpenSooq, the largest classifieds marketplace in the Middle East and North Africa. Covers 20 countries from Saudi Arabia and UAE to Egypt and Morocco. Returns 55 data fields per listing with zero data loss -- every property the platform provides, including structured attributes, AI-generated tags, seller details, and contact information.

[![Demo](https://asciinema.org/a/DctGfDUk5P1DDK2K.svg)](https://asciinema.org/a/DctGfDUk5P1DDK2K)

No OpenSooq account required. No cookies, no browser, no login.

> **Free tier:** 5 runs included — try it before subscribing.

<table><tr>
<td style="border-left:4px solid rgb(76,148,94);padding:12px 16px;font-weight:600">1,000 listings in under 60 seconds — hands down the richest output on Apify.</td>
</tr></table>

#### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
zen-studio/opensooq-scraper on Apify. Call: ApifyClient("TOKEN").actor("zen-studio/opensooq-scraper").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: site (string, required: "jo"|"sa"|"ae"|"kw"|etc, 20 countries), query (string), maxItems (integer, default 100). Full actor spec (input schema with all params/enums/defaults, output dataset fields, README): GET https://api.apify.com/v2/acts/zen-studio~opensooq-scraper/builds/default (Bearer TOKEN) → inputSchema, actorDefinition.storages.dataset, readme. Pricing: rental $29/month, unlimited listings and runs, all 20 countries. Get token: https://console.apify.com/account/integrations
```

### Rental Pricing

**$29 per month** -- unlimited listings, unlimited runs, all 20 countries.

- Scrape up to 50,000 listings per run
- All filtering options included
- Optional detail page enrichment for full descriptions and image galleries
- Cancel anytime

### Quick Start

#### Basic -- Search Cars in Saudi Arabia

```json
{
    "site": "sa",
    "query": "cars",
    "maxItems": 100
}
```

#### Advanced -- Filtered Real Estate in Amman

```json
{
    "site": "jo",
    "query": "apartment",
    "category": "7713",
    "city": "Amman",
    "priceFrom": 30000,
    "priceTo": 100000,
    "hasImages": true,
    "sortBy": "recent",
    "maxItems": 500
}
```

#### Complete -- All Options

```json
{
    "site": "jo",
    "query": "bmw",
    "category": "1775",
    "city": "Amman",
    "neighborhood": "Swelieh",
    "sortBy": "price-",
    "priceFrom": 5000,
    "priceTo": 25000,
    "hasImages": true,
    "hasPrice": true,
    "isShop": false,
    "fetchDetails": true,
    "maxItems": 1000,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "JO"
    }
}
```

### Input Parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `site` | Dropdown | Country site to scrape (see Supported Countries) | `sa` (Saudi Arabia) |
| `query` | String | Search keywords. Leave empty to browse all listings. | `""` |
| `category` | Dropdown | Filter by category (see list below). Leave empty for all. | All categories |
| `city` | String | City name (English, Arabic, or numeric ID). Leave empty for all cities. | -- |
| `neighborhood` | String | Neighborhood name or numeric ID. Requires a city. | -- |
| `sortBy` | Dropdown | Sort order: `recent`, `default`, `price-`, `price+` | `recent` |
| `priceFrom` | Integer | Minimum price filter. Optional. | -- |
| `priceTo` | Integer | Maximum price filter. Optional. | -- |
| `hasImages` | Boolean | Only listings with images | `false` |
| `hasPrice` | Boolean | Only listings with a listed price | `false` |
| `isShop` | Boolean | Only shop/business listings | `false` |
| `fetchDetails` | Boolean | Fetch detail pages for full description and all images. Slower. | `true` |
| `maxItems` | Integer | Maximum listings to scrape (1 - 50,000) | `100` |
| `proxyConfiguration` | Object | Proxy settings. Residential proxy recommended. | Apify residential |

#### Categories

Select from the dropdown in Apify Console, or use the ID in API calls. Category IDs work across all 20 countries -- the scraper automatically resolves them to each country's internal IDs.

| Category | ID |
|----------|----|
| Autos | 1775 |
| Mobile - Tablet | 5505 |
| Gaming & Toys | 2143 |
| Computers & Laptops | 13741 |
| Electronics & Appliances | 2131 |
| Property For Sale | 7713 |
| Property For Rent | 8035 |
| Home & Garden | 2181 |
| Fashion And Kids | 54963 |
| Beauty & Health | 54965 |
| Food - Supplements | 7105 |
| Services | 88 |
| Jobs | 15981 |
| Pets & Accessories | 4275 |
| Leisure & Collectibles | 15061 |
| Sports & Fitness | 15101 |
| Businesses & Equipment | 5141 |

#### City and Neighborhood Input

Type a city name in English (e.g., `Amman`), Arabic (e.g., `عمان`), or pass a numeric ID directly. Fuzzy matching is built in -- `Riyadh` auto-resolves to `Al Riyadh`. Neighborhoods work the same way but require a city to be set first.

The full list of 600 cities across all 20 countries is available in the [cities\_by\_country.json](https://github.com/zen-studio/apify-opensooq-scraper/blob/master/misc/cities_by_country.json) reference file. Common cities:

**Jordan**: Amman (59), Irbid (60), Zarqa (83), Aqaba (61), Salt (92)

**Saudi Arabia**: Al Riyadh (24), Jeddah (26), Dammam (25), Mecca (29), Medina (30)

**UAE**: Dubai (19), Abu Dhabi (17), Sharjah (20), Ajman (18), Al Ain (21)

**Egypt**: Cairo (2), Alexandria (3), Giza (4), Mansoura (146)

**Kuwait**: Kuwait City (50), Hawally (52), Farwaniya (53)

### Output Data

Each listing includes up to 55 fields organized into these groups:

**Core** -- `id`, `title`, `descriptionPreview`, `fullDescription`, `url`

**Price** -- `price` (formatted with currency symbol), `currency` (ISO code)

**Location** -- `city`, `cityId`, `cityReporting`, `neighborhood`, `neighborhoodId`, `neighborhoodReporting`

**Category** -- `category`, `categoryCode`, `categoryUri`, `subcategory`, `subcategoryCode`, `subcategoryUri`

**Images and Media** -- `imageUrl`, `imageCount`, `hasVideo`, `has360`, `hasYoutube`, `hasReels`, `reels`

**Seller** -- `memberId`, `memberName`, `memberUsername`, `memberAvatarUrl`, `memberRating`, `memberRatingCount`, `memberBadges`, `verificationLevel`

**Contact** -- `phone` (masked), `hasPhone`, `phoneRevealKey`

**Dates and Status** -- `postedAt`, `insertedDate`, `expiredAt`, `isActive`, `listingStatus`, `userTargetType`, `postBadges`

**Structured Attributes** -- `highlightsSummary` (one-line summary), `highlights` (structured key-value attributes like make, model, year, bedrooms, area), `aiTags` (AI-generated classification tags), `cps` (compact property strings)

**Internal** -- `booleans`, `unitsObj`, `addons`, `sliderActions`, `shareDeepLink`, `bookmarkStatus`

**Detail Enrichment** (when `fetchDetails` is enabled) -- `fullDescription`, `allImages`

**Meta** -- `scrapedAt` (ISO 8601 timestamp)

#### Output Example -- Real Estate with Detail Enrichment

```json
{
  "id": 276150375,
  "title": "190 m2 3 Bedrooms Apartments for Sale in Zarqa Dahiet Al Madena Al Monawwara",
  "descriptionPreview": "شقة طابقية مميزة تشطيبات فندقية عالية الجودة مكونة من 3 غرف نوم منهم واحدة ماستر و3 حمامات وغرفة ضيوف ومطبخ وصالة واسعة وبلكونة…",
  "url": "https://jo.opensooq.com/search/276150375",
  "price": "66,000 JOD",
  "currency": "JOD",
  "city": "Zarqa",
  "cityId": "83",
  "cityReporting": "Zarqa",
  "neighborhood": "Dahiet Al Madena Al Monawwara",
  "neighborhoodId": "7065",
  "neighborhoodReporting": "Dahiet Al Madena Al Monawwara",
  "category": "Property For Sale",
  "categoryCode": "RealEstateForSale",
  "categoryUri": "property/property-for-sale",
  "subcategory": "Apartments for Sale",
  "subcategoryCode": "ApartmentsForSale",
  "subcategoryUri": "apartments-for-sale",
  "imageUrl": "https://opensooq-images.os-cdn.com/previews/700x0/a9/ab/a9abf520684bb5399eb5f27fc4620d01dc354b6e19860aa901257c8343f65565.jpg",
  "imageCount": 26,
  "hasVideo": 1,
  "has360": 0,
  "hasYoutube": 0,
  "hasReels": 1,
  "reels": [
    {
      "id": "1550824081",
      "mime_type": "video/mp4",
      "uri": "ad/dc/addc438dec48adc1727c1da2197e5613e34f0fa4.mp4"
    }
  ],
  "memberId": "4180997",
  "memberName": "mohamad abo khadra",
  "memberUsername": "mohammad_abokhadra",
  "memberAvatarUrl": "https://opensooq-images.os-cdn.com/previews/200x0/dd/f8/ddf8498eaf0b99c16a48fca036336c004f63da2d3357740572788b8d57379243.jpg",
  "memberRating": 5,
  "memberRatingCount": 7,
  "memberBadges": [],
  "verificationLevel": 0,
  "phone": "07996786XX",
  "hasPhone": 1,
  "phoneRevealKey": "0cd4416532a0ce20860ce546ba8dc236",
  "postedAt": "",
  "insertedDate": "2026-01-23",
  "expiredAt": "24-03-2026",
  "isActive": true,
  "listingStatus": "reposted",
  "userTargetType": "free",
  "postBadges": [
    "add_on_chat"
  ],
  "highlightsSummary": "3 Bedrooms » 3 Bathrooms » 190 m2",
  "highlights": {
    "Rooms": [
      {
        "id": 2481,
        "field_id": 17,
        "value": "3",
        "label": "3 Bedrooms"
      }
    ],
    "Bathrooms": [
      {
        "id": 2519,
        "field_id": 25,
        "value": "3",
        "label": "3 Bathrooms"
      }
    ],
    "Furnished_RealEstate": [
      {
        "id": 4729,
        "field_id": 101,
        "value": "Not furnished",
        "label": "Unfurnished"
      }
    ],
    "Surface": [
      {
        "id": 31,
        "value": "190",
        "label": "Surface Area"
      }
    ],
    "Floors": [
      {
        "id": 2505,
        "field_id": 21,
        "value": "2",
        "label": "Second Floor"
      }
    ],
    "Age_RealEstate": [
      {
        "id": 6139,
        "field_id": 73,
        "value": "Under Construction",
        "label": "Under Construction"
      }
    ],
    "Main_amenities": [
      {
        "id": 834,
        "label": "Main Amenities"
      }
    ]
  },
  "aiTags": [
    "section: real estate",
    "category: apartment",
    "type: residential apartements",
    "listing_type: rent",
    "lister_type: agent",
    "floor: not specified",
    "area_sqm: wide",
    "bedrooms: 3",
    "features: high quality finishes",
    "features: stone facades",
    "features: double glazed windows",
    "features: electric shutters",
    "features: stainless steel railings",
    "features: Italian elevator",
    "bathrooms: 3",
    "year_built: not specified",
    "has_balcony: true",
    "has_parking: not specified",
    "location_ar: موقع مميز وهادئ بجانب الخدمات",
    "location_en: Quiet prime location near amenities",
    "has_elevator: true",
    "has_security: true",
    "is_furnished: true",
    "has_electricity: true",
    "has_water_supply: true"
  ],
  "cps": [
    "3 Bedrooms ",
    "3 Bathrooms ",
    "Unfurnished ",
    "Surface Area: 190 m2",
    "Second Floor ",
    "Building Age: Under Construction "
  ],
  "booleans": [],
  "unitsObj": {
    "Surface": {
      "id": 1,
      "index": 4
    }
  },
  "addons": {
    "contact": {
      "chat": true
    }
  },
  "sliderActions": [
    "call",
    "chats"
  ],
  "shareDeepLink": "https://opensooq.com/site/dl?requestUri=${utm}$jo/post/276150375",
  "bookmarkStatus": 0,
  "fullDescription": "شقة طابقية مميزة تشطيبات فندقية عالية الجودة مكونة من 3 غرف نوم منهم واحدة ماستر و3 حمامات وغرفة ضيوف ومطبخ وصالة واسعة وبلكونة مطلة على واجهات حجرية فاخرة مع شبابيك دبل جلاس وشتر كهربائي ودرابزين ستانلس ستيل ومصعد ايطالي وخزان ماء علوي",
  "allImages": [
    "https://opensooq-images.os-cdn.com/previews/2000x0/a9/ab/a9abf520684bb5399eb5f27fc4620d01dc354b6e19860aa901257c8343f65565.jpg"
  ],
  "scrapedAt": "2026-02-06T06:47:20.418184+00:00"
}
```

### Supported Countries

| Code | Country | Currency | Cities |
|------|---------|----------|--------|
| `jo` | Jordan | JOD | 14 |
| `sa` | Saudi Arabia | SAR | 158 |
| `ae` | UAE | AED | 8 |
| `kw` | Kuwait | KWD | 6 |
| `bh` | Bahrain | BHD | 5 |
| `om` | Oman | OMR | 9 |
| `qa` | Qatar | QAR | 8 |
| `iq` | Iraq | IQD | 18 |
| `eg` | Egypt | EGP | 32 |
| `ye` | Yemen | YER | 23 |
| `ly` | Libya | LYD | 58 |
| `sd` | Sudan | SDG | 21 |
| `lb` | Lebanon | USD | 26 |
| `ps` | Palestine | ILS | 12 |
| `sy` | Syria | SYP | 14 |
| `dz` | Algeria | DZD | 48 |
| `ma` | Morocco | MAD | 27 |
| `tn` | Tunisia | TND | 25 |
| `tr` | Turkey | TRY | 81 |
| `mr` | Mauritania | MRO | 7 |

Full city list with IDs and Arabic names: [cities\_by\_country.json](https://github.com/zen-studio/apify-opensooq-scraper/blob/master/misc/cities_by_country.json)

### How to Scrape OpenSooq Listings with the API

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("your_api_token")

run = client.actor("zen-studio/opensooq-scraper").call(run_input={
    "site": "sa",
    "query": "apartment",
    "city": "Riyadh",
    "category": "7713",
    "priceFrom": 100000,
    "maxItems": 500,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} - {item['price']} in {item['city']}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'your_api_token' });

const run = await client.actor('zen-studio/opensooq-scraper').call({
    site: 'jo',
    query: 'iphone',
    hasImages: true,
    sortBy: 'recent',
    maxItems: 200,
    proxyConfiguration: {
        useApifyProxy: true,
        apifyProxyGroups: ['RESIDENTIAL']
    }
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Found ${items.length} listings`);
```

### Advanced Usage

#### Scrape All Cars in a City with Price Filter

```json
{
    "site": "jo",
    "query": "cars",
    "category": "1775",
    "city": "Amman",
    "priceFrom": 5000,
    "priceTo": 20000,
    "hasImages": true,
    "sortBy": "price-",
    "maxItems": 5000
}
```

#### Scrape Electronics Across Multiple Countries

Run separate Actor calls for each country with the same query:

```json
{
    "site": "ae",
    "query": "iphone 15",
    "hasPrice": true,
    "sortBy": "recent",
    "maxItems": 1000
}
```

#### Full Data Extraction with Detail Pages

Enable `fetchDetails` for the complete description and all image URLs. This is slower (fetches each listing's detail page) but provides the most complete data:

```json
{
    "site": "sa",
    "query": "villa",
    "fetchDetails": true,
    "maxItems": 200
}
```

### Technical Requirements

- **Memory**: 512 MB (default). Sufficient for up to 50,000 listings.
- **Proxy**: Residential proxy recommended for reliable results. Included in default configuration.
- **Rate limits**: Built-in retry logic with exponential backoff. No configuration needed.
- **Run time**: ~1 minute per 1,000 listings without detail enrichment. ~3-5 minutes per 1,000 with `fetchDetails` enabled.

#### Proxy Configuration

Residential proxy is recommended and pre-configured by default:

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "SA"
    }
}
```

Set `apifyProxyCountry` to match your target country code (e.g., `"JO"`, `"AE"`, `"EG"`) for best results.

### Data Export

- **JSON** -- structured data for programmatic use
- **CSV** -- flat tables for spreadsheets and BI tools
- **Excel** -- direct download from Apify Console
- **API** -- stream results directly into your pipeline

### Automation

- **Scheduled runs** -- set daily, weekly, or custom schedules in Apify Console
- **Webhooks** -- get notified when a run completes
- **API triggers** -- start runs programmatically from your application
- **Integrations** -- connect to Google Sheets, Slack, Zapier, and more through Apify integrations

### Combine it with more data sources

For Saudi Arabia specifically, combine OpenSooq data with the [Haraj classifieds scraper](/zen-studio/haraj-scraper) or the [Mahally e-commerce scraper](/zen-studio/mahally-scraper) for commerical products with seller contacts.

### FAQ

**What data does the OpenSooq Scraper extract?**
55 fields per listing: title, price, location (city + neighborhood), category hierarchy, seller details (name, rating, verification), phone number (masked), structured attributes (make, model, year, bedrooms, area, etc.), AI-generated tags, media flags, listing status, dates, and more. Enable `fetchDetails` for full description text and all gallery images.

**Do I need an OpenSooq account?**
No. The scraper handles authentication automatically. No login, no cookies, no browser required.

**How many listings can I scrape?**
Up to 50,000 per run. Pagination is handled automatically.

**Which countries are supported?**
All 20 OpenSooq markets: Jordan, Saudi Arabia, UAE, Kuwait, Bahrain, Oman, Qatar, Iraq, Egypt, Yemen, Libya, Sudan, Lebanon, Palestine, Syria, Algeria, Morocco, Tunisia, Turkey, and Mauritania.

**What are the `highlights` and `aiTags` fields?**
`highlights` contains structured key-value attributes specific to the listing's category -- for cars: make, model, year, mileage, transmission; for real estate: bedrooms, bathrooms, floor area, furnished status. `aiTags` are OpenSooq's own AI-generated classification labels like brand, condition, listing type, and features.

**Are phone numbers fully visible?**
Phone numbers are masked by OpenSooq (last 2 digits hidden, e.g., `07956790XX`). The `phoneRevealKey` field is included for reference but the full number requires authenticated access on the OpenSooq platform.

**What does `fetchDetails` do?**
When enabled, the scraper visits each listing's detail page to extract the full untruncated description and all gallery image URLs at full resolution (2000px). This makes the run slower but provides the most complete data.

**How fast is it?**
Approximately 5,000 listings per minute without detail enrichment. With `fetchDetails` enabled, approximately 1,000 listings per minute due to individual page fetches.

**Can I filter by specific attributes like car make or number of bedrooms?**
The search query and category/city/price filters are supported as input parameters. For attribute-specific filtering (e.g., "only BMW" or "3+ bedrooms"), use the search query to narrow results, then filter the output data using the structured `highlights` field.

**Is the data returned in Arabic or English?**
Listing content (titles, descriptions) is in whatever language the seller used -- typically Arabic for most MENA markets. Field names, category labels, and city names are in English.

### Getting Started

1. **Open the Actor** in Apify Console
2. **Select a country** from the dropdown (default: Saudi Arabia)
3. **Enter a search query** or leave empty to browse all listings
4. **Set filters** -- city, category, price range, images only
5. **Set maximum results** (default: 100)
6. **Click Start** and download results in JSON, CSV, or Excel

### Disclaimer

Data is collected from publicly available sources and provided "as is" for informational purposes. Users are responsible for compliance with OpenSooq's terms of service and applicable regulations in their jurisdiction.

***

[**Start Scraping OpenSooq Listings Now**](https://console.apify.com/actors/kxgRUK3KsSS8o1Esy)

***

*Structured MENA marketplace data for research, analytics, and business intelligence.*

# Actor input Schema

## `site` (type: `string`):

Which OpenSooq country site to scrape

## `query` (type: `string`):

Text to search for (e.g., 'iphone', 'apartment', 'bmw'). Leave empty to browse all listings.

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

Filter by category. Leave empty for all categories.

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

City name (e.g., 'Amman', 'Riyadh', 'عمان') or numeric city ID. Leave empty for all cities. See README for full city ID list.

## `neighborhood` (type: `string`):

Neighborhood name or numeric ID. Requires a city to be set. Leave empty for all neighborhoods. See README for ID reference.

## `sortBy` (type: `string`):

Sort order for results

## `priceFrom` (type: `integer`):

Minimum price filter. Optional.

## `priceTo` (type: `integer`):

Maximum price filter. Optional.

## `hasImages` (type: `boolean`):

Only return listings that have images

## `hasPrice` (type: `boolean`):

Only return listings that have a listed price

## `isShop` (type: `boolean`):

Only return listings from shops/businesses

## `fetchDetails` (type: `boolean`):

Fetch detail page for each listing to get full description and all images. Slower but more complete data.

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

Maximum number of listings to scrape

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

Proxy to use for requests. Residential proxy recommended for reliable results.

## Actor input object example

```json
{
  "site": "sa",
  "query": "cars",
  "category": "",
  "sortBy": "recent",
  "hasImages": false,
  "hasPrice": false,
  "isShop": false,
  "fetchDetails": true,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SA"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "site": "sa",
    "query": "cars",
    "sortBy": "recent",
    "fetchDetails": true,
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "SA"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zen-studio/opensooq-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 = {
    "site": "sa",
    "query": "cars",
    "sortBy": "recent",
    "fetchDetails": True,
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "SA",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("zen-studio/opensooq-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 '{
  "site": "sa",
  "query": "cars",
  "sortBy": "recent",
  "fetchDetails": true,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SA"
  }
}' |
apify call zen-studio/opensooq-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zen-studio/opensooq-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/kxgRUK3KsSS8o1Esy/builds/ziNQWfSN1Fp5boHNA/openapi.json
