# Coches.net Scraper (`dadhalfdev/coches-scraper`) Actor

Scrape Coches.net car listings from any filtered search URL. Extract prices, specs, mileage, year, location, seller details, phone visibility, financing, warranty, ratings, and price-drop data. Sort results and export structured datasets.

- **URL**: https://apify.com/dadhalfdev/coches-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Categories:** E-commerce, Other
- **Features:** Limited permissions
- **Stats:** 6 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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?

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

## 🚗 Coches.net Scraper

Want to find the right car or analyze Spain's used car market? This scraper makes it simple.

Paste an **`input_url`** from your browser once you've already filtered on Coches.net — great for people — **or** use **structured filters** (make, model, province, price, mileage, year, fuel, gearbox, body type) — great for AI agents. When `input_url` is set it overrides the filters. Either way, you get up to 1500 car listings from [Coches.net](https://www.coches.net/) with pricing, specs, seller details, and location as CSV or JSON.

![Coches.net Website](https://i.ibb.co/dwTtV4LC/Screenshot-From-2026-06-02-00-26-54.png)

### 💡 Perfect for...

- **Car Buyers:** Track prices and spot good deals across Spain.
- **Dealerships:** Monitor competitor inventory, prices, locations, and listing volume.
- **Market Research:** Analyze Spanish used car trends by brand, model, province, mileage, fuel type, and price.
- **Data Analysts:** Build dashboards, pricing models, or inventory reports from structured vehicle data.
- **🤖 OpenClaw & AI Agents:** Power autonomous workflows that watch specific makes, provinces, or fuel types — structured enums are agent-friendly.
- **📚 RAG Systems:** Feed real car listings into Retrieval-Augmented Generation pipelines for automotive search and Q\&A.
- **🔗 AI Workflows:** Integrate with LangChain, AutoGPT, CrewAI, and other tools that need current automotive listings.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a Coches.net search URL (`input_url`) if you already filtered in the browser, or use structured filters for agent-friendly runs. `input_url` always wins when set.
- 🎯 **Structured Filters:** Search by make, model, Spanish province, price, mileage, year, fuel, gearbox, and body type — no URL crafting required.
- ⚙️ **Detailed Vehicle Data:** Extracts price, make, model, fuel type, mileage, engine capacity, power, year, location, and seller information.
- ⏱️ **Sorting Options:** Control how results are traversed, from most relevant listings to lowest price, newest cars, or lowest mileage.
- 👤 **Seller Insights:** Distinguish between professional sellers and private sellers, including seller names when available.
- 📍 **Spanish Market Coverage:** Capture province, city, and autonomous community data from Coches.net listings.

### 📦 What's inside the data?

For every single car listing, you will get:

- **Core Details:** `id`, `title`, `url`, `image`, `created_at`, `published_date`
- **Location:** `location_city`, `location_region`, `location_province`
- **Technical Specs:** `make`, `model`, `fuel_type`, `mileage`, `engine_capacity`, `engine_power`, `first_registration_year`
- **Pricing & Seller:** `price`, `price_has_taxes`, `price_indicator`, `price_drop_data`, `seller_name`, `seller_type`, `phone`, `hide_phone`, `seller_pack`, `seller_ratings`, `offer_type`
- **Extra Status:** `environmental_label`, `is_certified`, `is_financed`, `pack`, `warranty`, `has_reservation`, `has_urge`

### 🛠️ Sort options

You can tell the scraper what order to read the listings in using the `filter_by` parameter:

- **Most Relevant** – Coches.net's default recommended ordering
- **Lowest / Highest Price** – Sort by cash price
- **Lowest / Highest Monthly Fee** – Sort by monthly financing fee
- **Lowest / Highest KM Distance** – Sort by mileage
- **Oldest / Newest** – Sort by vehicle year

### 🚀 Quick start

**Option A — Input URL (great for people)**

1. Open [Coches.net](https://www.coches.net/), apply filters in the browser, copy the results URL.
2. Paste it into `input_url`.
3. Set `max_cars` and click **Start**.

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

1. Leave `input_url` empty.
2. Set filters (e.g. make `BMW`, province `Madrid`, max price `25000`).
3. Optionally pick fuel, gearbox, or body type; choose `filter_by`; set `max_cars` (up to 1500).
4. Click **Start** and export CSV, Excel, or JSON when done.

***

#### Tech details for developers

**Input Example (filters)**

```json
{
  "make": "BMW",
  "model": "Serie 3",
  "province": "Madrid",
  "price_max": 25000,
  "mileage_max": 120000,
  "year_min": 2018,
  "energy": "Diésel",
  "gearbox": "Automatic",
  "filter_by": "Lowest Price",
  "max_cars": 500
}
```

**Input Example (URL override)**

```json
{
  "input_url": "https://www.coches.net/bmw/serie-3/segunda-mano/",
  "max_cars": 500
}
```

**Output Example**

```json
{
  "id": "70766777",
  "title": "CITROEN Xsara 1.4 SX",
  "url": "https://www.coches.net/citroen-xsara-14-sx-5p-gasolina-2004-en-alicante-70766777-covo.aspx",
  "image": "https://a.ccdn.es/cnet/2026/06/01/70766777/2109441964_g.jpg",
  "created_at": "2026-06-01T21:57:10Z",
  "published_date": "2026-06-01T22:05:57Z",
  "location_city": "Torrevieja",
  "location_region": "Comunitat Valenciana",
  "location_province": "Alicante",
  "make": "CITROEN",
  "model": "Xsara",
  "fuel_type": "Gasolina",
  "mileage": 160000,
  "engine_capacity": 1360,
  "engine_power": 75,
  "first_registration_year": 2004,
  "price": 300,
  "seller_name": "Autor",
  "seller_type": "PrivateSeller",
  "phone": "643636371",
  "hide_phone": false,
  "offer_type": "Ocasión",
  "environmental_label": "B",
  "is_certified": false,
  "is_financed": false,
  "pack": null,
  "warranty": null,
  "has_reservation": false,
  "price_has_taxes": true,
  "price_indicator": null,
  "price_drop_data": null,
  "seller_pack": null,
  "seller_ratings": null,
  "has_urge": false
}
```

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input_url` | string | No | Paste a Coches.net search results URL; overrides all filters below when set. Ideal for humans who already filtered in the browser. Leave empty to use filters (better for AI agents). |
| `make` | string | No | Car brand (e.g. BMW, Seat). |
| `model` | string | No | Model name (e.g. Golf, Serie 3). Best with `make`. |
| `province` | string | No | Spanish province (Madrid, Barcelona, Valencia, …). |
| `price_min` / `price_max` | integer | No | Cash price range in euros. |
| `mileage_min` / `mileage_max` | integer | No | Mileage range in km. |
| `year_min` / `year_max` | integer | No | First-registration year range. |
| `energy` | string | No | Fuel type: Diésel, Gasolina, Eléctrico, Híbrido, Híbrido enchufable, GLP, CNG. |
| `gearbox` | string | No | `Automatic` or `Manual`. |
| `body_type` | string | No | Berlina, Coupé, Cabrio, Familiar, Monovolumen, SUV, Pick up. |
| `filter_by` | string | No | Sort order (see sort options above). |
| `max_cars` | integer | Yes | Max cars to scrape (20–1500, default: 500). |

### 🔧 Custom scrapers and agents

If you need a custom web scraper, or custom AI agents and workflows, contact me through [tuik.ai](https://www.tuik.ai). We help businesses cut costs and time by up to 10x.

# Actor input Schema

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

Paste a Coches.net search results URL (e.g. https://www.coches.net/bmw/serie-3/segunda-mano/) to use instead of the filters below — overrides all structured filters when set. Leave empty to use the filters below (better for AI agents).

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

Car brand, matching Coches.net's own make list exactly (119 brands with active listings). Leave empty to search all brands. Ignored when input_url is set.

## `model` (type: `string`):

Optional model (e.g. Golf, Leon, Serie 3). Best used together with make. Ignored when input_url is set.

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

Extra words for the Coches search box, such as 4x4 or automatico. Leave blank to use make and model only.

## `province` (type: `string`):

Spanish province (all 52). Empty = nationwide. Ignored when input_url is set.

## `body_type` (type: `string`):

Vehicle body style. Ignored when input_url is set.

## `price_min` (type: `integer`):

Minimum cash price in euros. Ignored when input_url is set.

## `price_max` (type: `integer`):

Maximum cash price in euros. Ignored when input_url is set.

## `mileage_min` (type: `integer`):

Minimum mileage in km. Ignored when input_url is set.

## `mileage_max` (type: `integer`):

Maximum mileage in km. Ignored when input_url is set.

## `year_min` (type: `integer`):

Minimum first-registration year. Ignored when input_url is set.

## `year_max` (type: `integer`):

Maximum first-registration year. Ignored when input_url is set.

## `energy` (type: `string`):

Fuel type. Ignored when input_url is set.

## `gearbox` (type: `string`):

Transmission type. Ignored when input_url is set.

## `filter_by` (type: `string`):

How to order the listings.

## `max_cars` (type: `integer`):

The maximum number of cars to scrape (20–1500).

## Actor input object example

```json
{
  "make": "",
  "province": "",
  "body_type": "",
  "energy": "",
  "gearbox": "",
  "filter_by": "Most Relevant",
  "max_cars": 500
}
```

# Actor output Schema

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

Table view of scraped Coches.net car listings using the dataset 'overview' view.

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

All scraped Coches.net car 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/coches-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/coches-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/coches-scraper --silent --output-dataset

```

## MCP server setup

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