Search and retrieve property listings from willhaben.at using their public webapi. No browser automation needed.
Requires python3 with the requests library (pre-installed in most environments).
# Apartments for sale in Schärding, max €300k
python3 scripts/willhaben-search.py --district schaerding --type apartment --max-price 300000
# Houses in Wels, max €350k
python3 scripts/willhaben-search.py --district wels --type house --max-price 350000
# With room filter and JSON output
python3 scripts/willhaben-search.py --district linz --type apartment --max-price 300000 --min-rooms 2 --format json
# With full details (heating, energy, condition) for each listing
python3 scripts/willhaben-search.py --district schaerding --type apartment --max-price 300000 --with-details
python3 scripts/willhaben-search.py --detail 1148259428
python3 scripts/willhaben-search.py --detail 1148259428 --format json
Detail fields include:
| CLI Type | Willhaben Category |
|---|---|
| ---------- | ------------------- |
apartment | Eigentumswohnung (buy) |
house | Haus kaufen |
Districts use willhaben's URL slug format — the slug is taken directly from the willhaben URL path. Browse willhaben.at/iad/immobilien/ to discover slugs for any district.
Examples:
| District | Slug |
|---|---|
| ---------- | ------ |
| Schärding | schaerding |
| Ried im Innkreis | ried-im-innkreis |
| Wels (Stadt) | wels |
| Linz (Stadt) | linz |
| Linz-Land | linz-land |
| Braunau am Inn | braunau-am-inn |
| Wien | wien |
| Graz | graz |
| Salzburg | salzburg-stadt |
| Innsbruck | innsbruck |
| Klagenfurt | klagenfurt |
Any valid willhaben district slug works — these are just examples.
Default state is oberoesterreich. Override with --state:
python3 scripts/willhaben-search.py --state salzburg --district salzburg-stadt --type apartment
Available: oberoesterreich, niederoesterreich, wien, salzburg, steiermark, kaernten, tirol, vorarlberg, burgenland
| Parameter | Description |
|---|---|
| ----------- | ------------- |
--district | District URL slug (required for search) |
--state | Austrian state (default: oberoesterreich) |
--type | Property type: apartment or house |
--max-price | Maximum price in EUR |
--min-rooms | Minimum number of rooms |
--max-pages | Max result pages (default: 5) |
--with-details | Fetch heating/energy/condition for each listing |
--detail | Get full details for a specific listing ID |
--format | text or json |
Uses willhaben's public webapi:
GET https://www.willhaben.at/webapi/iad/search/atz/seo/immobilien/{type}/{state}/{district}GET https://www.willhaben.at/webapi/iad/atverz/{ad_id}No authentication needed. Be respectful with request rates — add delays between detail requests (~200-300ms).
https://www.willhaben.at/iad/{SEO_URL}共 1 个版本