Use Willhaben Marketplace, Cars & Real Estate Listings Scraper with Python
Search Willhaben.at classifieds, used cars, and real estate (rent or buy apartments, houses, land) by keyword, price range, and sort order. Get listing prices, locations, images, and category-specific details such as car mileage or living area.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"includeDetails": false,
"includeRawAttributes": false,
"maxItems": 3,
"mode": "searchItems",
"query": "sofa",
"sortBy": "relevance"
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | required | Choose a marketplace section, cars, real estate, jobs, or paste Willhaben URLs. |
query | string | optional | Free-text keyword, e.g. 'sofa', 'iPhone', 'BMW', 'Wohnung'. Leave empty to browse the category. |
startUrls | array | optional | (mode=byUrls) Paste search, category, single listing, job search or single job URLs. Filters already in the URL are preserved. |
state | string | optional | Restrict listings to one Austrian federal state (or other countries). Location overrides this when both are set. |
location | string | optional | e.g. 'Wien', 'Graz', '1050'. Resolved through Willhaben's location search. For jobs it is sent as the job location. |
radiusKm | integer | optional | (mode=searchJobs) Radius around the location, 1-100 km. |
sortBy | string | optional | Result ordering. Jobs support relevance and newest; other orders are mapped to newest for jobs. |
priceMin | integer | optional | Minimum listing price in euros. Ignored for jobs. |
priceMax | integer | optional | Maximum listing price in euros. Ignored for jobs. |
maxItems | integer | optional | Maximum listings or jobs to return. |
includeDetails | boolean | optional | Add the full description, seller/contact data and extra car or real-estate details from each listing/job page. Slower and more expensive. |
includeRawAttributes | boolean | optional | Add every source attribute as a rawAttributes list. Useful for category-specific analysis; increases output size. |
sellerType | string | optional | Filter by private seller or commercial dealer. Applies to marketplace items and cars; ignored for real estate and jobs. |
vehicleCategory | string | optional | (mode=searchCars) Which vehicle section to search. |
carMake | string | optional | (mode=searchCars) Vehicle manufacturer. |
carModel | string | optional | (mode=searchCars) Model name, e.g. '3er-Reihe' or 'Golf'. Requires Car make. |
yearFrom | integer | optional | (mode=searchCars) Earliest registration year. |
yearTo | integer | optional | (mode=searchCars) Latest registration year. |
mileageFrom | integer | optional | (mode=searchCars) Minimum mileage. |
mileageTo | integer | optional | (mode=searchCars) Maximum mileage. |
fuelType | string | optional | (mode=searchCars) |
transmission | string | optional | (mode=searchCars) |
bodyType | string | optional | (mode=searchCars) |
carCondition | string | optional | (mode=searchCars) |
driveType | string | optional | (mode=searchCars) |
color | string | optional | (mode=searchCars) |
powerFrom | integer | optional | (mode=searchCars) Minimum engine power. |
powerTo | integer | optional | (mode=searchCars) Maximum engine power. |
realEstateCategory | string | optional | (mode=searchRealEstate) Which property market to search. |
propertySubtype | string | optional | (mode=searchRealEstate) Optional subtype such as penthouse, detached house or building plot. |
rooms | string | optional | (mode=searchRealEstate) Room-count bucket. |
livingAreaFrom | integer | optional | (mode=searchRealEstate) |
livingAreaTo | integer | optional | (mode=searchRealEstate) |
plotAreaFrom | integer | optional | (mode=searchRealEstate) |
plotAreaTo | integer | optional | (mode=searchRealEstate) |
freeAreaType | string | optional | (mode=searchRealEstate) Balcony, terrace, garden, etc. |
equipment | string | optional | (mode=searchRealEstate) e.g. lift, cellar, parking, built-in kitchen. |
availableNow | boolean | optional | (mode=searchRealEstate) Only listings available now. |
jobRegion | string | optional | (mode=searchJobs) |
employmentMode | string | optional | (mode=searchJobs) |
jobPosition | string | optional | (mode=searchJobs) |
jobOperationArea | string | optional | (mode=searchJobs) |
jobCompanyType | string | optional | (mode=searchJobs) |
jobTimeLimit | string | optional | (mode=searchJobs) |
incrementalMode | boolean | optional | Return only new/changed listings or jobs on recurring runs. The first run returns everything as NEW. |
stateKey | string | optional | (incrementalMode) Stable name for this search so later runs compare against the right state. Leave empty to derive it from the filters. |
emitUnchanged | boolean | optional | (incrementalMode) Also return records whose tracked fields did not change. |
emitExpired | boolean | optional | (incrementalMode) After a complete scan, also emit listings/jobs that disappeared since the last run. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/sSrZYqOzOQO2bTYr4/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
Willhaben.at listings and jobs with prices, locations, seller data, car and property details, images and optional detail-page enrichment.
Questions before you run
Which inputs are required?
The published required fields are mode
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build 10AHfQXOlb4fyOst2 and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.