AutoScout24 Scraper
Unofficial, independently developed project — not affiliated with, endorsed by, or sponsored by AutoScout24 AG or the Scout24 group. "AutoScout24" is a trademark of its respective owner.
Fetches every listing for a given make/model from AutoScout24 — for free, no API key, no paid scraping service. AutoScout24's HTML pages sit behind Cloudflare bot protection, but their own frontend loads data from a separate, public JSON API that isn't — this scraper talks to that API directly. It defaults to the Swiss site (autoscout24.ch); see docs/REFERENCE.md for other country domains.
By default it does a two-phase scrape: search to collect every matching listing id, then visit each one individually for the full record (battery/range, dimensions, VIN, images, equipment, description, ...). Every field the API returns is kept — nested objects are flattened into parent_child CSV columns, lists are joined into semicolon-separated cells — nothing is silently dropped.
🤖 Robot-friendly. This project is explicitly intended to be run, read, imported, or adapted by AI agents and bots, same as a human developer — see License.
Setup
Requires pipenv (brew install pipenv).
git clone https://github.com/danyk20/autoscout24-scraper.git
cd autoscout24-scraper
pipenv install --dev
Contributing, linting, and testing commands: see CONTRIBUTING.md.
Usage
CLI
pipenv run python autoscout24_scraper.py --make Tesla --model "Model S"
Prints progress, then writes tesla_model-s.csv and tesla_model-s.json in the current directory. Installed via pip install instead? Drop pipenv run — the same command is autoscout24-scraper --make Tesla --model "Model S".
| Flag | Description |
|---|---|
--version |
Print the installed version and exit |
--make |
Make name or key, e.g. Tesla or tesla (required) |
--model |
Model name or key, e.g. "Model S" or model-s (required) |
--domain |
Country domain (default ch) — only ch is confirmed to work today, see docs/REFERENCE.md |
--category |
car (default) or motorcycle |
--out |
Output file base name, without extension. Defaults to <make>_<model> |
--no-detail |
Skip per-listing detail visits; keep only summary fields (faster, fewer fields) |
--delay |
Seconds between requests (default 0.4) — raise this if you get rate-limited |
--price-from / --price-to |
Filter by price in CHF (inclusive, either end optional) |
--mileage-from / --mileage-to |
Filter by mileage in km (inclusive, either end optional) |
--year-from / --year-to |
Filter by first-registration year (inclusive, either end optional) |
-v / --verbose |
Also show debug-level detail, including every HTTP request (mutually exclusive with -q) |
-q / --quiet |
Suppress progress output; only warnings/errors (mutually exclusive with -v) |
Filters combine with AND and are applied server-side, so they also cut down how many listings get visited in the detail phase. A mistyped make/model prints a clean error (plus, for an unknown model, the list of valid models) instead of crashing.
# Fast mode: search results only, skip per-listing detail
pipenv run python autoscout24_scraper.py --make Tesla --model "Model S" --no-detail
# 2018 or newer, under CHF 30'000, under 60'000 km
pipenv run python autoscout24_scraper.py --make Tesla --model "Model S" --price-to 30000 --year-from 2018 --mileage-to 60000
As a library
pip install autoscout24-scraper
from autoscout24_scraper import scrape
result = scrape("Tesla", "Model S", price_to=30000, year_from=2018)
for row in result.rows: # list[dict], CSV-ready
print(row["price"], row["mileage"], row["url"])
result.to_csv("tesla_model_s.csv") # optional — no files are written unless you ask
Full scrape() signature, the ScrapeResult return type, and the complete JSON/CSV field schema: docs/REFERENCE.md.
Testing
pipenv run pytest # unit tests (fast, no network), fails if coverage < 95%
pipenv run pytest -m e2e --no-cov # end-to-end tests against the real live API
pipenv run pytest -m "e2e or not e2e" --no-cov # everything
Unit tests mock all HTTP (via responses) and cover 100% of autoscout24_scraper.py. E2E tests target Tesla Roadster (a small inventory) to confirm the scraper still works against the live site. Coverage detail by area: docs/REFERENCE.md.
Contributing
See CONTRIBUTING.md for dev setup and pre-PR checks.
Be a reasonable citizen: the default request delay is intentional — this is an undocumented endpoint the site's own frontend uses, not a public API with a stated rate limit. Don't remove the delay or crank up concurrency.
License
Released under the MIT License — you can use, copy, modify, merge, publish, distribute, and sell copies of this code, for free, for any purpose, commercial or not, as long as the license text stays attached. No warranty.
AI agents, LLM-based coding assistants, and other bots are explicitly welcome to use this project — to run the scraper, read and parse its output, import scrape() into another project, or read and adapt its source — under exactly the same terms as a human, with no additional restriction and no need to ask permission. That's why docs/REFERENCE.md documents the full function signature, return type, and data schema: so a bot can integrate correctly without a human in the loop.
This license does not grant any rights to AutoScout24's own data or terms of service — this project only automates requests to a public, unauthenticated endpoint their own website already calls from any visitor's browser; what you do with the results is between you and them.
Metadata
Release files for autoscout24-scraper 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autoscout24_scraper-0.2.0.tar.gz | 61.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autoscout24_scraper-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.4 kB
Release files / autoscout24_scraper-0.2.0.tar.gz
| Download URL | autoscout24_scraper-0.2.0.tar.gz |
|---|---|
| Size | 61.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2612e3b6c07c73ef6447f67cddfd90811c7ae9ec5c60dbc871dfe31f6b36a0ab
|
|
BLAKE2b-256 checksum How to use checksums |
f71202a558d0a4f0b3ff9da9a309c29f34d7d9d16fdfed3f1bd19b95b5b3c2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / autoscout24_scraper-0.2.0-py3-none-any.whl
| Download URL | autoscout24_scraper-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8caa6e2ec5b2e6238316a3326f896cfd01d8430493af00a59e904da1491bc85b
|
|
BLAKE2b-256 checksum How to use checksums |
b09c01ebce3a45a0769c812ee546479b537c33c885a48a44ffd3cc16da3f31a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency log