# Moteur.ma Used Car Scraper | Morocco Cars (`rainminer/moteur-ma-scraper`) Actor

Extract used car listings from Moteur.ma, a Moroccan vehicle classifieds site. Capture asking price, year, city, and photos from search and detail pages. Paste a used-car search or listing URL and export structured inventory for market research, pricing, and lead generation across Morocco.

- **URL**: https://apify.com/rainminer/moteur-ma-scraper.md
- **Developed by:** [rainminer](https://apify.com/rainminer) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 car listings

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

### What does Moteur.ma Used Car Scraper do?

**Moteur.ma Used Car Scraper** extracts **used car listings** from [Moteur.ma](https://www.moteur.ma/) — a Moroccan vehicle classifieds site. Paste a search URL (for example `https://www.moteur.ma/fr/voiture/achat-voiture-occasion/`) or a single listing URL and export structured inventory data — **price, year, city, and photos** — without writing any code.

Run it on the **Apify platform** to schedule crawls, export JSON/CSV/Excel, rotate proxies, monitor failures, and integrate results via API.

### Why scrape moteur.ma?

- **Market research** — Track asking prices, years, and cities across Moroccan used-car ads.
- **Inventory monitoring** — Watch listings as they appear on Moteur.ma search pages.
- **Competitive intelligence** — Compare stock by brand, model, and city.
- **Lead generation** — Collect vehicle URLs and specs for outreach or enrichment.
- **Data pipelines** — Feed structured car inventory into dashboards, alerts, or valuation tools.

### How to use Moteur.ma Used Car Scraper

1. Open the Actor in Apify Console.
2. Add one or more **Moteur.ma search or listing URLs** under **Start URLs**.
3. Set **Maximum items** (listings per start URL).
4. Run the Actor and download the results from the **Dataset** tab.

### Input

Moteur.ma Used Car Scraper accepts **Start URLs**, **maxItems** (per start URL), and an optional **proxy configuration**. See the **Input** tab in Apify Console for details.

Supported start URLs:

- Used cars search: `https://www.moteur.ma/fr/voiture/achat-voiture-occasion/`
- Listing pages: `https://www.moteur.ma/fr/voiture/achat-voiture-occasion/detail-annonce/648793/peugeot-208.html`

### Output

Each result is a structured vehicle object. You can download the dataset in **JSON, CSV, Excel, or HTML**.

```json
{
  "id": "648793",
  "title": "Peugeot 208",
  "price": 127000,
  "currency": "MAD",
  "year": 2020,
  "city": "Casablanca",
  "imageUrl": "https://content.avito.ma/classifieds/images/10154366463?t=moteur_feed",
  "imageUrls": [
    "https://content.avito.ma/classifieds/images/10154366463?t=moteur_feed"
  ],
  "url": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/detail-annonce/648793/peugeot-208.html",
  "searchUrl": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/"
}
```

### What data can you extract from moteur.ma?

| Field | Description |
| --- | --- |
| id | Unique listing identifier |
| title | Listing headline (make and model) |
| price | Numeric asking price |
| currency | Price currency (MAD) |
| year | Model year |
| city | City / locality |
| imageUrl | Primary listing photo |
| imageUrls | Full photo gallery |
| url | Public listing URL |
| searchUrl | Source search URL for listings found via search |

### How much does it cost to scrape moteur.ma?

This Actor uses a lightweight **HTTP crawler (no browser)**. A typical test run with a handful of listings per URL usually finishes in under a few minutes on the Apify free tier. Larger crawls scale with the number of detail pages.

If you encounter blocks, enable a proxy in the proxy configuration.

### Tips and advanced options

- Use the French used-car search URL for the main inventory.
- Increase **maxItems** to page deeper through search results; the Actor follows pagination when needed.
- Add multiple start URLs to collect several search filters in a single run.

### FAQ, disclaimers, and support

**Is scraping moteur.ma legal?**\
This Actor collects only **public** listing content shown on moteur.ma. You are responsible for complying with applicable laws when processing any personal data contained in listings.

**Which URLs are supported?**\
Public used-car search pages under `/voiture/achat-voiture-occasion/` and individual listing pages under `/detail-annonce/{id}/{slug}.html`.

**Something not working?**\
Use the **Issues** tab to report bugs or request features. If runs return empty results, try enabling a proxy.

### Image Credit

Image credit: [moteur.ma](https://www.moteur.ma/)

# Actor input Schema

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

moteur.ma used-car search URLs (e.g. https://www.moteur.ma/fr/voiture/achat-voiture-occasion/) or individual listing URLs.

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

Maximum number of vehicle listings to return per start URL.

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

Proxy settings. Enable a proxy only if you encounter blocks.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/"
    }
  ],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/moteur-ma-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": [{ "url": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rainminer/moteur-ma-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": [
    {
      "url": "https://www.moteur.ma/fr/voiture/achat-voiture-occasion/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rainminer/moteur-ma-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/moteur-ma-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/McjxDqFVTXTBBkPCg/builds/DfNc1iqrxjUGZGQtF/openapi.json
