Skip to main content

Complete Guide: How to Scrape Ricardo Listings Using Python

Run the Ricardo Scraper Apify Actor from Python and turn Ricardo.ch keyword searches into rows with bids, buy-now prices and end times.

Updated 11 min readMarkdown
Complete Guide: How to Scrape Ricardo Listings Using Python

This guide shows how to pull listings from Ricardo.ch, the Swiss marketplace for auctions and fixed-price sales, into Python. The tool is the Ricardo Scraper Apify Actor (reventadata/ricardo-scraper), which I built for this site. You start a run from Python with the Apify API client, wait for it to finish, and read back one structured row per listing.

The rows in this guide come from one real run I made on 18 November 2026. It used the keyword iphone and a cap of ten rows, and the sample rows are copied from its dataset. Nothing in them is invented.

By the end you will know which inputs the Actor takes, what each output field means, how the price field is chosen, what the Actor does not return, and how to compare bids with buy-now prices in a few lines of Python.


TL;DR

In this tutorial you will learn to run reventadata/ricardo-scraper from Python, pass a keyword and a row cap, and print one line per listing with its title, price in CHF, bid count, end time and city. The key steps are: install apify-client, set the input, call the Actor, read the dataset. In the run this guide uses, the outcome was ten printed listings for the keyword iphone, from a run of 92.5 seconds.


Prerequisites and setup

You need Python 3.11 or newer, because the Apify client for Python requires it. You also need a free Apify account. You can sign up with an email address or a GitHub login.

Install the client and export your API token, which you copy from Settings > API & Integrations in Apify Console:

pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"

The Apify client for Python is the library that calls the Apify API from Python. The token stays in your environment, so the script itself carries no secret. The Apify documentation for the client is at docs.apify.com/api/client/python.


Understanding Ricardo Scraper

Ricardo Scraper reads public search pages on Ricardo.ch by keyword. Each listing on a results page becomes one row, with its current bid, buy-now price, number of bids, start and end times, condition, brand, shipping options, the city the item ships from and a link to the listing page.

Four limits matter when you plan a run. The site serves 60 listings per page. The Actor reads at most 1,000 pages for one keyword. Search results carry the seller's id but not the seller's name. The listing description and attributes are not in the row.

The Actor is unofficial and not affiliated with Ricardo. Ricardo is a trademark of its owner, and the name appears here only to say what the tool reads. The Actor reads public pages with no login. Proxy handled for you, so you do not need to set one.


Step-by-step guide to using Ricardo Scraper

Step 1: Find the Actor

The Store page describes the Actor's inputs and output. For the Python route you only need its identifier, reventadata/ricardo-scraper. The client starts the run by that name, so there is no need to open the Console to configure anything.

Step 2: Configure the input

The input has three fields.

  • searchQueries is required. It is a list of keywords, and each keyword is searched separately. Use a single term such as iphone for a first test, or several terms in one list for a wider sweep.
  • maxItems is a hard cap on rows across all keywords together. The default is 100. Set it to a small number while you learn the output.
  • maxPages is an optional cap on result pages per keyword. A page holds up to 60 listings. Without this cap, a broad keyword walks pages until it reaches the row cap or runs out of pages.

Two configurations are useful. For a quick check, use one keyword, maxItems set to 10 and maxPages set to 1. For a wider pull, list several keywords, raise maxItems and leave maxPages out only when you are sure you want the full depth of each search.

Step 3: Start the run and read the dataset

The next script puts the whole flow in one place. It starts the Actor, waits for it, reads the default dataset of the run and prints one line per listing:

import os
from apify_client import ApifyClient

# 1. Initialise the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Describe the search: one keyword, at most 10 rows, one results page
run_input = {
    "searchQueries": ["iphone"],
    "maxItems": 10,
    "maxPages": 1,
}

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/ricardo-scraper").call(run_input=run_input)
if run is None:
    raise SystemExit("The run returned no result.")

# 4. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} listings.\n")

# 5. Print one line per listing: title, price in CHF, bids, end time and city
for item in items:
    print(f"{item['title']} | {item['price']} CHF | {item['bidsCount']} bids | ends {item['endDate']} | {item['itemCity']}")

The call() method starts the Actor and waits for it to finish before it returns the run object. If the run is not None, its default_dataset_id points to the dataset that holds the rows. The list_items() call returns a page of those rows, and its items attribute is the list of dictionaries the script loops over.

A run the site refused ends FAILED with no rows. A keyword search that matches nothing ends SUCCEEDED with an empty dataset and a status message. The status message is the place to check which case you are in.

Step 4: Read a row

Each row is one JSON object. This is one listing from the run, copied as the Actor wrote it. The two image address fields, imageUrl (the large first photo) and thumbnailUrl (the small one), are left out of the block to keep it short:

{
    "id": "1335256100",
    "title": "iPhone 15 Pro Max 256 GB Titan Schwarz – OVP, 89% Akku",
    "url": "https://www.ricardo.ch/de/a/iphone-15-pro-max-256-gb-titan-schwarz-ovp-89-akku-1335256100/",
    "price": 499,
    "currency": "CHF",
    "bidPrice": 423,
    "buyNowPrice": 499,
    "hasAuction": true,
    "hasBuyNow": true,
    "bidsCount": 36,
    "startDate": "2026-11-11T09:38:00Z",
    "endDate": "2026-11-18T09:38:00Z",
    "creationDate": "2026-11-11T09:38:00Z",
    "conditionKey": "acceptable",
    "categoryId": 49329,
    "productTypeKey": "mobile_phone",
    "brand": "Apple",
    "sellerId": "403517476",
    "shipping": [
        {
            "key": "get_by_buyer",
            "cost": 0
        },
        {
            "key": "parcel_b_2kg",
            "cost": 9
        }
    ],
    "itemZipCode": "8037",
    "itemCity": "Zürich",
    "isMoneyGuard": true,
    "isPromo": false,
    "canMakeAnOffer": false,
    "highlight": "popular",
    "searchQuery": "iphone",
    "searchUrl": "https://www.ricardo.ch/de/s/iphone/"
}

The fields you will use first are title, price, bidPrice, buyNowPrice, bidsCount, endDate and itemCity. Times are ISO 8601 in UTC, as the output schema states.


Working with the API

The script above is the whole integration. It uses three pieces of the client. ApifyClient takes the token from the environment. client.actor(...).call(run_input=...) starts the Actor by its name and returns the finished run. client.dataset(run.default_dataset_id).list_items() reads the rows of that run.

The token is the only credential. Read it from the environment and never paste it into the script or into a shared file. The run_input dictionary holds only the search settings.

The client's error handling is outside this guide's scope. The script checks for a None result, and it leaves the rest of the handling to you. If you need to run the Actor again with a new keyword, change the dictionary and call the same method again.

Keep the input in one place. A single dictionary with searchQueries, maxItems and maxPages is easy to change, and it makes a second run with a different keyword a one-line edit.


Advanced usage patterns

Several keywords in one run. Put more terms into searchQueries. The Actor searches them one after another. A listing returned under an earlier keyword is not returned again under a later one, so a row appears once even when two terms find it. Each row names the keyword that found it in searchQuery and the search page in searchUrl.

One row budget for the whole run. maxItems counts rows across all keywords. Once the run reaches the cap it stops, so a long list of keywords cannot push the dataset past the number you set. Choose the cap before you choose the keywords, so the budget is not spent on the first term.

Compare bids with buy-now prices. The price field is the buy-now price when a listing has one, and the current bid otherwise. To see the gap, read bidPrice and buyNowPrice together. Rows that have both fields show how far the current bid sits below the buy-now price. Rows with only one field show how the listing is sold.

Sort by end time. The end times are ISO 8601 strings in UTC with the same format on every row, so sorting the strings puts them in time order. Sort on endDate to see which listings close first.

Keep the output shape in view. When you change the input, check the first few rows again before you trust a larger run. The fields do not change, but a different keyword can return a different mix of auction and fixed-price rows.


Understanding your data

Each row describes one listing as Ricardo's search results show it. The id field is Ricardo's own listing id, and the url field links to the listing page. Prices are in CHF. The currency field says so on every row.

The shipping list holds the options a seller offers. Each option has a key, such as get_by_buyer for pick-up or parcel_b_2kg for a parcel, and a cost in CHF. The itemCity and itemZipCode fields come from the first option in that list.

The fields hasAuction and hasBuyNow tell you how a listing can be bought. A fixed-price listing has no bidPrice. An auction-only listing has no buyNowPrice.

The ten rows of this run show the mix. Nine listings are auctions, and six have a buy-now price. Five have both, four are auction-only and one is buy-now only. On each of the five listings with both, the buy-now price is higher than the current bid. Prices run from 6 CHF to 2200 CHF, and bid counts run from 0 to 78.

The end times of the ten listings fall between 2026-11-18T09:38:00Z and 2026-11-19T09:53:00Z. Condition values are acceptable on seven rows, like_new on two and new on one. The ten rows name seven different places as itemCity, and four of them name Zürich.

Every row has an id that is unique within the run, and every row carries a sellerId. No row in this run has an empty title, url or searchQuery.


Troubleshooting guide

The dataset is empty and the status is SUCCEEDED. The site answered and no listing matched the keyword. Try a broader term.

The run is FAILED with no rows. There are two common causes. The input had no keyword, and the status message asks for at least one searchQueries entry. Or the site refused the pages, and the message gives the reason. In the second case, wait and run again later.

A field is null in some rows. A null is the site's own answer for that listing. bidPrice is null on a fixed-price listing, and buyNowPrice is null on an auction-only one. Read the other rows before you treat one null as a fault.

Where to look. The run's log and status message in Apify Console show what the run did, page by page, with the rows it kept. The Apify documentation covers the dataset and run objects in more depth.


Best practices

  • Test with small caps. Start with maxItems at 10 and maxPages at 1, and raise them only after the output looks right.
  • Keep one run per question. A focused keyword gives a clean dataset. A broad list gives a mixed one that is harder to read.
  • Check the status before the rows. A FAILED run with no rows and a SUCCEEDED run with no rows mean different things.
  • Store only the fields you need. Keep the price, bid, end time and link, and drop the rest when you save the rows.
  • Read the site's terms. Check Ricardo's terms of use and the data-protection rules that apply to you before you store or republish the rows.

Conclusion and next steps

You now have a script that starts the Ricardo Scraper Actor, waits for the run and prints one line per listing. You know that price is the buy-now price when one exists and the current bid otherwise, and you know which fields are empty for which kinds of listing.

Next, try a second keyword and compare its rows with the first. Add a filter on bidPrice and buyNowPrice, or sort on endDate, to answer a question you actually have.

For current pricing and details, see the Store page.

Resources

About the author: reventadata builds and publishes data extraction Actors on the Apify Store.

About the author

  • Hi, I'm the engineer behind ReventaData. I build pay-per-event Apify Actors that turn public marketplace, classifieds, jobs and real-estate sites into clean, reliable datasets. Here on Hashnode, I share practical tutorials on collecting structured web data with Python and Apify, and on putting it to work: price tracking, lead lists and market analysis. Explore our turnkey scrapers: https://apify.com/reventadata

No comments yet. Be the first to comment.