# Motory Scraper (`dadhalfdev/motory-scraper`) Actor

Scrape used and new cars from ksa.motory.com. Use filters or paste a Motory URL — the URL wins when set. Returns price (SAR), specs, seller, and photos.

- **URL**: https://apify.com/dadhalfdev/motory-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Stats:** 3 total users, 2 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

## 🇸🇦 Motory Scraper

Want [Motory](https://ksa.motory.com/en/cars-for-sale/) Saudi cars in a spreadsheet? This scraper makes it easy.

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

Motory currently lists about **1,600 used** and **1,250 new** cars in KSA (together over 2k). This actor returns up to 2000 rows per run.

### 💡 Perfect for...

- **Buyers and dealers:** Export Toyota, Hyundai, Kia and more with SAR asking prices.
- **Dashboards:** Track used vs new Motory stock without paging the site.
- **Market research:** Slice by make, city, or year.
- **Data analysts:** Export structured Motory rows with public listing URLs.
- **🤖 AI Agents:** Power Claude, Cursor, Codex, the Hermes Agent, and OpenClaw workflows with live Motory results.
- **📚 RAG Systems:** Feed titles, prices, and specs 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 Motory `/en/cars-for-sale/` or `/en/new-cars/` 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 used/new split and make slugs as ksa.motory.com.
- 🌐 **Saudi inventory:** Titles, SAR prices, mileage, city, seller phone/WhatsApp, and photos.

### 📦 What's inside the data?

Every row includes all of these fields:

- **Core:** `id`, `url`, `title`, `condition`, `make`, `model`, `year`
- **Price:** `price`, `currency` (SAR), `price_label`
- **Specs / place:** `mileage_km`, `transmission`, `city`, `engine`, `horsepower`
- **Seller / media:** `is_dealer`, `is_featured`, `seller_name`, `seller_phone`, `whatsapp`, `image_url`, `image_urls`, `created_at`

### 🚀 Quick start

**Option A — Input URL**

1. Open [Used cars](https://ksa.motory.com/en/cars-for-sale/), apply filters, copy the URL — e.g. `https://ksa.motory.com/en/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 used/new, optional make and city.
3. Set `max_results` (up to 2000) and click **Start**.

***

#### Tech details for developers 🧑‍💻

**Input Example (filters):**

```json
{
  "condition": "used",
  "make": "toyota",
  "max_results": 100
}
```

**Input Example (URL override):**

```json
{
  "input_url": "https://ksa.motory.com/en/new-cars/hyundai/",
  "max_results": 50
}
```

**Output Example:**

```json
{
  "id": "274764",
  "url": "https://ksa.motory.com/en/cars-for-sale/riyadh-haraj/mg/3/2025/274764/",
  "title": "MG 3 2025",
  "condition": "used",
  "make": "MG",
  "model": "3",
  "year": 2025,
  "price": 83950,
  "currency": "SAR",
  "price_label": "Selling Price",
  "mileage_km": 0,
  "transmission": "Automatic",
  "city": "Riyadh",
  "is_dealer": true,
  "is_featured": true,
  "seller_name": "Example dealer",
  "seller_phone": "+9665...",
  "whatsapp": "+9665...",
  "image_url": "https://s3.eu-central-1.amazonaws.com/...",
  "image_urls": ["https://s3.eu-central-1.amazonaws.com/..."],
  "created_at": "16/08/2026",
  "engine": null,
  "horsepower": null
}
```

**Output fields:**

| Field | Description |
|-------|-------------|
| `id` | Motory numeric listing id. |
| `url` | Public listing page. |
| `title` | Listing headline. |
| `condition` | `used` or `new`. |
| `make` | Make name. |
| `model` | Model name. |
| `year` | Model year. |
| `price` | Asking price as a number, or null if “Contact seller”. |
| `currency` | `SAR`. |
| `price_label` | Price caption from Motory, e.g. Selling Price. |
| `mileage_km` | Odometer in kilometres. |
| `transmission` | Gearbox when published. |
| `city` | City label. |
| `is_dealer` | Dealer vs private (used ads). |
| `is_featured` | Featured flag. |
| `seller_name` | Seller / dealer name. |
| `seller_phone` | Phone when published. |
| `whatsapp` | WhatsApp number when published. |
| `image_url` | First photo. |
| `image_urls` | Photo URLs from the card. |
| `created_at` | Listed date string. |
| `engine` | Engine text on new-car cards. |
| `horsepower` | Horsepower on new-car cards. |

### 📋 Input reference (detailed)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `input_url` | string | No | — | Paste a `/en/cars-for-sale/` or `/en/new-cars/` URL; overrides filters when set. |
| `condition` | string enum | No | `used` | `used`, `new`, or `all`. |
| `make` | string enum | No | all | `toyota`, `hyundai`, `kia`, `nissan`, `honda`, `lexus`, `ford`, `chevrolet`, `gmc`, `mazda`, `mitsubishi`, `geely`, `mg`, `changan`, `bmw`, `mercedes-benz`, `audi`, `volkswagen`, `jeep`, `dodge`, `cadillac`, `lincoln`, `infiniti`, `peugeot`, `chrysler`, `land-rover`, `porsche`, `genesis`, `haval`, `byd`. |
| `city` | string enum | No | all | `Riyadh`, `Jeddah`, `Dammam`, `Khobar`, `Makkah`, `Madinah`, `Abha`, `Tabuk`, `Buraydah`. |
| `min_price` | integer | No | — | Minimum price in SAR. |
| `max_price` | integer | No | — | Maximum price in SAR. |
| `min_year` | integer | No | — | Minimum model year. |
| `max_year` | integer | No | — | Maximum model year. |
| `max_results` | integer | No | `50` | Maximum rows (`1`–`2000`). |

#### Notes on filters

- Prefer exact enum strings from the Apify input dropdowns (same slugs as Motory URLs).
- `input_url` always wins over filters when provided.
- Default condition is **used**, matching the main cars-for-sale browse page.
- Some ads show “Contact seller” instead of a number; `price` is then null.

# Actor input Schema

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

Paste a Motory browse URL (e.g. https://ksa.motory.com/en/cars-for-sale/toyota/ or /en/new-cars/). Overrides every filter when set.

## `condition` (type: `string`):

Used cars, new cars, or both — same split as Motory. Ignored when input\_url is set (URL path decides).

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

Same make slug as /en/cars-for-sale/{make}/. Ignored when input\_url is set.

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

Keep cars whose Motory city label matches. Ignored when input\_url is set.

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

Minimum asking price in Saudi riyal. Ads without a numeric price are dropped when this is set.

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

Maximum asking price in Saudi riyal.

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

Keep cars whose model year is at least this value (e.g. 2020). Ignored when input\_url is set unless you also set this filter.

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

Keep cars whose model year is at most this value. Ignored when input\_url is set unless you also set this filter.

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

How many rows to return (1–2000). Used + new together currently sit around 2,800 ads.

## Actor input object example

```json
{
  "condition": "used",
  "make": "",
  "city": "",
  "max_results": 50
}
```

# Actor output Schema

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

Table view of scraped cars 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/motory-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/motory-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/motory-scraper --silent --output-dataset

```

## MCP server setup

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