DEV Community

Devil Scrapes
Devil Scrapes

Posted on

How to Scrape coches.net Car Listings (Spain) to JSON/CSV

Quick answer: Use the coches.net Spain Car Scraper on Apify. Paste your filtered coches.net search URL, set maxResults, and the Actor walks every page of results and returns structured rows — price, make, model, year, mileage, fuel type, environmental label, seller, and photos — directly to a JSON or CSV dataset. No API key needed, no Python environment to configure.

Why scrape coches.net at all?

coches.net is Spain's largest used-car marketplace. Millions of segunda-mano listings sit behind its search interface, and there is no public API. If you want to track Spanish asking prices by make and model, monitor a dealer's inventory, or build a cross-border arbitrage dataset, you have to scrape the public search pages.

Scraping a high-traffic Spanish marketplace is not a casual afternoon project. The site serves its listing data through a mix of rendered HTML and embedded JSON payloads, paginates at 30 listings per page, and pushes back hard against automated traffic with fingerprinting and rate-limiting. We built the Actor to absorb all of that so you get clean rows in a dataset rather than 403 errors in a terminal.

What fields does the scraper return?

Every row returned by the Actor maps exactly to the ResultRow Pydantic model in the Actor's source. Here is a realistic example output row:

{
  "listing_id": "54595133",
  "listing_url": "https://www.coches.net/land-rover-range-rover-velar-30-d300-se-4wd-auto-diesel-2019-en-madrid-54595133-covo.aspx",
  "title": "LAND-ROVER Range Rover Velar 3.0 D300 SE 4WD Auto",
  "make": "LAND-ROVER",
  "model": "Range Rover Velar",
  "version": "3.0 D300 SE 4WD Auto",
  "year": 2018,
  "price": 34900,
  "currency": "EUR",
  "mileage_km": 101643,
  "fuel_type": "Diésel",
  "transmission": "Automatic",
  "engine_power_hp": 300,
  "drivetrain": "All",
  "body_type": "6",
  "color": "Gray",
  "environmental_label": "C",
  "first_registration": "2018",
  "location": "Majadahonda",
  "region": "Madrid",
  "seller_type": "dealer",
  "seller_name": "Movilcar",
  "seller_rating": 4.7,
  "photo_urls": [
    "https://a.ccdn.es/cnet/vehicles/13042849/d0305526-6eeb-4e4c-8535-4463a6c1367e.jpg"
  ],
  "has_warranty": true,
  "warranty_months": 12,
  "description": "Libro de revisiones en concesionario oficial. 12 meses de garantia oficial.",
  "posted_date": "2026-04-24T09:05:37Z",
  "scraped_at": "2026-06-02T00:00:00+00:00"
}
Enter fullscreen mode Exit fullscreen mode

The full field set includes listing_id, listing_url, title, make, model, version, year, price, currency, mileage_km, fuel_type, transmission, engine_power_hp, drivetrain, body_type, color, environmental_label, first_registration, location, region, seller_type, seller_name, seller_rating, photo_urls, has_warranty, warranty_months, description, posted_date, and scraped_at. Fields marked enrichment-only (version, transmission, drivetrain, color, description) are populated when enrichDetails is true.

What does it cost to scrape coches.net listings? 💰

Pricing is Pay-Per-Event — you pay for results that land, not for compute time.

Event Price
actor-start (one-off per run) $0.05
result-row (per car listing) $0.002

1,000 results in a single run costs $2.05 ($0.05 start + 1,000 × $0.002). Every new Apify account gets $5 of free credit — enough for two full runs of 1,000 listings before you spend a cent of your own money. No credit card required to start.

How does the anti-blocking work?

coches.net does not welcome automated traffic. We handle the blocks so you do not have to think about them:

  • We rotate through Chrome, Firefox, and Safari TLS fingerprints on every request using curl-cffi browser impersonation, so the site's anti-bot stack sees real-browser handshakes, not a Python HTTP client.
  • We rotate residential proxy sessions through Apify Proxy on every block — a new session ID and a new exit IP, automatically.
  • We retry with exponential backoff on 408, 429, and 5xx responses, honouring Retry-After headers, up to five attempts per page.
  • When the target rate-limits us, we slow down rather than getting banned. Partial successes surface with a clear status message — we never silently return an empty dataset.

You get clean, typed rows. We run the gauntlet.

How to run the scraper from Python

The Actor lives on the Apify platform. The fastest way to call it from your own code is the apify-client Python library:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")

run_input = {
    "searchUrl": "https://www.coches.net/segunda-mano/?ma=BMW&mo=3+Series",
    "maxResults": 200,
    "enrichDetails": True,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

run = client.actor("DevilScrapes/coches-spain-cars").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["make"], item["model"], item["price"], item["currency"])
Enter fullscreen mode Exit fullscreen mode

Swap in your own search URL — apply your filters on coches.net, copy the URL, paste it into searchUrl. The Actor walks result pages from that filtered starting point. Set enrichDetails to False to halve the request count if you only need price, mileage, power, and seller from the search payload.

What are the main use cases?

Used-car price analytics

Pull 500 listings for a specific make and model, export to CSV, and load into a spreadsheet or pandas DataFrame. You can plot asking prices against mileage and year in under ten minutes once the data is in your hands.

Dealer inventory monitoring

Filter by a dealer's name or location, run the Actor on a schedule, and diff successive datasets to catch new arrivals and price drops. Spain's dealer market moves fast; a daily diff keeps you current.

Market research: DGT environmental labels

Spain's Dirección General de Tráfico assigns environmental labels (0, ECO, C, B) to vehicles for low-emission zone access. The environmental_label field lets you aggregate the mix of labels across any filtered search — useful for tracking how quickly the segunda-mano market is shifting toward ECO and 0-label vehicles.

Cross-border arbitrage

Spanish used-car prices diverge from northern European markets, especially for diesel estates and certain German brands. Filter by fuel_type, mileage_km, and year, then compare against a dataset from another EU marketplace to spot import opportunities.

Lead generation

The seller_name and location fields on dealer listings give you a ready-made directory of car dealers in any Spanish province. Combine with seller_rating to rank them.

FAQ

Is it legal to scrape coches.net?

This Actor scrapes publicly visible listing data — the same information any browser user sees without logging in. coches.net's terms of service govern automated access; review them for your jurisdiction and use case. We recommend scraping responsibly: use the default rate-limiting settings, do not request data at a pace that would stress the server, and use the data for legitimate analytical and research purposes.

How much does 10,000 listings cost?

One run of 10,000 results costs $0.05 (start) + 10,000 × $0.002 = $20.05. You pay only when rows actually land in the dataset.

How often can I run it?

As often as you need. Schedule it daily in the Apify Console with a cron expression and it runs unattended. Successive datasets can be diffed programmatically via the Apify API.

What if coches.net blocks the Actor?

We handle blocks automatically through residential proxy rotation and session cycling. If a run encounters a hard ban across all available exits, the Actor exits non-zero with a clear status message rather than returning empty data quietly.

Start scraping Spanish car listings

The coches.net Spain Car Scraper is live on the Apify Store. Click Try for free — your first $5 of credit is on Apify, no card required.

Export your first dataset to JSON or CSV in minutes. If you run into an edge case or need an extra field, open an issue on the Actor's Issues tab — we ship fixes weekly.

Resources:

Top comments (0)