# Willhaben Scraper — Austria's #1 Marketplace Data (`haketa/willhaben-scraper`) Actor

Willhaben.at scraper for Austria's #1 marketplace. Extract listings by keyword or category (marketplace, real estate, cars): price, location, postcode, seller type (private/dealer), seller name, description and photos. Private/dealer lead-gen. Export JSON, CSV, Excel.

- **URL**: https://apify.com/haketa/willhaben-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.55 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Willhaben Scraper 🇦🇹 — Marketplace, Real Estate, Cars & Dealer Leads

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?style=flat-square\&logo=apify)](https://apify.com/haketa/willhaben-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained-Active-brightgreen?style=flat-square)](https://apify.com/haketa/willhaben-scraper)
[![Data Formats](https://img.shields.io/badge/Format-JSON%20%7C%20CSV%20%7C%20Excel-blue?style=flat-square)](https://apify.com/haketa/willhaben-scraper)
[![Scale](https://img.shields.io/badge/Pagination-1%2C000%2B%20Listings-success?style=flat-square)](https://apify.com/haketa/willhaben-scraper)
[![Speed](https://img.shields.io/badge/Speed-High%20Throughput%20HTTP-brightgreen?style=flat-square)](https://apify.com/haketa/willhaben-scraper)

**Extract classified ads, marketplace products, real estate properties, and used cars from [Willhaben.at](https://www.willhaben.at) — Austria's #1 classifieds portal — without coding, accounts, or browser overhead.** This automated **Willhaben scraper** queries keywords across the general marketplace (Marktplatz) or crawls full category URLs across Austrian real estate (Immobilien), vehicles (Gebrauchtwagen / Auto & Motorrad), and jobs.

Collect **item titles, EUR prices, seller classifications (private individual vs. commercial dealer), registered business names, postal codes (PLZ), districts, Austrian federal states (Bundesländer), GPS coordinates (latitude/longitude), publication dates, photo galleries, and optional seller phone numbers**.

Export seamlessly to **JSON, CSV, Excel, or consume programmatically via the Apify REST API**.

***

### ⚡ At a Glance

| Feature | Details |
|---|---|
| **Target Website** | [Willhaben.at](https://www.willhaben.at) (Austria's Undisputed #1 Classifieds & Marketplace) |
| **Data Extracted** | Title, EUR price, currency, seller type (private/dealer), business seller name, street address, postal code, district, state, GPS geo coordinates, publication timestamps, gallery photos, optional phone numbers |
| **Supported Verticals**| Marktplatz (Electronics, Fashion, Furniture), Immobilien (Rentals & Sales), Auto & Motorrad (Used Cars & Commercial Vehicles), Jobs |
| **B2B Lead Generation** | Distinguishes commercial dealers (`sellerType: "dealer"`) and captures official company names (`sellerName`) |
| **Deep Pagination** | Unlocked for **1,000+ items** via continuous pagination (`maxItems: 0` for unlimited) |
| **Execution Speed** | ~100 listings in 12–25 seconds via lightweight HTTP streaming |
| **Proxy Configuration** | Apify Residential Proxy (Austria `AT`) configured by default for 100% reliable bypass |
| **Export Formats** | Dataset JSON, CSV, XLSX, XML, or direct REST API / Webhooks |

***

### 🔎 Why Scrape Willhaben Marketplace Data?

With tens of millions of monthly pageviews and hundreds of thousands of active listings, **Willhaben** is Austria's definitive commercial and consumer trading hub. Whether looking at consumer electronics, luxury timepieces, designer apparel, used automotive fleets, or Vienna rental apartments, Willhaben captures virtually all domestic Austrian classified trade.

However, Willhaben provides no public API for bulk data harvesting. Manually tracking competitor price shifts, sourcing dealership contacts, or building property valuation datasets requires opening thousands of listings individually.

**Key strategic advantages of automated Willhaben scraping:**

- **Commercial Dealer & Merchant Lead Generation:** Filter listings by `sellerType: "dealer"` to identify active Austrian retail dealers, car dealerships, and real estate agencies with verified company names.
- **E-Commerce Resale & Arbitrage Hunting:** Track price distributions for consumer electronics (iPhones, gaming consoles), luxury watches (Rolex, Omega), and vintage design furniture across Austrian postal codes.
- **Real Estate Market Intelligence:** Collect rental and sale asking prices, square meter valuations, and geographic coordinates across Vienna, Graz, Linz, and Salzburg.
- **Automotive Pricing & Fleet Analytics:** Monitor used vehicle inventory turns, mileage-to-price depreciation curves, and commercial dealer stock levels.
- **Geospatial & Regional Demand Mapping:** Visualize regional pricing differentials across Austrian federal states (Vienna, Lower Austria, Upper Austria, Styria, Tyrol, Carinthia, Salzburg, Vorarlberg, Burgenland).
- **Competitor Price Monitoring:** Ingest weekly catalog feeds to benchmark retail pricing against peer sellers in the Austrian domestic market.

***

### 📊 Comparison Matrix

| Capability | Willhaben Scraper (This Actor) | Manual Portal Search | Generic Web Scrapers | Competitor Scraping Tools |
|---|---|---|---|---|
| **Throughput Speed** | ~100 listings in 15 seconds | 1 listing every 20 seconds | Heavy browser memory spikes | Rate-limited / Frequent 403s |
| **Dealer Classification** | ✅ Accurate `ORGNAME` parsing | 🟡 Manual account inspection | ❌ Misinterprets `ORGID` on all ads | ❌ Treats all sellers as identical |
| **Multi-Vertical URLs** | ✅ Marktplatz, Cars, Real Estate | ❌ Single category search only | ❌ URL parameter parsing fails | 🟡 Inflexible category filters |
| **GPS Coordinates** | ✅ Exact Latitude & Longitude | 🟡 Buried in map scripts | ❌ Missed by generic parsers | 🟡 Inconsistent geo extraction |
| **Deep 1,000+ Scale** | ✅ Unlocked infinite pagination | ❌ 30 items per page click | ❌ Drops connections at page 5 | 🟡 Caps results at 100–200 |
| **Anti-Bot Resilience** | ✅ Pre-configured AT Residential | 🟡 Blocked after 20 pages | ❌ 403 Datacenter blocks | 🔴 Expensive custom proxy setups |

***

### 🏢 B2B Lead Generation: The Dealer Advantage

Willhaben assigns an internal `ORGID` attribute to every advertisement across the site — including private individuals. Generic scrapers frequently make the mistake of classifying every listing as a commercial business.

This actor solves this critical challenge by auditing the verified **`ORGNAME`** attribute:

- **Commercial Dealer (`sellerType: "dealer"`):** Features a verified corporate legal name (e.g., `"Autohaus Mayer GmbH"` or `"Juwelier Wagner"`). Ideal for B2B supplier outreach, dealer financing pitches, and merchant acquisition.
- **Private Seller (`sellerType: "private"`):** Identifies consumer sellers where personal names are withheld to protect privacy.

***

### 🏗️ Architecture & Data Transformation Pipeline

The diagram below outlines how the scraper queries, extracts, and structures Willhaben marketplace data:

```
[ Target: willhaben.at Search Query or Start URL ]
                       │
                       ▼
[ Apify Residential Proxy Engine (Austria - AT) ]
   └─► Session Rotation per Search Page (Bypasses Datacenter 403 Blocks)
                       │
                       ▼
[ SSR Next.js Hydration Parser ]
   ├─► Locates <script id="__NEXT_DATA__"> JSON Payload
   ├─► Extracts searchResult.advertSummaryList Array
   └─► Transforms Dynamic attributes.attribute[] into Key-Value Map
                       │
                       ▼
[ Data Normalization & Enrichment ]
   ├─► EUR Amount & Display Price Normalizer
   ├─► Dealer Verification (Audits ORGNAME vs. ORGID)
   ├─► Geolocation Parser (Splits Coordinates into Latitude / Longitude)
   ├─► Timestamp Formatter (Converts Epoch Milliseconds to ISO 8601)
   └─► (Optional) Concurrent Detail Worker for Full Text & Phone Numbers
                       │
                       ▼
[ Deduplication Engine (Unique Ad ID Hash Map) ]
                       │
                       ▼
[ Apify Dataset Storage (JSON / CSV / XLSX / REST API) ]
```

***

### 🏷️ Multi-Vertical Field Extraction Matrix

Willhaben serves distinct commercial sectors with specific data attributes. This actor dynamically normalizes attributes across verticals:

| Category | Typical Attributes Extracted |
|---|---|
| **Marktplatz (General)** | Title, Price, Condition, Category Tree, Location, Dealer Business Name, Gallery Photos |
| **Immobilien (Real Estate)** | Estate Type (Apartment, House), Living Area ($m^2$), Rooms, Postal Code, District, State, GPS Coordinates |
| **Gebrauchtwagen (Automotive)**| Make, Model, Mileage (KM), First Registration Year, Fuel Type, Transmission, Dealer Name |
| **Jobs & Services** | Position Title, Employing Organization, Municipal Work Location, Publication Date |

***

### ✨ Key Features & Capabilities

- ✅ **Dual Search Modalities:** Search by keyword list (`searchTerms: ["iphone", "rolex"]`) or paste category URLs (`startUrls`) for real estate and automotive searches.
- ✅ **1,000+ Deep Pagination:** Automatically walks pagination pages (30 listings per page) until your specified limit is satisfied, without artificial page caps.
- ✅ **Commercial vs. Private Filtering:** Filter results immediately at extraction time using `sellerType: "dealer"` or `sellerType: "private"`.
- ✅ **Price Bounds Filtering:** Restrict collection to specific budget brackets using `priceMin` and `priceMax`.
- ✅ **Geographic Precision:** Extracts full location breakdowns: municipality, postal code (PLZ), district, state, and GPS coordinates (latitude / longitude).
- ✅ **Optional Phone Enrichment:** Toggle `scrapeDetails: true` to open individual detail pages and extract full description text and seller phone numbers.
- ✅ **Automated Image Galleries:** Captures primary cover photos alongside full resolution gallery image arrays.
- ✅ **Zero Duplicate Guarantee:** In-memory ID tracking prevents duplicate records across overlapping search categories.

***

### 🎯 High-Impact Use Cases

#### 1. B2B Merchant & Dealership Acquisition

Fintech lenders, automotive warranty providers, and logistics platforms filter for `sellerType: "dealer"` across automotive and electronics categories to source active Austrian merchants for cold outreach.

#### 2. Retail Arbitrage & Flipping

Professional resellers monitor undervalued electronics, watches, musical instruments, and designer clothing by setting hourly scheduled runs with price maximum thresholds.

#### 3. Commercial Real Estate & PropTech Aggregators

Real estate analysts paste regional search URLs (e.g. Vienna apartments) to monitor asking rent per square meter, heating type, and geographic supply density.

#### 4. Automotive Industry Benchmarking

Car dealerships and insurance adjusters track used vehicle listings by make and model to calculate actual secondary market transaction values.

#### 5. Brand Protection & Counterfeit Detection

Luxury brands monitor grey market distribution and unauthorized dealer sales of branded goods across Austrian classifieds.

***

### 📥 Input Configuration

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array | `["iphone"]` | Keywords to search on the Willhaben marketplace (Marktplatz). Each keyword is crawled independently. |
| `startUrls` | Array | `[]` | Direct Willhaben category or filtered search URLs (e.g. real estate or used car listings). |
| `sellerType` | String | `""` | Filter by seller classification: `""` (any seller), `"dealer"` (commercial businesses), or `"private"` (private individuals). |
| `priceMin` | Integer | `null` | Lower price threshold in EUR (€). |
| `priceMax` | Integer | `null` | Upper price threshold in EUR (€). |
| `scrapeDetails` | Boolean | `false` | When enabled, requests detail pages to capture full descriptions and seller telephone numbers where available. |
| `maxItems` | Integer | `100` | Maximum number of listings to collect across all sources. Set to `0` for unlimited deep pagination. |
| `maxPagesPerSearch` | Integer | `0` | Maximum pages per search term / URL (~30 items per page). Set to `0` for unlimited pages governed by Max Items. |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "AT" }` | Apify Residential Proxy (Austria) is required to prevent 403 blocks. |

***

### 📤 Output Data Fields

Every record returned from Willhaben contains clean, normalized fields ready for immediate analysis.

#### 📦 Product & Listing Overview

| Field | Type | Coverage | Description |
|---|---|---|---|
| `id` | String | 🟢 High | Unique numeric Willhaben listing ID (e.g., `"198273645"`). |
| `url` | String | 🟢 High | Canonical listing URL on Willhaben.at. |
| `title` | String | 🟢 High | Complete advertisement headline or product title. |
| `price` | Number | 🟢 High | Numeric asking price in Euros (e.g., `850.00`). |
| `currency` | String | 🟢 High | Currency code (typically `"EUR"`). |
| `description` | String | 🟡 Conditional | Summary description (full description extracted when `scrapeDetails: true`). |
| `scrapedAt` | String | 🟢 High | ISO 8601 UTC timestamp of execution. |

#### 👤 Seller & Merchant Intelligence

| Field | Type | Coverage | Description |
|---|---|---|---|
| `sellerType` | String | 🟢 High | Classification: `"dealer"` (commercial business) or `"private"` (private seller). |
| `sellerName` | String | 🟡 Conditional | Official business name for dealers (e.g., `"Mobilfunk Gruber GmbH"`). |
| `isDealer` | Boolean | 🟢 High | Boolean flag indicating whether the seller is an established business. |
| `orgId` | String | 🟡 Conditional | Willhaben internal organisation identifier. |
| `phone` | String | 🟡 Conditional | Seller contact telephone number (requires `scrapeDetails: true`). |

#### 📍 Geographic & Location Details

| Field | Type | Coverage | Description |
|---|---|---|---|
| `location` | String | 🟢 High | City or district locality name (e.g., `"Wien, 10. Bezirk, Favoriten"`). |
| `postcode` | String | 🟢 High | Austrian 4-digit postal code (e.g., `"1100"`). |
| `district` | String | 🟡 Conditional | Municipal administrative district. |
| `state` | String | 🟢 High | Austrian federal state (e.g., `"Wien"`, `"Niederösterreich"`, `"Steiermark"`). |
| `country` | String | 🟢 High | Country name (`"Österreich"`). |
| `address` | String | 🟡 Conditional | Specific street address when published by seller. |
| `latitude` | Number | 🟡 Conditional | WGS84 geographic latitude coordinate. |
| `longitude` | Number | 🟡 Conditional | WGS84 geographic longitude coordinate. |

#### 🖼️ Photos & Timestamps

| Field | Type | Coverage | Description |
|---|---|---|---|
| `imageUrl` | String | 🟢 High | Primary cover photograph URL. |
| `images` | Array | 🟢 High | Array of all high-resolution product photographs. |
| `publishedDate` | String | 🟢 High | ISO 8601 timestamp when the listing was first published. |
| `changedDate` | String | 🟡 Conditional | ISO 8601 timestamp of the most recent price or text update. |

***

### 💻 Sample Output Record

```json
{
  "id": "194820194",
  "url": "https://www.willhaben.at/iad/kaufen-und-verkaufen/d/apple-iphone-15-pro-128gb-titan-natur-neuwertig-194820194/",
  "title": "Apple iPhone 15 Pro 128GB Titan Natur neuwertig",
  "price": 820.0,
  "currency": "EUR",
  "sellerType": "dealer",
  "sellerName": "Technik Corner Wien GmbH",
  "isDealer": true,
  "orgId": "918234",
  "location": "Wien, 01. Bezirk, Innere Stadt",
  "postcode": "1010",
  "district": "Innere Stadt",
  "state": "Wien",
  "country": "Österreich",
  "address": "Kärntner Straße 45",
  "latitude": 48.2045,
  "longitude": 16.3712,
  "publishedDate": "2026-11-09T08:30:00.000Z",
  "changedDate": "2026-11-10T11:15:00.000Z",
  "imageUrl": "https://cache.willhaben.at/mmo/4/194/820/194_-192837465.jpg",
  "images": [
    "https://cache.willhaben.at/mmo/4/194/820/194_-192837465.jpg",
    "https://cache.willhaben.at/mmo/4/194/820/194_982736451.jpg"
  ],
  "phone": "+43 1 5123456",
  "description": "Verkaufe neuwertiges iPhone 15 Pro 128GB in Titan Natur mit Originalverpackung und Rechnung. Inklusive 12 Monate Händlergewährleistung.",
  "searchTerm": "iphone",
  "scrapedAt": "2026-11-10T13:45:00.000Z"
}
```

***

### 🛠️ Programmatic Integration & Code Examples

Integrate Willhaben listings into automated monitoring workflows via Python, Node.js, or cURL.

#### Python Integration

```python
from apify_client import ApifyClient

## Initialize client with your Apify API token
client = ApifyClient("YOUR_APIFY_TOKEN")

## Trigger Willhaben extraction for dealer electronics
run = client.actor("haketa/willhaben-scraper").call(
    run_input={
        "searchTerms": ["iphone", "macbook"],
        "sellerType": "dealer",
        "priceMin": 300,
        "maxItems": 100,
        "maxPagesPerSearch": 0
    }
)

## Fetch results from dataset
items = client.dataset(run["defaultDatasetId"]).list_items().items
for listing in items:
    print(f"[{listing.get('sellerType').upper()}] {listing.get('title')} — €{listing.get('price')}")
    print(f"  Seller: {listing.get('sellerName')} | Location: {listing.get('location')}")
```

#### Node.js Integration

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: 'YOUR_APIFY_TOKEN',
});

const run = await client.actor('haketa/willhaben-scraper').call({
    searchTerms: ['rolex'],
    maxItems: 50,
    maxPagesPerSearch: 0,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Successfully scraped ${items.length} Willhaben listings.`);
```

#### cURL API Request

```bash
curl -X POST "https://api.apify.com/v2/acts/haketa~willhaben-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["iphone"],
    "maxItems": 50,
    "maxPagesPerSearch": 0
  }'
```

***

### 🚀 Quickstart Guide

1. Log in to your **Apify Console** workspace.
2. Search for **Willhaben Scraper** in the Apify Store.
3. Configure your target query:
   - Enter one or more keywords in `searchTerms` (e.g. `["iphone"]`).
   - Or paste a real estate / used car search URL into `startUrls`.
4. (Optional) Filter by `sellerType` (`dealer` or `private`) or price thresholds.
5. Set `maxItems` to your target volume (e.g., `100` for a sample or `0` for unlimited).
6. Click **Start** to initiate execution.
7. Download your normalized dataset as **JSON, CSV, or Excel**.

***

### ⚡ Performance, Scaling & Best Practices

- **Deep 1,000+ Result Runs:** When crawling high-volume categories, set `maxPagesPerSearch: 0` and specify your desired total limit in `maxItems` (e.g., `1000` or `5000`). The actor paginates smoothly through 30+ pages.
- **Fast Mode vs. Detail Enrichment:** Keep `scrapeDetails: false` for standard price and seller monitoring. Enabling detail scraping requests each ad individually, which is slower and increases proxy consumption.
- **Proxy Configuration:** Always keep **Residential Proxy (Austria)** enabled. Willhaben blocks standard datacenter IP ranges with HTTP 403 Forbidden responses.
- **Real Estate & Car Categories:** Use your web browser to perform complex searches on Willhaben (e.g. filter for 3-room apartments in Graz under €1,200), copy the resulting URL from your browser address bar, and paste it directly into `startUrls`.

***

### ❓ Frequently Asked Questions

**Do I need a Willhaben account to scrape listings?**
No. This actor extracts publicly accessible marketplace data without requiring user registration, login credentials, or authentication cookies.

**Why is an Austrian residential proxy required?**
Willhaben enforces strict network firewall policies that block requests originating from public datacenter hosting providers. Apify Residential Proxies routed through Austria provide 100% reliable page delivery.

**How does dealer identification work?**
While all listings contain an internal ID, only verified commercial businesses possess an official `ORGNAME`. The scraper validates this field to accurately set `isDealer: true` and populate `sellerName`.

**Can I scrape used cars or real estate?**
Yes. You can paste any active Willhaben search URL from the Immobilien (real estate) or Gebrauchtwagen (automotive) sections into `startUrls`.

**What formats are available for data export?**
You can download the dataset as JSON, CSV, Excel (XLSX), XML, or connect directly via the Apify REST API to platforms like Make, Zapier, or Google Sheets.

**Are phone numbers guaranteed for every listing?**
No. Phone numbers are optional for sellers on Willhaben. When present and when `scrapeDetails: true` is enabled, the actor parses and formats the contact number.

***

### 🔗 Related Classifieds & Marketplace Scrapers

Complement your European e-commerce and classifieds data pipeline with related actors:

- [Milanuncios Scraper — Spain #1 Classifieds](https://apify.com/haketa/milanuncios-scraper)
- [Yad2 Real Estate Scraper — Property Listings & Seller Leads](https://apify.com/haketa/yad2-scraper)
- [Boliga Scraper — Danish Real Estate & Sold History](https://apify.com/haketa/boliga-scraper)
- [OfferUp Scraper — US Local Marketplace & Classifieds](https://apify.com/haketa/offerup-scraper)
- [ZAP Imóveis Scraper — Brazil Real Estate Marketplace](https://apify.com/haketa/zapimoveis-scraper)

***

### 📋 Changelog

- **v1.2 (2026-11)** — Unlocked deep 1,000+ pagination by treating `maxPagesPerSearch: 0` as unlimited; removed restrictive page limits; optimized prefill execution to complete under 25 seconds; refined dealer vs. private seller classification logic.
- **v1.1 (2026-08)** — Added support for `startUrls` across real estate and automotive verticals; implemented optional detail page enrichment for phone numbers and full descriptions.
- **v1.0 (2026-05)** — Initial release featuring Austrian marketplace keyword searching, residential proxy routing, GPS coordinate extraction, and multi-format export.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/willhaben-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search on the Willhaben marketplace (Marktplatz), e.g. 'iphone', 'rolex', 'sofa'. Each is searched separately. Leave empty if you use Start URLs.

## `startUrls` (type: `array`):

Optional. Paste full Willhaben search URLs to scrape any category directly (real estate, cars, jobs), e.g. 'https://www.willhaben.at/iad/immobilien/...'. When provided, Search Terms and filters below are ignored for these URLs.

## `sellerType` (type: `string`):

Filter by private sellers or dealers/businesses (great for B2B lead generation).

## `priceMin` (type: `integer`):

Only listings at or above this price.

## `priceMax` (type: `integer`):

Only listings at or below this price.

## `scrapeDetails` (type: `boolean`):

Open each ad for the full description and seller phone number where available. Slower but richer.

## `maxItems` (type: `integer`):

Maximum number of listings to collect across all searches. Set to 0 for unlimited pagination.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to scrape per search term / URL. Each page has about 30 listings. Set to 0 for unlimited pages governed by Max Items.

## `proxyConfiguration` (type: `object`):

Apify Residential Proxy (Austria) is enabled by default and is required — Willhaben blocks datacenter IPs, so residential is needed for reliable results.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "sellerType": "",
  "scrapeDetails": false,
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AT"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open to view and export all scraped listings (JSON, CSV, Excel).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "scrapeDetails": false,
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "AT"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/willhaben-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "scrapeDetails": False,
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "AT",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/willhaben-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "scrapeDetails": false,
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AT"
  }
}' |
apify call haketa/willhaben-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/willhaben-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KpM7BYcPCstM9oTJN/builds/fS3i7ljSudqDTgTee/openapi.json
