# Coches.net Scraper — Spain Used Cars & Dealers (`logiover/coches-net-scraper`) Actor

Export used car and motorbike adverts from coches.net: price, market-average price and price rank, kilometres, year, horsepower, fuel, DGT label, financing terms, warranty, province and city, plus the dealer name, rating and contact phone behind every advert.

- **URL**: https://apify.com/logiover/coches-net-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (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 $3.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 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

## Coches.net Scraper — Spain Used Cars, Prices & Dealer Contacts

coches.net is Spain's largest vehicle marketplace: around **259,000 used cars** and **33,000 motorbikes** live at any moment. This Actor turns any of its result pages into a typed table — price, kilometres, year, horsepower, fuel, DGT environmental label, financing terms, warranty, province and city — and, on top of the advert itself, **the market-average price for that model, the site's own 1–5 price rank, and the dealer's name, rating, review count and phone number.**

That price-vs-market pair is what makes the output worth more than a list of adverts. `marketAveragePrice` is what coches.net says the same model normally sells for; `priceVsMarket` is the euro gap; `priceRank` is where the site places it on a cheap-to-expensive scale. Sorting a run by those three columns surfaces underpriced stock in seconds.

### What you get

One row per advert, 52 columns:

| Group | Fields |
|---|---|
| Identity | `listingId`, `url`, `title`, `vehicleClass`, `source`, `country` |
| Vehicle | `make`, `model`, `trim`, `year`, `km`, `horsepower`, `fuelType`, `environmentalLabel`, `offerType` |
| Pricing | `price`, `currency`, `includesTaxes`, `financedPrice`, `priceDrop`, `marketAveragePrice`, `priceVsMarket`, `priceRank` |
| Financing | `financingLender`, `financingInstalment`, `financingMonths`, `financingApr`, `financingDownPayment` |
| Condition | `hasWarranty`, `warrantyMonths`, `isCertified`, `hasReservation` |
| Dealer / lead | `sellerName`, `sellerType` (dealer or private), `sellerId`, `sellerPlan`, `sellerRating`, `sellerReviews`, `phone`, `phoneHidden` |
| Location | `province`, `city`, `region` |
| Media | `photoCount`, `mainPhoto`, `photoUrls`, `videoCount` |
| Flags & dates | `isFeatured`, `isUrgent`, `publishedAt`, `createdAt`, `scrapedAt` |

Measured on a 120-advert run: `phone` 100%, `price` 100%, `km` 100%, `year` 100%, `horsepower` 100%, `province` 100%, `photoCount` 100%, `sellerName` 94% (private sellers trade under no business name), `financingInfo` 57%.

#### Sample row

```json
{
  "listingId": "70859243",
  "url": "https://www.coches.net/bmw-x4-m-competition-5p-gasolina-2021-en-murcia-70859243-covo.aspx",
  "title": "BMW X4 M Competition",
  "make": "BMW",
  "model": "X4",
  "trim": "M Competition",
  "year": 2021,
  "km": 34000,
  "horsepower": 510,
  "fuelType": "Gasolina",
  "offerType": "Ocasión",
  "price": 55000,
  "currency": "EUR",
  "includesTaxes": true,
  "marketAveragePrice": 61200,
  "priceVsMarket": -6200,
  "priceRank": 2,
  "sellerName": "Clicars",
  "sellerType": "dealer",
  "sellerRating": 4,
  "sellerReviews": 404,
  "phone": "641830117",
  "province": "Murcia",
  "city": "Murcia",
  "photoCount": 45,
  "publishedAt": "2026-06-15T08:12:03.000Z"
}
```

### Input

| Field | What it does |
|---|---|
| **Search URL** | Any coches.net result page. Set your filters on the site, copy the address, paste it here — make, model, province, price band, fuel, year and sort order are all preserved. |
| **Maximum adverts** | Stop after this many rows. Car pages hold 35 adverts, motorbike pages 20. |
| **Proxy** | Residential, pinned to Spain by default. |

Useful starting URLs:

| Goal | URL |
|---|---|
| Everything | `https://www.coches.net/segunda-mano/` |
| One make | `https://www.coches.net/toyota-segunda-mano/` |
| One province | `https://www.coches.net/segunda-mano/madrid/` |
| Motorbikes | `https://motos.coches.net/segunda-mano/` |

```json
{
  "searchUrl": "https://www.coches.net/segunda-mano/madrid/",
  "maxResults": 1000,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "ES" }
}
```

### What it is good for

**Dealer lead generation.** `sellerName`, `sellerId`, `sellerPlan`, `sellerRating`, `sellerReviews` and `phone` together describe a dealership, how it is rated and how much it already pays the portal. Filter `sellerType = dealer`, de-duplicate by `sellerId`, and a single run over a province becomes a qualified dealer list for DMS vendors, warranty providers, photography services or finance brokers.

**Pricing and residual-value analysis.** Every row carries the advert price *and* the market average for that model, so mispricing is a subtraction rather than a modelling exercise. Combined with `km`, `year` and `horsepower`, a few thousand rows are enough to fit a depreciation curve per model.

**Sourcing and arbitrage.** Filter on `priceVsMarket < 0` and `priceRank <= 2` to find stock listed below the market, then sort by `publishedAt` to see it first. `priceDrop` flags sellers who have already started cutting.

**Financing and product research.** `financingLender`, `financingApr`, `financingInstalment` and `financingMonths` expose which lenders are behind which dealers and at what rate — competitive intelligence that is otherwise only visible advert by advert.

**Fleet and EV transition tracking.** `fuelType` and `environmentalLabel` (the DGT sticker: ECO, 0, C, B) make it straightforward to measure how the Spanish second-hand market is shifting, by province and over time.

### How it works

coches.net server-renders each result page and embeds the complete result set in the page as a JSON string. The Actor requests each page through a Spanish residential IP, unescapes that blob, and maps every advert to a flat row. No headless browser is involved, so runs are fast and cheap; and because the data comes from the embedded state rather than from CSS selectors, a visual redesign does not silently empty your columns.

Pagination uses the site's own `pg` parameter and has been verified at depth — pages 1, 15 and 40 of the same search return entirely distinct adverts.

Long runs are protected by the same guards used across this Actor family:

- **A fresh proxy IP on every retry**, because one 403 from one exit node says nothing about the next.
- **A failed page is skipped rather than fatal**; three consecutive failures stop the run.
- **De-duplication by advert ID** across the whole run, so featured adverts repeated across pages are saved once.
- **A time budget** that stops the crawl in time to keep everything already collected.

### Cost and limits

Billing is per result, so cost tracks rows saved rather than pages fetched or retries burned. Store discounts apply on paid Apify plans.

- `phone` is empty when the seller has chosen to hide it; `phoneHidden` tells you which case you are in rather than leaving you guessing.
- Private-seller adverts have no `sellerName`, `sellerRating` or `sellerReviews` — those columns are a dealer feature, and `sellerType` marks the difference.
- `marketAveragePrice` and `priceRank` are the site's own estimates and are absent on models it has too little data for (roughly 20% of adverts).
- To collect more than a few thousand adverts, split the job by province or by make rather than paging one enormous search.

### Legal

This Actor collects publicly listed advert data. It does not log in, does not bypass access controls and reads nothing that a visitor cannot see. Dealer phone numbers are business contact data, but private-seller numbers are personal data under GDPR — have a lawful basis before you process them, and honour opt-outs.

Not affiliated with, endorsed by, or connected to coches.net or Adevinta. The name is used only to describe the public source of the data.

# Actor input Schema

## `searchUrl` (type: `string`):

Any coches.net result URL. Build the search on the site with the filters you want and paste the address here — make, model, province, price range, fuel, year and sort order are all kept. Examples: https://www.coches.net/segunda-mano/ (all 259,000 cars), https://www.coches.net/toyota-segunda-mano/ (one make), https://www.coches.net/segunda-mano/madrid/ (one province), https://motos.coches.net/segunda-mano/ (motorbikes).

## `maxResults` (type: `integer`):

Stop once this many adverts have been saved. Car pages return 35 adverts each, motorbike pages 20.

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

coches.net serves its result data to Spanish IPs, so residential proxies pinned to Spain are used by default.

## Actor input object example

```json
{
  "searchUrl": "https://www.coches.net/segunda-mano/madrid/",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

Every record collected in this run. Open the Dataset tab to browse, filter or export as JSON, CSV or Excel.

# 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 = {
    "searchUrl": "https://www.coches.net/segunda-mano/",
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/coches-net-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 = {
    "searchUrl": "https://www.coches.net/segunda-mano/",
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/coches-net-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 '{
  "searchUrl": "https://www.coches.net/segunda-mano/",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call logiover/coches-net-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/coches-net-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/53hMkj2obdoID2gbk/builds/4uAYrLfhpoUnpge9I/openapi.json
