DEV Community

Joshua
Joshua

Posted on AI-assisted

How to Scrape Zimmo Property Listings with Python

Asking prices on zimmo.be are easy to read one listing at a time and hard to compare across a whole search. This tutorial shows how to scrape Zimmo property listings with an open-source Python tool and turn one search, homes for sale in Brussels, into a table of price per m² by postcode and property type. By the end you will have bxl_sale.json, bxl_sale.csv and a short pandas script that sorts listings from the cheapest square metre up.

The tool is zimmo-scraper, MIT-licensed, from the 2scraper organisation on GitHub. On ScrapingReview 2Captcha holds first place in the Scraper API rating. On zimmo.be itself the Scraper API path proved unreliable in the README's tests (details below), so this tutorial drives a local browser instead.

How to scrape Zimmo property listings in six steps

  1. Clone 2scraper/zimmo-scraper and create a Python 3.9–3.12 virtualenv.
  2. Install requirements.txt and requirements-playwright.txt, then run playwright install chromium.
  3. Copy .env.example to .env; on a server, put a residential proxy in ZIMMO_PROXY.
  4. Pick a search URL: city, postcode and deal type live in its path.
  5. Run playwright_scraper.py --headful (under xvfb-run on a machine with no display).
  6. Check the exit code and <out>.meta.json, then load the JSON or CSV into pandas.

What the scraper extracts from a Zimmo search

The scraper reads search-results pages only, on the Dutch and French sites, and writes one row per listing tile. Here is how the page maps to the output:

On zimmo.be In the output
Search path /nl/gent-9000/te-koop/, /fr/bruxelles-1000/a-vendre/, /nl/antwerpen-2000/te-huur/ Region and deal type are chosen by the URL; listing_type comes from the path (sale in the sample)
One <zimmo-listing> tile One row: sku (the Zimmo code), url, title, image_url, location
Price on the tile price as a float, currency EUR; both null for "Prijs op aanvraag" / "Prix sur demande"
floorspace-surface.svg icon surface_m2, living area only, in m²; "2.578 vierkante meter" is read as 2,578
bedrooms.svg icon bedrooms
energy-labels/epc_*.svg icon epc_label, including A+, A++ and Brussels' E-
Type segment of the listing URL (/huis/, /appartement/) property_type

The icons matter more than they look. They are the same on both language versions of the site while the text labels beside them are translated, so one parser covers NL and FR. The README reports a check of 105 tiles over 7 live pages on 2026-09-23 with 0 mismatches. Coverage was 99% for price, 90% for living area, 72% for bedrooms and 70% for energy grade; the gaps are garages and commercial listings that simply don't state those things.

Why zimmo.be blocks most scrapers

To scrape zimmo.be without getting blocked you need a residential IP address and a visible (headful) browser at the same time. In the README's measurements, Cloudflare refused every datacentre address and refused headless Chromium even from a Belgian home connection. A headful Chromium on a Belgian or German residential exit was served, while a US residential exit was refused.

Those runs date from 2026-09-23 (the access matrix) and 2026-10-13 (exit countries). Two more things make the site awkward. The grid is rendered by Angular and carries no listing data in a structured block: the only JSON-LD is a BreadcrumbList, and the embedded listing JSON the site used to serve disappeared in September 2026. So rows come from rendered tiles, which is why the browser is needed at all. And the site moves: in October 2026 the page after the last one changed from "page 1 again" to an HTTP 200 page with a result count and no tiles. The CHANGELOG records how the scraper now reads that count to tell a finished listing from a page that never rendered.

Install the Zimmo scraper

git clone https://github.com/2scraper/zimmo-scraper.git
cd zimmo-scraper
python3 -m venv .venv && . .venv/bin/activate   # Python 3.9-3.12
pip install -r requirements.txt -r requirements-playwright.txt
playwright install chromium

cp .env.example .env   # on a server: set ZIMMO_PROXY to a residential proxy
Enter fullscreen mode Exit fullscreen mode

Playwright is pinned to 1.44.0. On Python 3.13 that pin needs greenlet==3.0.3, which does not build there; the README's workaround is pip install greenlet pyee==11.1.0 followed by pip install --no-deps playwright==1.44.0. Selenium and pyppeteer engines exist too, but install only one engine per virtualenv: their dependency pins conflict.

Keys and proxies go in .env, never on the command line:

# .env
ZIMMO_PROXY=http://USER:PASS@HOST:PORT
ZIMMO_PROXY_BUDGET_MB=10
Enter fullscreen mode Exit fullscreen mode

At home on a Belgian or German connection you can leave ZIMMO_PROXY empty. No captcha key is required for any of this.

First run: Brussels homes for sale

xvfb-run -a python3 playwright_scraper.py \
  --url "https://www.zimmo.be/fr/bruxelles-1000/a-vendre/" \
  --pages 3 \
  --headful \
  --category bxl-vente \
  --format both \
  --out bxl_sale
Enter fullscreen mode Exit fullscreen mode

Drop xvfb-run -a on a desktop. --headful is not optional on this site, and I find it a slightly annoying default: the flag defaults to headless for parity with the rest of the 2scraper family, even though zimmo.be refuses headless every time. To switch region or deal type, change the URL, for example /nl/antwerpen-2000/te-huur/ for rentals in Antwerp. Don't add page=2 to it; the scraper refuses that with exit 2 and wants --pages instead.

A successful run writes three files: bxl_sale.json, bxl_sale.csv and bxl_sale.meta.json, the sidecar with status (complete, partial or empty), stop_reason, failed pages and whether the listing was read to its end. Exit codes tell you what happened without opening anything: 0 ok, 3 blocked by Cloudflare, 4 the search matched nothing, 5 content never obtained (a dead proxy, a 407/402 from the proxy, a load timeout), 6 partial.

Watch the proxy budget. Through a local proxy the run stops at 10 MB by default, and one results page cost about 2.6 MB through a German residential exit (3 pages = 7.8 MB with Playwright). Three pages fit; for --pages 4 or more, raise --proxy-budget-mb by roughly 3 MB per page, or the run ends partial with stop_reason: proxy_budget_exceeded.

How the scraper works

  1. Flags are checked first: a non-zimmo --url, an unwritable --out or a malformed proxy is exit 2 before any request.
  2. With a proxy, one pre-check request (a CONNECT plus HEAD /robots.txt on www.zimmo.be) runs before any browser starts. A 407 or 402 ends the run in seconds with exit 5 instead of burning retries.
  3. Chromium opens the page and waits for the grid. HTTP 200 is served, 403 is Cloudflare's challenge (blocked), 404 is a route the site doesn't serve, and 429/5xx are retried up to --retries.
  4. Each <zimmo-listing> tile becomes a row, with features read from icon file names.
  5. The run stops at --pages, at the end of the listing, or at the proxy budget, then writes files atomically, so a crash never truncates the previous output.

Where 2Captcha fits: proxies, Scraping Browser and captchas

On a server, the problem is the IP address, not a captcha. A residential proxy from 2Captcha goes into ZIMMO_PROXY, and the headful browser runs under xvfb-run. Rotation across several exits works with --proxy-file; the dashboard's host:port:user:pass format is accepted as is.

The other path needs neither a residential address nor a display: the Scraping Browser API, which the scraper drives over CDP. The endpoint goes in .env:

ZIMMO_CDP_ENDPOINT=ws://{login}-zone-scraping_browser-country-be-pid-{profileId}:{password}@cb.2captcha.com:9222
Enter fullscreen mode Exit fullscreen mode

With country-be it served 63 rows, 3 of 3 pages, on 2026-09-23. The run holds one connection for all pages and opens each page in a fresh tab; an HTTP 401 deny_no_user on connect means the credentials are no longer accepted, and the run stops after one attempt with exit 5. Reuse the same pid between runs so the profile keeps its cookies.

The captcha solver itself (--solve-captcha when-blocked by default, key in TWOCAPTCHA_KEY) is wired in, and one page buys at most one paid solve. To be fair about it: the README says no challenge appeared on a residential exit with a headful browser, and solving the Cloudflare interstitial was not tested. I would not count on it as a way around a datacentre IP. The Scraper API path ($0.0005 per request on 2026-09-23) returned an empty "0 resultaten" page on 2026-10-28 while the Scraping Browser read 63 listings from the same URL, so for this site I'd skip it.

The output: one listing as JSON and CSV

One row from the repository's sample_output.json (a real run, 2026-09-23; image_url shortened):

{
  "source": "zimmo.be",
  "scraped_at": "2026-09-23T14:20:10.762707+00:00",
  "url": "https://www.zimmo.be/nl/gent-9000/te-koop/huis/LRZ52",
  "sku": "LRZ52",
  "title": "Huis te koop",
  "brand": null,
  "price": 330000.0,
  "currency": "EUR",
  "original_price": null,
  "discount_pct": null,
  "image_url": "https://files.zimmo.be/backend-api/7a4rzZWX0tEV53C5AqnOy0_ZWEQ=/828x618/…",
  "category": "gent-koop",
  "listing_type": "sale",
  "property_type": "huis",
  "location": "Rietstraat 41 9000 Gent",
  "surface_m2": 114.0,
  "bedrooms": 2,
  "epc_label": "D",
  "epc_value": null
}
Enter fullscreen mode Exit fullscreen mode

How to scrape Zimmo property listings: sample output opened as a table
The repository's sample_output.json (one Gent results page, 2026-09-23) as a table, eight of the 19 columns.

The CSV has the same 19 columns in the same order. Text cells starting with =, +, - or @ get a leading apostrophe so Excel doesn't run them as formulas. Note that title is the generic tile heading ("Huis te koop"), not the advert's own headline. For anything descriptive you'd have to open the listing page yourself, which this tool doesn't do.

Price per m² by postcode with pandas

pip install pandas
Enter fullscreen mode Exit fullscreen mode

Save this as price_per_m2.py next to the output files and run python3 price_per_m2.py bxl_sale:

import json
import sys
from pathlib import Path

import pandas as pd

prefix = sys.argv[1] if len(sys.argv) > 1 else "bxl_sale"

meta_path = Path(f"{prefix}.meta.json")
if meta_path.exists():
    meta = json.loads(meta_path.read_text())
    print("run status:", meta.get("status"), "| failed pages:", meta.get("failed_pages"))

df = pd.read_json(f"{prefix}.json")

# asking prices only: drop price-on-request, rows without living area,
# and new-build projects (their price is the cheapest unit, "Vanaf ...")
df = df[df["price"].notna() & df["surface_m2"].notna() & (df["title"] != "Project")]

# "Rue Example 12 1000 Bruxelles" -> postcode 1000
df["postcode"] = df["location"].str.extract(r"(\d{4})\s+\D+$", expand=False)
df["eur_per_m2"] = (df["price"] / df["surface_m2"]).round()

by_area = (df.groupby(["postcode", "property_type"])["eur_per_m2"]
             .agg(["count", "median", "min"]).sort_values("median"))
print(by_area)

print(df.groupby(df["epc_label"].fillna("none"))["eur_per_m2"].median())

cols = ["eur_per_m2", "price", "surface_m2", "bedrooms", "epc_label", "url"]
print(df.nsmallest(5, "eur_per_m2")[cols].to_string(index=False))
df.to_csv(f"{prefix}_per_m2.csv", index=False)
Enter fullscreen mode Exit fullscreen mode

It prints three things: median and minimum €/m² per postcode and property type, the median €/m² per EPC grade (a poor grade often explains a cheap square metre), and the five cheapest listings per m² with their URLs. It also saves every row with its €/m² to bxl_sale_per_m2.csv. The Project filter matters: a new-build project's price is its lowest unit price ("Vanaf …"), and dividing that by one unit's area produces bargains that don't exist.

To try the script before your own run, copy sample_output.json from the repository and run python3 price_per_m2.py sample_output:

Price per m² by postcode from scraped Zimmo listings
Output on the repository sample: 21 Gent listings, so every row shares postcode 9000. The 714 €/m² row is commercial property, which is why the script groups by property_type.

Check the count column before trusting a median. Three pages is a few dozen listings, so a small postcode may have a single row.

To track prices over time instead, rerun the same search later and compare: python3 diff_runs.py --old bxl_sale.json --new bxl_sale_next.json. It refuses runs that aren't status: complete and runs of different searches.

Limitations

  • brand, original_price, discount_pct and epc_value are always null on today's site.
  • Search-results pages only: no description, agency or coordinates from the listing page.
  • A French search that runs past its last page ends partial (exit 6) rather than complete, because the French "no result" wording isn't known yet. If --pages is larger than the search, expect exit 6 on /fr/ URLs.
  • The default 10 MB proxy budget covers about three pages.
  • Freshness: the last served run in the README is from 2026-11-05 (German residential exit, 21 rows, exit 0), and the datacentre refusal was re-checked on 2026-11-17 at commit ebf1333. The weekly canary has been failing on its proxy credential since 2026-10-26, so it isn't watching the site right now.

Is it legal to scrape zimmo.be?

This isn't legal advice. The scraper reads public search pages and never logs in, but zimmo.be's terms of use, copyright in listing texts and photos, and data-protection law still apply, and they differ by country. Read the site's terms and robots.txt, keep the request rate low with --delay, and under GDPR don't collect personal data such as an advertiser's contact details without a lawful basis.

FAQ

Does Zimmo have a public API?

This scraper doesn't use one. It reads zimmo.be's public search pages as a browser renders them, because the site's grid carries no listing data in any structured block. Whether Zimmo offers a partner data feed is a question for Zimmo itself.

How do I scrape Zimmo without getting blocked?

Use a headful browser on a Belgian or German residential IP, or the Scraping Browser API. Headless Chromium, datacentre IPs and a US residential exit were all refused in the README's measurements, ending in exit 3.

Can I export Zimmo listings to CSV?

Yes. --format csv, json or both (the default), with --out setting the file prefix. Both formats have the same 19 columns in the same order.

How much proxy traffic does scraping Zimmo use?

About 2.6 MB per results page through a residential exit, headful. Most of that is scripts, which is why --block-media saved almost nothing in the README's test (8.1 MB with it vs 7.8 MB without).

Do I need a 2Captcha key to scrape Zimmo?

No. On a Belgian or German home connection, --headful is all you need. A 2Captcha key, proxy or Scraping Browser endpoint comes in when you run from a server, where your own IP is refused.

Does the Zimmo scraper work on the French site?

Yes, pass a /fr/…/a-vendre/ or /fr/…/a-louer/ URL. The feature icons are identical on both language versions, so the same columns are filled. The one difference is the past-the-end case noted under Limitations.

Next steps

Run the Brussels search, then scrape another city with a different --out prefix and pass that prefix to the same script to compare medians. The code is on GitHub at 2scraper/zimmo-scraper, and the full description of all options is in the step-by-step "How to scrape Zimmo" guide on 2captcha.com. A description of the scraper and related ones is on 2scraper.com. If your server keeps getting exit 3, a 2Captcha residential proxy or a Scraping Browser session is the next thing to try.

This article was drafted with AI assistance and checked against the repository's README and CHANGELOG.

Top comments (0)