Back to Case Studies
AI Automation

Autos Alemanes · Costa del Sol

An AI-assisted platform to find, score and track profitable German used cars for resale in Spain

PythonFastAPIReactPlaywrightGemini / Claude APIWeb Scraping
The dashboard: every car from both marketplaces, ranked by score.

The Problem

Finding the right used German car to resell on the Costa del Sol means hours and hours of manual searching: opening dozens of listings across several marketplaces, comparing prices by hand, spotting duplicates, and still not knowing if the deal leaves a real profit in Spain. I started this project to eliminate that time and to make the decision data-driven.

The Solution

A local web app that searches two German marketplaces — Kleinanzeigen and AutoScout24 — simultaneously, cleans the results, scores every car, and estimates the profit of reselling it in Spain.

How It Works

  1. 01

    Search

    Configurable filters — brand, model, city or postal code, year, mileage, price range, fuel type and gearbox. Both sources run in one sync.

  2. 02

    Clean

    Automatically removes electric cars, cargo vans, damaged vehicles and duplicate listings that appear on both marketplaces.

  3. 03

    Score

    Every car gets a 1–10 score. The user configures how much each factor weighs.

  4. 04

    Analyze

    On demand, compares the car with similar listings in Spain and calculates the estimated margin.

Fully configurable search: brand, model, city, mileage, year, price, fuel and gearbox.
Background sync with live status and freshness per marketplace.

Smart Sync

The list refreshes automatically when the app opens if the data is stale (the user sets how many hours count as stale), or manually with one button. An optional daily scheduled sync is available for always-on servers. Before each run, the app waits for the network to be available and keeps the computer awake while it runs.

The Configurable Score

The score is deterministic and fully transparent — no AI involved, so it's free, fast and explainable. Weights are normalized and every user can tune them to their own strategy.

MileageAir conditioningTÜV inspectionBody type (convertible / estate)Gearbox (automatic sells better on the Costa del Sol)Price vs. similar cars

The price component: an expected price per model is learned from the whole database, adjusted for year and mileage (about 23% typical error). Cars priced well below that expectation score higher.

Each user sets how much every factor matters.
Every car shows its score and what drives it.

Profitability Analysis

One click on any car compares it with comparable listings on AutoScout24.es, adjusts prices for year and mileage, discards outliers, and calculates the margin after transport, taxes (including the Spanish REBU special regime for used goods) and other costs. The result is a pessimistic–optimistic range and a Buy / Doubtful / Discard verdict with a confidence level. All costs are editable. An optional AI-written report (Gemini or Claude, configurable) adds strengths, risks and what to inspect — it only receives the numbers already calculated, and runs once per request to keep costs under control.

The verdict: a margin range, a Buy / Doubtful / Discard recommendation and an optional AI-written report.
  • Line-by-line breakdown: expected sale price in Spain minus purchase price, transport, paperwork, registration tax, preparation, insurance and advertising — every line adds up exactly to the net margin.
  • Comparable listings: real cars on the Spanish market, adjusted for year and mileage, with a confidence level (high / medium / low) based on how many comparables were found.
  • Honest by design: with low confidence the tool never recommends 'Buy', and it flags when a listing's title contradicts its registered model.
The breakdown: expected resale price in Spain, every cost line, and the comparable listings behind the estimate.

Estimates are orientative, not tax advice.

You Control the Numbers

Every cost and threshold behind the profitability analysis is editable, so the tool adapts to each buyer's real situation instead of imposing generic assumptions.

Import costs: every figure is editable.
Decision thresholds and sync behavior.

Import costs

Transport to the Costa del Sol, registration paperwork (DGT fee, import ITV, plates), registration tax, preparation and small repairs, insurance and trade plates, advertising costs, and any other costs.

Buyer profile

The user chooses how they import — as a private individual or as a company — and the margin calculation adapts, including Spain's REBU special regime for used goods.

Negotiation and resale assumptions

Expected discount on the asking price when buying, and the discount applied to Spanish listing prices when selling, because listings are asking prices, not final prices.

Decision thresholds

The user defines the minimum net margin and return on investment to get a "Buy" verdict, and the margin below which a car is "Discard". Everything in between is "Doubtful".

Estimates are orientative, not tax advice. They don't include income tax, corporate tax, the buyer's transfer tax or unforeseen costs.

Deal Tracking (CRM)

Each car can be marked with a status, notes and an appointment date, so the whole sourcing pipeline lives in one dashboard.

Status, notes and appointments per car.

Engineering Highlights

Fault-tolerant scrapers

Retries and per-source isolation — one failing site never stops the others; partial data is preserved.

Smart duplicate detection

Across marketplaces, with conservative rules so a different car is never hidden by mistake.

Respectful scraping

Pauses between requests and page limits.

Ethical by design

mobile.de blocks automated browsers; I documented it and chose not to circumvent the block.

Prompt-injection-safe AI

Seller text is isolated and treated as untrusted; the AI response is validated.

Background sync

Live status, per-source freshness indicators and delisted-ad detection.

Deleted-listing detection

A removed ad can still look alive on desktop. The scraper checks the mobile version, where deletion is shown, and treats ambiguous errors as "still active" so a block never hides a good car.

Title vs. model sanity check

Sellers sometimes register the wrong model (e.g. an A180 listed as A160). The app detects the contradiction, lowers the confidence and never issues a "Buy" verdict on unreliable data.

Tech Stack

PythonFastAPISQLAlchemySQLitePlaywrightReactViteTailwind CSSGemini / Claude API

Built with Claude Code as a programming assistant — I defined the requirements, reviewed the code and validated every result against the live sites.

Want something like this for your business?