# Comparis.ch Scraper - Swiss Real Estate & Cars (`haketa/comparis-scraper`) Actor

Scrape Comparis.ch Swiss listings: real estate (price, rooms, m², type, address, coordinates) and used cars (make, model, price, Comparis market price, mileage, fuel, location). Paste any Comparis result URL — real estate or car market. No login, no API key, no browser.

- **URL**: https://apify.com/haketa/comparis-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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

## Comparis.ch Scraper — Swiss Real Estate & Cars 🇨🇭

Scrape **[Comparis.ch](https://www.comparis.ch)** — Switzerland's biggest comparison marketplace — for **real-estate listings** (rent & buy) and **used-car listings**. Paste any Comparis result URL and get clean, structured data: prices, rooms, size, address, make, model, mileage and more.

No login, no API key, no browser extension. Pure HTTP — fast and cheap. Export to **JSON, CSV, Excel, HTML or XML** or pull from the API.

***

### What you get

#### 🏠 Real estate (`/immobilien`)

- **Property type** (apartment, house…), **deal type** (rent / buy)
- **Price** + currency, **rooms**, **living space (m²)**
- **Address**, neighborhood, **coordinates**
- **Year of construction**, listing partner, image, listing URL

#### 🚗 Used cars (`/carfinder/marktplatz`)

- **Make**, **model**, **trim/type**, **body type**, condition
- **Price** + Comparis **market price** estimate + **Comparis rating**
- **Mileage**, **registration date**, **fuel type**, **location**
- Dealer / partner name, image, **source link** and listing URL

***

### Use cases

- **Price & market monitoring** — track asking prices vs Comparis's market-price estimate for cars, or rent/buy prices by canton.
- **Real-estate market intelligence** — analyse supply, prices and sizes across Swiss regions.
- **Car dealership & reselling research** — find under-market cars (price vs `marketPrice`), by make, model, mileage.
- **Lead generation** — collect listing partners / dealers active in a segment.
- **Comparative datasets** — build Swiss property or vehicle datasets over time.

***

### Input

Paste **Comparis result URLs** in `startUrls` — the scraper detects real estate vs cars automatically and paginates.

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | Comparis result URLs. Real estate: `https://www.comparis.ch/immobilien/result/list?...` (filter on Comparis first). Cars: `https://www.comparis.ch/carfinder/marktplatz/{bodyType}` (e.g. `suv`, `limousine`, `kombi`, `cabrio`, `pickup`, `minivan`). |
| `maxItems` | integer | Max listings per URL (Comparis exposes up to ~1000 per search). |
| `proxyConfiguration` | object | Optional. Defaults to Apify Proxy. |

#### Example input

```json
{
  "startUrls": [
    { "url": "https://www.comparis.ch/immobilien/result/list" },
    { "url": "https://www.comparis.ch/carfinder/marktplatz/suv" }
  ],
  "maxItems": 500
}
```

> **Tip — custom filters:** search on Comparis (canton, price, rooms, make, fuel…) and paste the resulting URL. All filters encoded in the URL are respected.

***

### Output

One row per listing. The `vertical` field is `realEstate` or `car`.

#### Real-estate record

```json
{
  "vertical": "realEstate",
  "id": "38118884",
  "title": "Mein Zuhause in Ascona in Seenähe …",
  "propertyType": "Wohnung",
  "dealType": "rent",
  "price": 1550,
  "currency": "CHF",
  "rooms": 2.5,
  "livingSpaceM2": 65,
  "address": "6612 Ascona",
  "yearOfConstruction": null,
  "latitude": 46.15, "longitude": 8.77,
  "partnerName": "…",
  "imageUrl": "https://…",
  "url": "https://www.comparis.ch/immobilien/marktplatz/details/show/38118884",
  "scrapedAt": "2026-10-14T12:00:00.000Z"
}
```

#### Car record

```json
{
  "vertical": "car",
  "id": "33672554",
  "title": "Jeep Compass Compass 4x2 1.5 T MHEV S",
  "make": "Jeep",
  "model": "Compass",
  "trim": "Compass 4x2 1.5 T MHEV S",
  "bodyType": "suv",
  "condition": "Occasion",
  "price": 23900,
  "marketPrice": 44700,
  "currency": "CHF",
  "comparisRating": 6,
  "mileage": 8000,
  "registrationDate": "11.2023",
  "fuelType": "Benzin/Elektro",
  "location": "1020 (VD)",
  "partnerName": "Autolina",
  "imageUrl": "https://…",
  "sourceUrl": "https://…",
  "url": "https://www.comparis.ch/carfinder/marktplatz/details/33672554",
  "scrapedAt": "2026-10-14T12:00:00.000Z"
}
```

***

### How it works

Comparis renders its marketplaces with Next.js and embeds the results right in the page. The actor fetches each result page over fast HTTP (no browser), reads the embedded listing data, maps it to a clean schema, and pages through the catalog — de-duplicating as it goes. Real estate and cars share the same engine, so one actor covers both.

***

### FAQ

**Do I need a Comparis account?** No — no login or API key.

**Which pages work?** Comparis real-estate result pages (`/immobilien/result/list?…`) and car-market pages (`/carfinder/marktplatz/{bodyType}`), including any filters you set.

**Rent and buy?** Both — the `dealType` field marks each real-estate listing.

**What's `marketPrice` on cars?** Comparis's own estimated market value — compare it to `price` to spot good deals.

**How many listings?** Comparis exposes up to ~1000 per search (100 pages × 10); refine the search for more coverage of a segment.

***

### Legal & ethical use

This actor collects **publicly available** listing data from Comparis.ch. Comparis listings may contain personal data — use the output responsibly and in line with Comparis's Terms and applicable Swiss/EU law. You are responsible for how you use the data.

# Actor input Schema

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

Comparis result URLs. <b>Real estate</b>: filter on <a href='https://www.comparis.ch/immobilien/default'>comparis.ch/immobilien</a> and paste the result URL (e.g. <b>https://www.comparis.ch/immobilien/result/list?...</b>). <b>Cars</b>: a car-market URL (e.g. <b>https://www.comparis.ch/carfinder/marktplatz/suv</b>). Each is paginated automatically.

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

Maximum listings to collect per URL (Comparis paginates up to 100 pages × 10 = 1000 per search).

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

<b>Residential proxy required for real estate</b> (Comparis serves empty data to datacenter IPs); cars work on either. Defaults to Apify Residential.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.comparis.ch/immobilien/result/list"
    },
    {
      "url": "https://www.comparis.ch/carfinder/marktplatz/suv"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Scraped Comparis real-estate and car listings.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.comparis.ch/immobilien/result/list"
        },
        {
            "url": "https://www.comparis.ch/carfinder/marktplatz/suv"
        }
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/comparis-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 = {
    "startUrls": [
        { "url": "https://www.comparis.ch/immobilien/result/list" },
        { "url": "https://www.comparis.ch/carfinder/marktplatz/suv" },
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/comparis-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 '{
  "startUrls": [
    {
      "url": "https://www.comparis.ch/immobilien/result/list"
    },
    {
      "url": "https://www.comparis.ch/carfinder/marktplatz/suv"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call haketa/comparis-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/comparis-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/ZPwhgq5cogfGrBDcd/builds/I7eLlg8mNPdfyEc7d/openapi.json
