# Complete Guide: How to Scrape Otomoto.pl Car Listings Using Python

This guide shows how to extract passenger-car listings from [otomoto.pl](http://otomoto.pl), a Polish car marketplace, with Python: searched by make and model terms, make, model, price range and production year, returned as one structured row per listing. The tool is the **Otomoto Scraper** Apify Actor (`reventadata/otomoto-scraper`), and you drive it from Python with the official Apify API client.

By the end you will know which inputs the Actor accepts, which of them Otomoto applies and which the Actor applies afterwards, what a row contains, where the limits are and how to run a search on a schedule. The prerequisites are minimal: Python 3, an Apify account and an API token. Every sample row in this guide is one of the ten rows from the 15 November 2026 run of the Actor's public example task. A search term is matched to a make or model, not searched as free text.

---

## TL;DR

In this tutorial you will learn to run `reventadata/otomoto-scraper` from Python with `apify-client`, pass a search (`searchQueries`, `make`, `model`, price and year bounds, `sellerType`) and read back rows with price, make, model, year, mileage, fuel, gearbox, engine power, town and seller. You will also learn which terms the Actor understands. The Actor is on the [Otomoto Scraper Store page](https://apify.com/reventadata/otomoto-scraper). The outcome is a short script that prints one line per car and counts how many rows mention your search term.

---

## Prerequisites and setup

You need an Apify account, a Python 3 environment and an API token. Apify accounts can be created with an email address or a GitHub login. Apify Console is the web workspace where you manage Actors, runs and datasets; your token is under **Settings > API & Integrations**.

Install the client and export the token so the script can read it from the environment:

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

Client details are in the [Apify API client for Python docs](https://docs.apify.com/api/client/python/). Nothing else is required: no browser, no scraping library.

---

## Understanding Otomoto Scraper

The Actor runs searches on [otomoto.pl](http://otomoto.pl) for passenger cars and returns one row per listing. A results page holds 32 listings plus one pinned listing, and the Actor returns each listing once per run, the pinned one included.

A row has 34 fields: price, currency and whether the price is gross; Otomoto's price indicator and price-drop fields; make, model, version, year, mileage, fuel, gearbox, engine power and capacity; country of origin, town and voivodeship; posting time, first photo, listing badges; the seller type with the dealer's public name and website where there is one; and the CEPIK-verified flag.

Limits to know up front. Only passenger cars are covered, the fuel filter offers `electric` or any, and the rows have no phone numbers or e-mail addresses. The `description` field is the short text from the search results and is empty on some rows. Otomoto's terms apply to how you use the data, so check that your use complies with them and with data-protection law.

---

## Step-by-step walkthrough

### Step 1: Open the Actor

Go to the [Otomoto Scraper page on Apify Store](https://apify.com/reventadata/otomoto-scraper) and use **Try for free** to open it in Apify Console. For the API route in this guide you only need its name, `reventadata/otomoto-scraper`.

### Step 2: Choose the input

The input form and the API take the same fields:

| Field | Meaning |
| --- | --- |
| `searchQueries` | List of search terms, one search per term, matched to Otomoto's makes and models: `golf`, `seria 3`, `bmw`. A term that names neither is skipped; if none does, the run fails. Empty browses all passenger cars. |
| `make`, `model` | Slugs as in Otomoto URLs (`bmw`, `seria-3`). A model needs a make. |
| `minPrice`, `maxPrice` | PLN. |
| `minYear`, `maxYear` | Production year. |
| `fuelType` | `any` or `electric`. Other values are refused before any page is read. |
| `sellerType` | `any`, `private` or `professional` (dealers). Other values are refused before any page is read. |
| `sortBy` | `newest` (default), `priceAsc`, `priceDesc` or `relevance`. |
| `requireKeywordMatch` | `true` drops rows that lack any word of the search term in title, make, model and version. Default `false`. |
| `maxItems`, `maxPages` | Row cap (default 1000) and pages per search (default 50). |

Price and year bounds, private sellers, electric fuel and the sort order go to Otomoto with the search. `professional` is applied by the Actor after each page is read, so a dealers-only search reads the same pages as an any-seller search. With a search term, `make` and `model` keep only that make or model among the term's matches; without one, they narrow the search itself.

Search terms are makes and models (`golf`, `seria 3`, `bmw`). A term that names neither, such as `vw` or `gti`, is skipped, and the run fails if no term matches.

To list one model from dealers, with no search term, the input would look like this:

```json
{
    "make": "bmw",
    "model": "seria-3",
    "minYear": 2018,
    "maxPrice": 120000,
    "sellerType": "professional",
    "maxItems": 50,
    "maxPages": 2
}
```

### Step 3: Run the Actor from Python

This script starts the Actor, waits for it, reads the dataset and prints one line per listing, then counts the rows that mention the search term:

```python
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: the newest listings for the term "golf", ten rows, one page
run_input = {
    "searchQueries": ["golf"],
    "sortBy": "newest",
    "maxItems": 10,
    "maxPages": 1,
}

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/otomoto-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
    status = run.status if run else "unknown"
    raise SystemExit(f"Run did not succeed (status: {status}).")

# 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. One line per listing
for item in items:
    print(
        f"{item.get('title')} | {item.get('year')} | {item.get('mileageKm')} km | "
        f"{item.get('price')} {item.get('currency')} | {item.get('city')} | {item.get('sellerType')}"
    )

# 6. How many rows mention the search term in title, make, model or version?
term = run_input["searchQueries"][0].lower()
mentions = sum(
    term in " ".join(str(item.get(key) or "") for key in ("title", "make", "model", "version")).lower()
    for item in items
)
print(f"\n{mentions} of {len(items)} rows mention '{term}' in title, make, model or version.")
```

Keep `maxPages` small while you test.

### Step 4: Examine the output

On the ten rows of the 15 November 2026 example-task run (each with `matchedKeyword` set to `golf`), the script prints:

```text
Retrieved 10 listings.

Volkswagen Golf 1.4 TSI BMT Comfortline Perfectline | 2015 | 256000 km | 17177 PLN | Zduny | private
Volkswagen Golf 1.4 TSI Highline | 2011 | 89596 km | 25900 PLN | Brzeziny | private
Volkswagen Golf 2.0 TSI GTI | 2010 | 227000 km | 19500 PLN | Wrocław | private
Volkswagen Golf 1.4 FSI Comfortline | 2005 | 162461 km | 12000 PLN | Tarnobrzeg | private
Volkswagen Golf 2.0 TDI BMT Highline | 2014 | 168000 km | 33500 PLN | Międzyrzecz | private
Volkswagen Golf 1.2 TSI BMT Comfortline | 2016 | 107488 km | 39900 PLN | Tanowo | private
Volkswagen Golf 1.4 TSI BMT Highline DSG | 2015 | 138955 km | 48000 PLN | Jutrosin | private
Volkswagen Golf 1.6 Comfortline | 2006 | 239000 km | 13900 PLN | Gubin | professional
Volkswagen Golf 1.6 TDI Comfortline | 2013 | 274000 km | 13000 PLN | Dębno | private
Volkswagen Golf | 2017 | 50634 km | 48900 PLN | Zduny | private

10 of 10 rows mention 'golf' in title, make, model or version.
```

Nine rows are `private` and one is `professional`. All ten are Volkswagen Golf listings, because the Actor matched `golf` to the Golf model. The field `matchedKeyword` records the search term a row was fetched under.

### Step 5: Keep only listings that contain the term

Set `requireKeywordMatch` to `true` and the Actor keeps a row only when every word of the search term appears in the title, make, model or version. The comparison ignores case and accents. Rows that fail it are not written to the dataset. Because the switch can leave a run with no rows, a run that stores nothing ends as described under Troubleshooting.

### Step 6: Export the data

Datasets export as JSON, CSV, XML, Excel, HTML table, RSS or JSONL from Console, and through the API with the `format` parameter ([dataset docs](https://docs.apify.com/platform/storage/dataset)).

---

## Working with the API

The script above uses three calls of the Apify client for Python: `client.actor("reventadata/otomoto-scraper").call(run_input=...)` starts a run and waits for it, `run.status` and `run.default_dataset_id` come from the typed run object it returns, and `client.dataset(...).list_items().items` reads the rows. The token authenticates all of them; keep it in an environment variable, never in the script, and never commit it to a repository.

To react to a finished run without waiting in a script, add a webhook. Its payload `resource` is the response of the Get Actor run API call, which includes `defaultDatasetId` ([webhook docs](https://docs.apify.com/platform/integrations/webhooks/actions)), so your application can fetch the rows by itself.

For repeated searches, such as a daily check for new listings, save the input as an Apify task and attach a [schedule](https://docs.apify.com/platform/schedules), which runs an Actor or task on a cron expression.

For error handling, check `run.status` as the script does and read the run log with `client.log(run.id).get()`. A run that saves nothing ends SUCCEEDED with a status message when Otomoto answered but nothing matched, or FAILED when the input was invalid or pages could not be read. If the run's time limit is reached after some rows were saved, those rows are kept and the log carries a warning.

---

## Advanced usage patterns

**Several terms in one run.** Put them all in `searchQueries`. Each term is a separate search, a listing found under two terms is stored once, and `matchedKeyword` tells you which term fetched each row.

**One model.** Without a search term, `make` and `model` narrow the search at Otomoto, so only that model's pages are read. A term such as `golf` does the same, because it is matched to the make and model.

**Monitoring new listings.** Use `sortBy: "newest"`, the default, with a small `maxPages` on a schedule, and keep the `id` values you have already seen. `postedAt` carries the posting time.

**Price and year slices.** Run the same search several times with different `minPrice` and `maxPrice` bands, or year ranges, and merge on `id`. The Actor removes duplicates only within one run.

**Volume bounds.** `maxItems` stops the run once that many rows are stored, and `maxPages` limits the pages read per search. Start with `maxPages: 1` while you check the shape of the data, then raise the caps step by step.

**Sorting for a purpose.** `priceAsc` and `priceDesc` ask Otomoto for price order, which suits a cheapest-first or most-expensive-first slice, while `newest` suits monitoring.

---

## Understanding your data

`price` is the asking price, PLN on all ten rows, and `priceIsGross` says whether Otomoto marks it as gross (`true` on all ten). No row in this run carries a price badge. `priceEvaluation` is Otomoto's indicator: `NONE` on five rows and `IN` on five. The price-drop fields are empty on all ten rows.

`fuelType` and `gearbox` keep Otomoto's Polish labels (`Benzyna` is petrol). `version` is empty on one row. Missing values are `null`, never zero.

`sellerType` is `professional`, `private` or `crosslisted`. `professional` rows carry `dealerName`; `crosslisted` rows carry `originAdId` and no dealer name.

One row from the same run, the dealer listing, with one field (the engine capacity in cm3) left out of this copy:

```json
{
    "id": "6151708601",
    "url": "https://www.otomoto.pl/osobowe/oferta/volkswagen-golf-ID6IjVqt.html",
    "title": "Volkswagen Golf 1.6 Comfortline",
    "description": "Goal, Klimatronic, Tempomat !!",
    "price": 13900,
    "currency": "PLN",
    "priceIsGross": true,
    "priceBadges": null,
    "priceEvaluation": "NONE",
    "priceDropPercent": null,
    "priceDropLowestPrice": null,
    "make": "Volkswagen",
    "model": "Golf",
    "version": "1.6 Comfortline",
    "year": 2006,
    "mileageKm": 239000,
    "fuelType": "Benzyna",
    "gearbox": "Manualna",
    "enginePowerHp": 105,
    "countryOrigin": "Niemcy",
    "city": "Gubin",
    "region": "Lubuskie",
    "postedAt": "2026-11-15T18:51:12Z",
    "imageUrl": "https://ireland.apollo.olxcdn.com/v1/files/3psrhbwbpptj1-OTOMOTOPL/image;s=640x480",
    "sellerType": "professional",
    "dealerName": "Visio-Fotografia",
    "dealerUrl": null,
    "badges": null,
    "originAdId": null,
    "cepikVerified": false,
    "isPromotedTopAd": false,
    "categoryId": "29",
    "matchedKeyword": "golf"
}
```

---

## Troubleshooting guide

**The run succeeded with zero rows.** Otomoto answered, but nothing matched your filters. The run's status message says so. Loosen the filters or turn off `requireKeywordMatch`.

**The run failed with zero rows.** Either the input is invalid, for example a model without a make or no search term names a make or model, in which case the message says what to fix, or pages could not be read, in which case the status message says that matches may have been missed. Run again later with `maxPages: 1` before widening.

**Fewer rows than** `maxItems`**.** The search had fewer results, or the run reached its time limit; in that case the log carries a warning and the rows already stored are kept.

**Rows that do not mention the term.** Search terms select a make or model; switch on `requireKeywordMatch` to keep only rows whose text contains them (Step 5).

**Where to look.** The run page in Console shows status and log; the log is also available through the API as shown above. For help, use the Actor's Store page, and include the input you used and the status message of the run.

---

## Best practices

Keep the first run small: `maxPages: 1` and a `maxItems` of 10 show the field shapes before you commit to a long search. Search by make and model. Prefer filters that Otomoto applies itself (price, year, private sellers) over the ones applied afterwards, because they reduce the number of pages the Actor reads. Treat `null` as a value to handle, not an error, and skip empty values before you average or sort. Store the Otomoto `id` with every record so later runs can be compared. Listings change, so the data describes the moment of the run.

---

## Conclusion and next steps

You now have a script that runs `reventadata/otomoto-scraper`, checks the run status, reads the rows and prints one line per car with its price, mileage and seller. From here, try `make` and `model` without a search term, add `sellerType: "professional"` to list dealer stock, or run the search on a schedule.

For current pricing and details, see the [Store page](https://apify.com/reventadata/otomoto-scraper).

Try Otomoto Scraper yourself and let me know what you build!

---

## Resources

- [Otomoto Scraper on Apify Store](https://apify.com/reventadata/otomoto-scraper)
- [Apify API client for Python](https://docs.apify.com/api/client/python/)
- [Apify datasets](https://docs.apify.com/platform/storage/dataset)
- [Apify schedules](https://docs.apify.com/platform/schedules)
- [Apify webhooks](https://docs.apify.com/platform/integrations/webhooks/actions)

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