# Qatar Sale Scraper (`dadhalfdev/qatarsale-scraper`) Actor

Scrape cars and classifieds from qatarsale.com. Use filters or paste a Qatar Sale URL — the URL wins when set. Returns price (QAR), make, year, mileage, and photos.

- **URL**: https://apify.com/dadhalfdev/qatarsale-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## 🇶🇦 Qatar Sale Scraper

Want [Qatar Sale](https://qatarsale.com/en/products/cars_for_sale) cars and classifieds in a spreadsheet? This scraper makes it easy.

Use **structured filters** (category, make, price, year) — structured filters work better for AI agents — **or** paste an **`input_url`** from Qatar Sale once you've already filtered in the browser. When `input_url` is set it overrides the filters below.

Qatar Sale currently lists about **26,000 cars for sale**, **2,100 cars for rent**, plus furniture, electronics, plates, and parts. This actor returns up to 2000 rows per run.

### 💡 Perfect for...

- **Dealers and buyers:** Export Toyota, Lexus, Nissan, and other Qatar inventory with QAR asking prices.
- **Dashboards:** Track sale vs rent stock without paging through qatarsale.com.
- **Classifieds research:** Pull furniture, electronics, special numbers, or spare parts from the same marketplace.
- **Data analysts:** Export structured listing rows with public Qatar Sale URLs.
- **🤖 AI Agents:** Power Claude, Cursor, Codex, the Hermes Agent, and OpenClaw workflows with live Qatar Sale results.
- **📚 RAG Systems:** Feed titles, makes, and prices into retrieval pipelines.
- **🔗 AI Workflows:** Plug into LangChain, AutoGPT, CrewAI, and similar stacks.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a Qatar Sale products or product URL (`input_url`) if you already filtered in the browser, or use structured filters (better for AI agents). `input_url` always wins when set.
- 🎯 **Website-Matched Filters:** Same category and make paths as `/en/products/{category}/{make}`.
- 🌐 **Qatar marketplace:** Titles, QAR prices, make/model/year, mileage, gearbox, photos, and map coordinates when published.

### 📦 What's inside the data?

Every row includes all of these fields:

- **Core:** `id`, `url`, `title`, `category`, `category_uri`, `purpose`, `slug`, `owner_id`
- **Price:** `price`, `currency` (QAR)
- **Car specs:** `make`, `model_class`, `model`, `year`, `mileage_km`, `gearbox`, `cylinders`, `condition`
- **Status / media:** `is_promoted`, `is_pinned`, `is_sold`, `is_business`, `view_count`, `images_count`, `image_url`, `created_at`, `listed_ago`
- **Location:** `latitude`, `longitude`
- **Raw specs:** `definitions` (Make, Class, Model, Year, Mileage, Gear Type, Cylinder)

### 🚀 Quick start

**Option A — Input URL**

1. Open [Cars for sale](https://qatarsale.com/en/products/cars_for_sale), apply filters, copy the URL — e.g. `https://qatarsale.com/en/products/cars_for_sale/toyota`.
2. Paste it into `input_url`.
3. Set `max_results` and click **Start**.

**Option B — Structured filters (better for AI agents)**

1. Leave `input_url` empty.
2. Pick a category (default: cars for sale) and optionally a make.
3. Set `max_results` (up to 2000) and click **Start**.

***

#### Tech details for developers 🧑‍💻

**Input Example (filters):**

```json
{
  "category": "cars_for_sale",
  "make": "toyota",
  "min_year": 2018,
  "max_results": 100
}
```

**Input Example (URL override):**

```json
{
  "input_url": "https://qatarsale.com/en/products/cars_for_rent",
  "max_results": 50
}
```

**Output Example:**

```json
{
  "id": "711630",
  "url": "https://qatarsale.com/en/product/711630",
  "title": "Toyota  GR 86  2023  Automatic  6,000 Km  4 Cylinder  Rear Wheel Drive (RWD)  Coupe  White",
  "category": "Cars For Sale",
  "category_uri": "cars_for_sale",
  "purpose": "sale",
  "price": 78000,
  "currency": "QAR",
  "make": "Toyota",
  "model_class": "GR 86",
  "model": null,
  "year": 2023,
  "mileage_km": 6000,
  "gearbox": "Automatic",
  "cylinders": "4",
  "condition": 1,
  "is_promoted": false,
  "is_pinned": false,
  "is_sold": false,
  "is_business": false,
  "view_count": 120,
  "images_count": 8,
  "image_url": "https://media-blob.qatarsale.com/711630-productcovers/....webp",
  "created_at": "2026-08-20T10:00:00Z",
  "listed_ago": "2 days ago",
  "latitude": 25.28,
  "longitude": 51.53,
  "slug": "toyota_gr_86_2023_...-711630",
  "owner_id": "ff4a5304-817f-4b87-b35a-27dfc4e77602",
  "definitions": {
    "Make": "Toyota",
    "Class": "GR 86",
    "Year": "2023",
    "Mileage": "6,000",
    "Gear Type": "Automatic",
    "Cylinder": "4"
  }
}
```

**Output fields:**

| Field | Description |
|-------|-------------|
| `id` | Qatar Sale numeric listing id. |
| `url` | Public product page (`/en/product/{id}`). |
| `title` | Listing headline. |
| `category` | Category label, e.g. Cars For Sale. |
| `category_uri` | Category slug used on the site. |
| `purpose` | `sale` or `rent` for car categories. |
| `price` | Asking price as a number. |
| `currency` | Always `QAR`. |
| `make` | Make from the listing definitions. |
| `model_class` | Class / range, e.g. Land Cruiser. |
| `model` | Trim / model when published. |
| `year` | Model year. |
| `mileage_km` | Odometer in kilometres. |
| `gearbox` | Gear type, e.g. Automatic. |
| `cylinders` | Cylinder count as shown on the card. |
| `condition` | Site condition code. |
| `is_promoted` | Whether the ad is promoted. |
| `is_pinned` | Whether the ad is pinned. |
| `is_sold` | Whether the ad is marked sold. |
| `is_business` | Business seller flag. |
| `view_count` | Public view count. |
| `images_count` | Number of photos. |
| `image_url` | Cover photo. |
| `created_at` | Listing created timestamp. |
| `listed_ago` | Relative time when the API sends it. |
| `latitude` | Latitude when published. |
| `longitude` | Longitude when published. |
| `slug` | Product URI slug. |
| `owner_id` | Seller id. |
| `definitions` | Full spec map from the card. |

### 📋 Input reference (detailed)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `input_url` | string | No | — | Paste a `/en/products/{category}` or `/en/products/{category}/{make}` URL, or a single `/en/product/{id}` page. Overrides filters when set. |
| `category` | string enum | No | `cars_for_sale` | `cars_for_sale`, `cars_for_rent`, `car_spare_parts_accessories`, `special_numbers`, `electronics`, `furniture_dcor`, `heavy_equipments`, `watercrafts`, `bikes`, `jewellery`, `wrist_watches`. |
| `make` | string enum | No | all | Car make slug: `toyota`, `lexus`, `nissan`, `honda`, `bmw`, `mercedes_benz`, `ford`, `chevrolet`, `kia`, `hyundai`, `gmc`, `land_rover`, `porsche`, `audi`, `volkswagen`, `mazda`, `mitsubishi`, `jeep`, `tesla`, `cadillac`, `infiniti`, `suzuki`, `isuzu`, `chery`, `geely`, `mg`, `byd`, `haval`. Only used for cars for sale/rent. |
| `min_price` | integer | No | — | Minimum price in QAR. |
| `max_price` | integer | No | — | Maximum price in QAR. |
| `min_year` | integer | No | — | Minimum model year (cars). |
| `max_year` | integer | No | — | Maximum model year (cars). |
| `max_results` | integer | No | `50` | Maximum rows (`1`–`2000`). |

#### Notes on filters

- Prefer exact enum strings from the Apify input dropdowns (same slugs as Qatar Sale URLs).
- `input_url` always wins over filters when provided.
- `www.qatarsale.com` and `qatarsale.com` URLs are both accepted.
- Default category is **cars for sale**, matching the main cars browse page.
- Make slugs follow the site path (`mercedes_benz`, not `mercedes`).

# Actor input Schema

## `input_url` (type: `string`):

Paste a Qatar Sale products or product URL (e.g. https://qatarsale.com/en/products/cars\_for\_sale/toyota or https://qatarsale.com/en/product/718052). Overrides every filter when set.

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

Same category idea as qatarsale.com /en/products/{category}. Ignored when input\_url is set.

## `make` (type: `string`):

Same make path as /en/products/cars\_for\_sale/{make}. Only applies to cars for sale or rent. Ignored when input\_url is set.

## `min_price` (type: `integer`):

Minimum asking price in Qatari riyal. Works best without a make (site price filter). With a make, matching is done on returned cards.

## `max_price` (type: `integer`):

Maximum asking price in Qatari riyal.

## `min_year` (type: `integer`):

Keep cars with model year on or after this value. Ignored for non-car categories.

## `max_year` (type: `integer`):

Keep cars with model year on or before this value. Ignored for non-car categories.

## `max_results` (type: `integer`):

How many rows to return (1–2000). Cars for sale currently has about 26,000 ads.

## Actor input object example

```json
{
  "category": "cars_for_sale",
  "make": "",
  "max_results": 50
}
```

# Actor output Schema

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

Table view of scraped listings using the dataset 'overview' view.

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

All scraped listings from the default dataset without view transformation.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/qatarsale-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/qatarsale-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 '{}' |
apify call dadhalfdev/qatarsale-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dadhalfdev/qatarsale-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/HeAMxh4WGC7CSw5be/builds/uJUDspXRKVPtqNPjs/openapi.json
