# coches.net Dealer Scraper - Spanish Car Dealers (`rastriq/coches-net-dealers`) Actor

Extract the coches.net dealer directory by Spanish province: dealer ID, name, business phone, address, advertising plan and stock page URL. Spanish residential proxy built in. De-duplicated dataset in JSON, CSV or Excel. Pay per dealer returned.

- **URL**: https://apify.com/rastriq/coches-net-dealers.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 dealer returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Dealer Scraper

**coches.net Dealer Scraper** extracts the public dealer directory of coches.net, Spain's leading used-car marketplace: dealer ID, business name, business phone, address, advertising plan and the URL of each dealer's stock page. Choose one or more Spanish provinces and get a clean, de-duplicated dataset in JSON, CSV or Excel with a Spanish residential proxy built in.

> This Actor returns **dealers only**. For the cars use [Coches.net Scraper](https://apify.com/rastriq/cochesnet-spain) and join both datasets with the dealer `slug` and `stock_url`.

> ⚠️ **Residential proxy required:** coches.net answers `HTTP 405 Not Allowed` to datacenter IPs, including Apify's. coches.net Dealer Scraper ships with **Apify Residential proxy, country Spain (`ES`)** pre-selected as prefill and as default (API and scheduled runs too). Do not switch to datacenter proxies. If a run is blocked it fails with a clear message and charges no dealers.

### What data you get with coches.net Dealer Scraper

coches.net Dealer Scraper reads the same directory page any visitor can open (`coches.net/concesionarios/<province>/`), paginates through all result pages and returns one flat record per unique dealer. Fields the source does not provide are `null`.

| Field | Type | Description |
|---|---|---|
| `dealer_id` | s or t or r or i or n or g | coches.net internal dealer ID (unique per item). |
| `name` | string (nullable) | Dealer business name. |
| `phone` | string (nullable) | Business phone number published by the dealer. Null if not listed. |
| `pack` | string (nullable) | Advertising pack the dealer has with coches.net. |
| `province` | string (nullable) | Province name. |
| `province_id` | integer (nullable) | coches.net province ID. |
| `postal_code` | string (nullable) | Postal code of the dealer. |
| `address` | string (nullable) | Street address. |
| `stock_url` | string (nullable) | URL of the dealer's stock page on coches.net. |
| `slug` | string (nullable) | Dealer slug taken from the stock page URL. |
| `seller_messaging_id` | string (nullable) | Internal messaging ID of the seller. |
| `external_contract_id` | string (nullable) | Contract ID exposed by the source. |
| `has_financing` | boolean (nullable) | Whether the dealer offers a financing product. Null if the source omits it. |
| `has_reservation` | boolean (nullable) | Whether vehicle reservation is enabled. |
| `is_active` | boolean (nullable) | Whether the dealer is flagged active in the directory. |
| `province_slug` | s or t or r or i or n or g | Province slug used in the input. |
| `source_country` | s or t or r or i or n or g | Marketplace country code. |
| `scraped_at` | s or t or r or i or n or g | UTC timestamp of the run in ISO 8601 format. |

### How to use coches.net Dealer Scraper

1. Open **coches.net Dealer Scraper** on Apify and click **Try for free**.
2. Add one or more **province slugs**: the part of the URL after `/concesionarios/`, for example `madrid` or `soria`.
3. Set **Max dealers**. The prefill (Soria, 10 dealers) is a cheap first test; use `0` for no limit.
4. Keep the default **Spanish residential proxy** (Advanced settings) and click **Start**.
5. Download the dataset from the **Output** tab as JSON, CSV or Excel, or read it through the API.

Typical uses of coches.net Dealer Scraper:

- Map dealers by province for territory planning
- Build B2B lists of car dealerships with their published business phone
- Track new and closed dealers between runs
- Join dealers to listing data using the dealer slug and stock URL

### Input example

The prefilled input of coches.net Dealer Scraper (a cheap first run):

```json
{
  "provinces": [
    "soria"
  ],
  "maxDealers": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

| Parameter | Type | Default | Prefill | Description |
|---|---|---|---|---|
| `provinces` | array | `['soria']` | `['soria']` | Province slugs exactly as they appear in the coches.net URL `https://www.coches.net/concesionarios/madrid/`. Add one per line, e.g. `madrid`, `barcelona`, `valencia`, `sevilla`, `soria`. Unknown slugs are reported in the SUMMARY record and skipped. |
| `maxDealers` | integer | `100` | `10` | Maximum number of dealers to return in total. You are charged per dealer ($0.003 each), so use a low value for a first test, for example `10`. Set 0 for no limit. |
| `maxPagesPerProvince` | integer | — | — | Optional cap on result pages per province (20 dealers per page). Leave empty for all pages. |
| `proxyConfiguration` | object | Residential ES | Residential ES | Residential proxy from Spain is required: coches.net answers HTTP 405 to datacenter IPs, so the default is Apify RESIDENTIAL with country `ES`. The Spanish residential proxy is included in the price: you only pay the events listed in Pricing. If a run is blocked it fails and charges no dealers. |
| `delay` | number | `1.0` | — | Seconds to wait between consecutive page requests. Raise it (for example to 3) if the site blocks you. |

### Output example

A real record returned by coches.net Dealer Scraper:

```json
{
  "dealer_id": "101151",
  "name": "S. Tejeda e Hijos S.L",
  "phone": "980690606",
  "pack": "reference",
  "province": "Zamora",
  "province_id": 49,
  "postal_code": "49800",
  "address": "Pol Ind Norte, parc. 7-8",
  "stock_url": "https://www.coches.net/concesionario/stejedaehijos/",
  "slug": "stejedaehijos",
  "seller_messaging_id": "pro-101151",
  "external_contract_id": "900616005838",
  "has_financing": false,
  "has_reservation": false,
  "is_active": true,
  "province_slug": "zamora",
  "source_country": "ES",
  "scraped_at": "2026-10-24T20:54:19Z"
}
```

A `SUMMARY` record in the key-value store reports, per province, the total dealers and pages announced by coches.net, the pages fetched and the dealers returned.

### Pricing

coches.net Dealer Scraper uses pay-per-event pricing: **$0.01 per run start** plus **$0.003 per dealer** ($3.00 per 1,000). You only pay for unique dealers delivered; a run that returns nothing fails and charges no dealers.

| Run | Cost in events |
|---|---|
| 10 dealers (prefill) | $0.04 |
| 20 dealers (one full page) | $0.07 |
| 100 dealers (default maximum) | $0.31 |
| 1,000 dealers | $3.01 |

**Proxy included:** because coches.net needs a residential proxy, the Spanish residential proxy is included in the price. You only pay the events listed above, with no extra proxy or platform charges.

### Limitations

- Data is a snapshot of a public directory; coches.net may change its page structure.
- The source announces a total per province and the Actor reports it next to the dealers actually returned in `SUMMARY`. In our tests the counts matched exactly (Soria 14, Zamora 38, Huesca 29, Segovia 19; 86 unique dealers in total, no duplicates).
- Phone numbers are business numbers published in the directory. Some dealers may be sole traders whose business name is a person's name; the Actor does not filter them, so apply your own GDPR rules.
- `seller_messaging_id` and `external_contract_id` are internal identifiers exposed by the source; they are returned as published.
- A province slug that does not exist is skipped and reported in `SUMMARY`.

### Related Actors

| Country | Actor | Notes |
|---|---|---|
| Spain | [Coches.net Scraper](https://apify.com/rastriq/cochesnet-spain) | vehicle listings |
| Germany | [mobile.de Dealer Scraper](https://apify.com/rastriq/mobile-de-dealers) | dealer directory by state |
| Germany | [Mobile.de Scraper](https://apify.com/rastriq/mobile-de-scraper) | vehicle listings |
| Europe | [AutoScout24 Scraper](https://apify.com/rastriq/autoscout24-scraper) | vehicle listings, 8 countries |

### FAQ

**Is it legal to scrape coches.net dealers?** coches.net Dealer Scraper collects publicly visible business listings at a low request rate. Check the website terms and `robots.txt` and make sure your use of the data complies with GDPR and local law.

**Does coches.net Dealer Scraper need a proxy?** Yes. coches.net blocks datacenter IPs with HTTP 405, so a Spanish residential proxy (Apify Proxy, group RESIDENTIAL, country `ES`) is the default. It is included in the price: you only pay the events listed in Pricing. Without it the run fails on the first page.

**How often should I run coches.net Dealer Scraper?** The directory changes slowly. A monthly run per province is enough to track new and closed dealers.

**Where do I find a province slug?** Open `coches.net/concesionarios/` in your browser, pick the province and copy the last part of the URL.

**Can I get the dealers' cars?** Use [Coches.net Scraper](https://apify.com/rastriq/cochesnet-spain).

**Something broke or a field is missing?** Open an issue on the Actor page and include the run link.

# Actor input Schema

## `provinces` (type: `array`):

Province slugs exactly as they appear in the coches.net URL <code>https://www.coches.net/concesionarios/<b>madrid</b>/</code>. Add one per line, e.g. <code>madrid</code>, <code>barcelona</code>, <code>valencia</code>, <code>sevilla</code>, <code>soria</code>. Unknown slugs are reported in the SUMMARY record and skipped.

## `maxDealers` (type: `integer`):

Maximum number of dealers to return in total. You are charged per dealer ($0.003 each), so use a low value for a first test, for example <code>10</code>. <b>Set 0 for no limit.</b>

## `maxPagesPerProvince` (type: `integer`):

Optional cap on result pages per province (20 dealers per page). Leave empty for all pages.

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

<b>Residential proxy from Spain is required</b>: coches.net answers HTTP 405 to datacenter IPs, so the default is Apify RESIDENTIAL with country <code>ES</code>. The Spanish residential proxy is included in the price: you only pay the events listed in the Pricing tab. If a run is blocked it fails and charges no dealers.

## `delay` (type: `number`):

Seconds to wait between consecutive page requests. Raise it (for example to 3) if the site blocks you.

## Actor input object example

```json
{
  "provinces": [
    "soria"
  ],
  "maxDealers": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  },
  "delay": 1
}
```

# Actor output Schema

## `dealers` (type: `string`):

Dealer records extracted from the coches.net directory.

## `summary` (type: `string`):

Per-province source counters, pages fetched and dealers returned.

# 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 = {
    "provinces": [
        "soria"
    ],
    "maxDealers": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/coches-net-dealers").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 = {
    "provinces": ["soria"],
    "maxDealers": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/coches-net-dealers").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 '{
  "provinces": [
    "soria"
  ],
  "maxDealers": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call rastriq/coches-net-dealers --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rastriq/coches-net-dealers"
        }
    }
}
```

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/SvCmuswKqL2jIS6g0/builds/voDj47BLIVEGYhDA8/openapi.json
