# Ricardo.ch Listings Scraper (`devilscrapes/ricardo-ch-listings-scraper`) Actor

Scrape live auction and classifieds listings from Ricardo.ch, Switzerland's #1 online marketplace — search by category or free-text slug and get title, price, listing URL, image, and a stable listing ID in one structured dataset, page after page.

- **URL**: https://apify.com/devilscrapes/ricardo-ch-listings-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Ricardo.ch Listings Scraper

**💰 $4.20 / 1 000 listings**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Scrape live auction and classifieds listings from Ricardo.ch, Switzerland's #1 online marketplace — search by category or free-text slug and get title, price, listing URL, image, and a stable listing ID in one structured dataset, page after page.

</div>

***

### 🎯 What this scrapes

Ricardo.ch is Switzerland's #1 auction and classifieds marketplace, and its search-results page (`/de/s/<slug>`) is the entry point for browsing any category or free-text query — laptops, bikes, watches, whatever buyers are searching for. This Actor drives that same search endpoint and returns every listing it finds as one clean row: title, price in CHF, listing URL, image, and a stable numeric listing ID, deduplicated across pages.

### 🔥 What we handle for you

- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, rotated browser impersonation on every retry.
- 🧩 **One search, two wire formats handled** — Ricardo.ch ships page 1 and page 2+ differently under the hood; we normalize both into the same clean row shape.
- 🫠 **A single unparsable page never fails the run** — logged and pagination stops cleanly, the rest of your data still ships.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, deduplicated by listing ID, ISO-8601 timestamps, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for listings actually returned; a zero-match search costs nothing beyond the warm-up fee.

### 💡 Use cases

- Price monitoring — track how a category's listings and asking prices shift week to week.
- Resale sourcing — scan a category or keyword for underpriced listings worth flipping.
- Market research — build a dataset of live CHF pricing across Ricardo.ch categories.
- Feed a spreadsheet or BI tool with structured Swiss marketplace data, no manual copy-paste.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `search_slug` | `string` | no | 'laptop' | The path segment after /de/s/ on Ricardo.ch — a category or free-text search term (e.g. laptop, velo). |
| `max_pages` | `integer` | no | 2 | Hard cap on pages fetched. Keep at 2 or higher to exercise both of Ricardo.ch's listing formats. |
| `max_results` | `integer` | no | 100 | Hard cap on dataset rows returned across all pages. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | Ricardo.ch's public search page is keyless with no anti-bot surface observed. Leave this off unless your account… |

#### Example input

```json
{
  "search_slug": "laptop",
  "max_pages": 2,
  "max_results": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `listing_id` | `string` | Numeric id trailing the listing URL (e.g. "1321416530"). |
| `title` | `string` | Listing name/title. |
| `price` | `number` | Asking/current price. Null when unparsable (e.g. "Preis auf Anfrage"). |
| `currency` | `string` | Always "CHF" for Ricardo.ch. |
| `listing_url` | `string` | Absolute URL to the listing detail page. |
| `image_url` | `string` | Primary listing image, when present. |
| `search_slug` | `string` | The input slug this row was found under. |
| `page` | `integer` | 1-based page number this row was scraped from. |
| `source_format` | `string` | Which parser produced this row: json\_ld (page 1) or react\_flight (page 2+). |
| `scraped_at` | `string` | ISO-8601 timestamp of this fetch. |

#### Example output

```json
{
  "listing_id": "1321416530",
  "title": "POWERHOUSE MacBook Pro 16Zoll/M4 Pro/2 TB SSD/24 GB RAM",
  "price": 2800.0,
  "currency": "CHF",
  "listing_url": "https://www.ricardo.ch/de/a/powerhouse-macbook-pro-16zoll-m4-pro-2-tb-ssd-24-gb-ram-1321416530/",
  "image_url": "https://ricardo-images.example/1321416530.jpg",
  "search_slug": "laptop",
  "page": 1,
  "source_format": "json_ld",
  "scraped_at": "2026-09-20T00:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result-row` | $0.004 | Per unique dataset item |

Example: 1 000 listings at the rates above ≈ **$4.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Search-results fields only — no detail-page enrichment (seller info, bid history, full description) in this version.
- No auction end-time or bid-count fields — not published on the search-results page.
- German-language /de/s/ search path only; French/Italian locale paths are out of scope.
- Any endpoint requiring login (watchlist, bids, messaging) is out of scope.

### ❓ FAQ

**Do I need a Ricardo.ch account or login?**

No. This Actor reads only the public search-results page — no login, no auth header, no cookie session required.

**What happens if my search slug has no listings?**

The run succeeds with zero rows and a status message naming the slug searched — no placeholder rows, no failed run.

**Which locale does this cover?**

The German-language /de/s/ search path only. French (/fr/s/) and Italian (/it/s/) locales are not covered in this version.

**Does this scrape the full listing detail page?**

Not in this version — you get everything the search-results page publishes (title, price, URL, image, listing ID). Seller info, bid history, and full descriptions may land in a future version.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/ricardo-ch-listings-scraper/changelog.md

# Actor input Schema

## `search_slug` (type: `string`):

The path segment after <code>/de/s/</code> on Ricardo.ch — a category or free-text search term (e.g. <code>laptop</code>, <code>velo</code>).

## `max_pages` (type: `integer`):

Hard cap on pages fetched. Keep at 2 or higher to exercise both of Ricardo.ch's listing formats (page 1 and page 2+ ship data differently under the hood).

## `max_results` (type: `integer`):

Hard cap on dataset rows returned across all pages.

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

Residential Swiss exits, pinned. Ricardo.ch is keyless and shows no anti-bot surface from a local connection, but it returns HTTP 403 to Apify's datacenter egress (cloud QA 2026-09-21, both pages). It is a Swiss-only marketplace, so the exit country is also what makes prices and availability correct.

## Actor input object example

```json
{
  "search_slug": "laptop",
  "max_pages": 2,
  "max_results": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CH"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "search_slug": "laptop",
    "max_pages": 2,
    "max_results": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CH"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/ricardo-ch-listings-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 = {
    "search_slug": "laptop",
    "max_pages": 2,
    "max_results": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CH",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/ricardo-ch-listings-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 '{
  "search_slug": "laptop",
  "max_pages": 2,
  "max_results": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CH"
  }
}' |
apify call devilscrapes/ricardo-ch-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/ricardo-ch-listings-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/0n5IIFBfwfaF1pIKb/builds/hsTkLsodDDPeL8vcU/openapi.json
