# Comparis.ch Listings Scraper with Public Emails (`muhammadafzal/comparis-ch-scraper`) Actor

Search public Comparis.ch car and real-estate listings. Extract prices, locations, seller details, phones, images, and publicly displayed emails for automotive, property, and market research workflows. Returns structured JSON with warnings for empty results or anti-bot challenges.

- **URL**: https://apify.com/muhammadafzal/comparis-ch-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Lead generation, Real estate, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 comparis listings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Comparis.ch Listings Scraper with Public Emails

Search public Comparis.ch car or real-estate results and return structured listing records. The actor is designed for Swiss automotive dealers, property researchers, aggregators, and AI agents that need a bounded search-to-JSON workflow.

### What it extracts

Each dataset item contains the listing URL and ID, title, price/currency, location, seller name and phone when visible, image URL, description, category, and an `emails` array. Email extraction is limited to addresses publicly displayed in the listing page or public `mailto:` links; the actor does not log in, guess addresses, or access private contact details.

### Input

Use `category: "cars"` for the car finder, `category: "real_estate"` for the property market, or `category: "custom"` with a public Comparis search URL. `maxResults` defaults to 25 and is capped at 200. `maxPages` defaults to 5. Detail pages and public email extraction are enabled by default.

```json
{
  "category": "cars",
  "searchUrl": "https://www.comparis.ch/carfinder/default",
  "maxResults": 25,
  "maxPages": 5,
  "scrapeDetails": true,
  "extractEmails": true,
  "proxyCountry": "CH"
}
```

### Output and reliability

The dataset contains one normalized item per unique listing URL. The `OUTPUT` and `SUMMARY` key-value records include the count and warnings. Empty searches are successful. If Comparis returns an anti-bot challenge, rate-limit response, or a changed page structure, the actor returns a diagnostic warning instead of silently returning misleading data.

### Pricing and limits

The intended Store billing model is one start event plus one primary event per listing. Keep result caps low while testing, then increase them for production. Residential proxy usage and listing detail navigation can materially increase runtime and cost.

### Legal and responsible use

Use only public data and comply with Comparis.ch terms, applicable Swiss data-protection law, and any source marketplace restrictions. Do not use extracted contact details for unlawful spam or sensitive profiling.

### Use cases

- Build public prospect lists and qualify organizations or professionals before responsible outreach.
- Compare listings, locations, availability, and market signals for property research.
- Run a one-off research job and export the structured result as JSON, CSV, Excel, XML, or RSS from Apify.
- Schedule the same input to monitor changes over time and send completed datasets to a webhook or integration.
- Feed schema-shaped records into a database, spreadsheet, BI tool, or AI workflow with the source URL retained for verification.

### Run Comparis.ch Listings Scraper with Public Emails with the Apify API

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/comparis-ch-scraper').call({
  "category": "cars",
  "searchUrl": "",
  "maxResults": 3,
  "maxPages": 1,
  "scrapeDetails": true,
  "extractEmails": true,
  "proxyCountry": "CH"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also run the Actor from Apify Console, schedules, webhooks, the REST API, Make, Zapier, n8n, or the hosted Apify MCP server.

### Support

When reporting a problem, include the **Actor run ID**, a redacted input, the expected result, and a small public example URL when applicable. Do not post API tokens, cookies, credentials, or personal data in an issue.

### Frequently asked questions

#### Can I schedule Comparis.ch Listings Scraper with Public Emails?

Yes. Use an Apify schedule to run the same saved input at a chosen interval, then connect a webhook or integration to process the dataset when the run finishes.

#### How should I test a new input?

Begin with the prefilled example or a small limit. Confirm that the output fields, source coverage, runtime, and live charges match your workflow before increasing the scope.

#### How do I export the results?

Open the run's default dataset in Apify Console and export JSON, CSV, Excel, XML, or RSS. Applications can retrieve the same records through the Apify API client or REST dataset endpoint.

#### Can an AI agent call this Actor?

Yes. Add `muhammadafzal/comparis-ch-scraper` through the hosted Apify MCP server or call it through the API. The Actor's input and dataset schemas help agents construct valid requests and interpret returned records.

### Recommended workflow

1. **Define the smallest useful scope.** Choose a representative public URL, query, identifier, or filter and keep the first result limit low.
2. **Run and inspect.** Check the run log, dataset item count, field coverage, source URLs, and live event or usage charges.
3. **Validate downstream assumptions.** Confirm nullable fields, deduplication keys, timestamps, and any locale-specific formats before importing records into another system.
4. **Scale gradually.** Increase limits or scheduling frequency only after the small run behaves as expected. Use Apify's maximum-cost and timeout controls to bound large jobs.
5. **Monitor changes.** Keep a small known-good input as a canary. If the source layout or API changes, compare the new dataset with a previously validated run and report the run ID when requesting support.

For recurring workflows, store the exact Actor input with your pipeline configuration. This makes runs reproducible and helps distinguish a source-data change from an input change.

# Actor input Schema

## `category` (type: `string`):

Use this when starting from a Comparis category default. Choose cars, real\_estate, or custom when you provide a direct public Comparis search URL.

## `searchUrl` (type: `string`):

Use this when you already have a public Comparis search URL. Example: https://www.comparis.ch/carfinder/default?make=BMW. Leave blank to use the selected category default; this is not a place for private or authenticated URLs.

## `maxResults` (type: `integer`):

Use this to cap the number of unique listing records returned. Accepts 1–200; default 25. It is a result cap, not a guarantee that the source will return that many listings.

## `maxPages` (type: `integer`):

Use this to limit pagination through the Comparis result pages. Accepts 1–20; default 5. Lower values reduce runtime and proxy usage.

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

Use this to open each public listing page for richer fields such as description, phone, seller name, and email. Disable for faster card-only extraction.

## `extractEmails` (type: `boolean`):

Use this to scan visible listing content and public mailto links for seller/dealer email addresses. Defaults to true. It never logs in, guesses emails, or accesses private contact data.

## `proxyCountry` (type: `string`):

Use this optionally to target a two-letter proxy country code, such as CH. Leave blank to let Apify choose the residential proxy route.

## Actor input object example

```json
{
  "category": "cars",
  "searchUrl": "",
  "maxResults": 3,
  "maxPages": 1,
  "scrapeDetails": true,
  "extractEmails": true,
  "proxyCountry": "CH"
}
```

# Actor output Schema

## `resultsCount` (type: `string`):

Number of listing records written to the dataset.

## `status` (type: `string`):

SUCCEEDED or SUCCEEDED\_WITH\_WARNINGS.

## `warnings` (type: `string`):

Non-fatal diagnostics from the run.

# 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 = {
    "category": "cars",
    "searchUrl": "",
    "maxResults": 3,
    "maxPages": 1,
    "scrapeDetails": true,
    "extractEmails": true,
    "proxyCountry": "CH"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/comparis-ch-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 = {
    "category": "cars",
    "searchUrl": "",
    "maxResults": 3,
    "maxPages": 1,
    "scrapeDetails": True,
    "extractEmails": True,
    "proxyCountry": "CH",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/comparis-ch-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 '{
  "category": "cars",
  "searchUrl": "",
  "maxResults": 3,
  "maxPages": 1,
  "scrapeDetails": true,
  "extractEmails": true,
  "proxyCountry": "CH"
}' |
apify call muhammadafzal/comparis-ch-scraper --silent --output-dataset

```

## MCP server setup

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