# 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
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 🚗 Coches.net Scraper

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

Just **paste a Coches.net URL** with your desired filters for make, model, province, price, mileage, year, and more. The scraper extracts up to 2000 car listings and returns clean JSON/CSV-ready data with pricing, vehicle specs, seller details, and location information.

![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 Coches.net searches or vehicle categories.
- **📚 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

- 🎯 **Pinpoint Accuracy:** Start from any Coches.net search URL. Apply filters on the website, copy the URL, and let the scraper follow that search.
- ⚙️ **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

1. **Go to [Coches.net](https://www.coches.net/)** and perform a search.
2. **Apply your filters** on the website, such as brand, province, price range, year, fuel type, or mileage.
3. **Copy the URL** from your browser's address bar.
4. **Paste the URL** into the `input_url` field of the scraper.
5. **Choose your `filter_by`** sorting method.
6. **Set `max_cars`** to control how many listings to scrape, up to 2000.
7. **Click Start** and export the results as CSV, Excel, or JSON when the run finishes.

---

#### Tech details for developers

**Input Example:**
```json
{
  "input_url": "https://www.coches.net/coches/segunda-mano/",
  "filter_by": "Lowest Price",
  "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 | Yes | The Coches.net listings URL to scrape with your selected filters. |
| `filter_by` | string | No | Sort order for the listings, such as `Most Relevant`, `Lowest Price`, `Newest`, or `Lowest KM`. |
| `max_cars` | integer | No | Max cars to scrape (20–2000, default: 500). |

# Actor input Schema

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

Sort the listings by the selected Coches.net criteria.

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

The Coches.net listings URL to scrape with the desired filters.

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

The maximum number of cars to scrape.

## Actor input object example

```json
{
  "filter_by": "Most Relevant",
  "input_url": "https://www.coches.net/coches/segunda-mano/",
  "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 = {
    "input_url": "https://www.coches.net/coches/segunda-mano/"
};

// 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 = { "input_url": "https://www.coches.net/coches/segunda-mano/" }

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "input_url": "https://www.coches.net/coches/segunda-mano/"
}' |
apify call dadhalfdev/coches-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dadhalfdev/coches-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Coches.net Scraper",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "FQ20BeOdEAl6MmuIl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dadhalfdev~coches-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dadhalfdev-coches-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dadhalfdev~coches-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dadhalfdev-coches-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dadhalfdev~coches-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dadhalfdev-coches-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "input_url"
                ],
                "properties": {
                    "filter_by": {
                        "title": "Sort by",
                        "enum": [
                            "Most Relevant",
                            "Lowest Price",
                            "Highest Price",
                            "Lowest Monthly Fee",
                            "Highest Monthly Fee",
                            "Lowest KM",
                            "Highest KM",
                            "Oldest",
                            "Newest"
                        ],
                        "type": "string",
                        "description": "Sort the listings by the selected Coches.net criteria.",
                        "default": "Most Relevant"
                    },
                    "input_url": {
                        "title": "Input URL",
                        "type": "string",
                        "description": "The Coches.net listings URL to scrape with the desired filters.",
                        "default": "https://www.coches.net/coches/segunda-mano/"
                    },
                    "max_cars": {
                        "title": "Max Cars",
                        "minimum": 20,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "The maximum number of cars to scrape.",
                        "default": 500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
