By the end of this tutorial you will have a short Python script that searches Ricardo.ch, the Swiss marketplace for auctions and fixed-price sales, and prints each listing with its price in CHF, bid count, end time and the city it ships from. The rows come from Ricardo Scraper (reventadata/ricardo-scraper), an Apify Actor I built for this site. You give it a keyword, it returns one JSON row per listing, and the Apify Python client reads those rows back.

The sample rows below come from one real run I made on 18 November 2026 with the keyword iphone, capped at ten rows. Nothing in them is invented.

Prerequisites

You need three things:

  1. Python 3.11 or newer, which the Apify client for Python requires.
  2. A free Apify account, created with an email address or a GitHub login.
  3. Your API token, from Settings > API & Integrations in Apify Console.

Install the client and export the token:

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

No scraping code is needed on your side. The Actor reads the public search pages for you.

What you'll achieve

You will search Ricardo for iphone, cap the run at ten rows and print one line per listing. Ricardo lists auctions and fixed-price sales side by side, so one row can carry a current bid and a buy-now price at the same time. The script keeps both fields, and you decide which one matters for your search.

The same script works with any keyword. Change the value in searchQueries, or list several keywords there. The Actor searches each keyword in turn and returns a listing only once, even when two keywords find it. Each row also names the keyword that found it, so you can tell the searches apart after the run.

Step 1: Open the Actor

The Actor's Store page describes its inputs and its output. For the Python route you only need its name, reventadata/ricardo-scraper, because the client starts the run for you.

Ricardo is a trademark of its owner. Ricardo Scraper is unofficial and not affiliated with Ricardo. It reads public search pages, with no login.

Step 2: Set the search

The input has three fields:

  • searchQueries (required): a list of keywords. Each keyword is searched separately.
  • maxItems: a hard cap on rows across all keywords together. The default is 100.
  • maxPages: an optional cap on result pages per keyword. Ricardo serves 60 listings per page, and the Actor reads at most 1,000 pages per keyword. Without this cap, a run walks pages until it reaches the row cap or the last page.

Leave out maxPages and a broad keyword walks many pages, so set it while you test. Proxy handled for you.

Step 3: Run it from Python

This script starts the Actor with one keyword, waits for it to finish, reads the run's default dataset 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. A run the site refused ends FAILED with no rows. An empty dataset can also mean that no listing matched, and the run's status message tells you which case you are in.

Step 4: Read the output

Each row is one JSON object. This is one listing from the run. 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 most are title, price, bidPrice, buyNowPrice, bidsCount, endDate and itemCity. Times are ISO 8601 in UTC.

Understanding your results

The price field follows one rule: it is the buy-now price when the listing has one, otherwise the current bid. bidPrice is empty on a fixed-price listing, and buyNowPrice is empty on an auction-only listing.

The shipping list holds each shipping option as a key, such as get_by_buyer for pick-up or parcel_b_2kg, with its cost in CHF. itemCity and itemZipCode come from the first shipping option.

The rows describe search results only. A listing's description, its attributes and the seller's name are not in the row. Each row carries Ricardo's seller id in sellerId.

Here is what the ten rows of this run show:

  • Nine listings are auctions and six have a buy-now price. Five have both, four are auction-only and one is buy-now only.
  • In each of the five listings that have both, the buy-now price is higher than the current bid.
  • Prices run from 6 CHF to 2200 CHF. Bid counts run from 0 to 78.
  • The end times 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.
  • Four rows show Zürich as the city of the first shipping option.

Pro tips

  • Start with maxPages set to 1. One page holds up to 60 listings, which is plenty to check your output shape.
  • maxItems is a cap over the whole run. The run stops when it reaches the cap, so a broad list of keywords cannot return more rows than you set.
  • Several keywords share one row budget. A listing found by an earlier keyword is not returned again under a later one.
  • Compare the two prices in Python. Filter for rows where buyNowPrice is set and bidPrice is lower, or sort on endDate to see which auctions close first.
  • Keep the input in one dictionary. You can change a keyword or a cap in one place and rerun the same script.

Troubleshooting

  • Zero rows, status SUCCEEDED. The site answered and nothing matched the keyword. The status message says so.
  • Zero rows, status FAILED. Either the input had no keyword, in which case the message asks for at least one searchQueries entry, or the site refused the pages and the message gives the reason.
  • A field is empty in one row. The value is null in that row. Check the other rows before you assume a bug.
  • A keyword returns fewer rows than you expected. The cap and the keyword decide the count. A run also stops at the last page the site serves for that keyword.
  • Where to look. The run's log and status message in Apify Console show what the run did.

Next steps

Keep the script in a file and run it on a schedule with your own tool of choice, and store only the fields you need. Read the site's terms of use and the data-protection rules that apply to you before you store or republish the rows.

For current pricing and details, see the Store page.

Which keyword would you search first? Drop a comment! 💬

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