# Complete Guide: How to Scrape Otodom Listings Using Python

This guide shows how to scrape Otodom, Poland's real-estate portal, from Python with the **Otodom Scraper** Apify Actor (`reventadata/otodom-scraper`). You start a run through the Apify API client, wait for it, and read back one typed row per listing: price, area, rooms, location levels, seller type, the agency or developer behind the ad, and the creation date.

The use case is simple to state and tedious to do by hand. Otodom shows listings in pages, and a search such as apartments for sale in Warsaw spans hundreds of them. Whether you track a district, compare agencies or feed a valuation model, you want rows, not pages. By the end of this tutorial you will configure a search, run it, inspect the rows and rank Krakow rents per square metre with a short script. Everything here is based on the Actor's code, a live run on 2026-11-14 (which returned 20 listings in 11.3 seconds), and captures of Otodom's search pages dated 2026-11-07.

*The Actor is unofficial and not affiliated with Otodom.*

## TL;DR

In this tutorial you will learn to install the Apify client, describe an Otodom search (`transaction`, `propertyType`, `location`, optional filters), run the Actor, and read the rows from the run's default dataset. The steps: install, export your token, configure, run, inspect, rank. The Actor is at [apify.com/reventadata/otodom-scraper](https://apify.com/reventadata/otodom-scraper). The result is a list of Python dictionaries, one per Otodom listing, with `null` wherever the listing publishes nothing.

## Prerequisites and setup

You need Python 3.11 or newer (the `apify-client` 3.x package requires it), a free Apify account and its API token. Apify Console is the web interface where you manage runs, datasets and tokens; your token is under the API & Integrations settings. The platform documentation is at [docs.apify.com](https://docs.apify.com/). Nothing else runs on your side: no browser, no scraping library and no proxy account, because the client only sends API requests. A virtual environment keeps the install tidy, and `python -c "import apify_client"` confirms it worked.

Install the client:

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

Export the token so the script never contains it:

```bash
export APIFY_API_TOKEN="your_apify_token_here"
```

## Understanding Otodom Scraper

The Actor reads Otodom's public search result pages: it requests a result page, parses it into rows, and moves to the next. It walks the pages of one search until the site reports no more, until `maxPages` is reached or until `maxItems` rows are stored. Otodom repeats some listings across pages, so the Actor returns each listing id once per run.

What it covers: sale and rent, apartments and houses, for any location Otodom has a page for or the whole country. What it does not cover: other Otodom categories were not tested and are not offered, and phone numbers are not returned, because the search results carry none. The ad `url` in every row leads to the ad itself. Each row has 37 fields, defined in the Actor's dataset schema, and carries `searchUrl`, the first-page search URL it came from.

## Step-by-step guide to scrape Otodom with Python

### Step 1: Open the Actor

Open the [Otodom Scraper page](https://apify.com/reventadata/otodom-scraper) on Apify Store. We drive the Actor from Python, so there is nothing to configure there.

### Step 2: Configure the input

| Field | Type | What it does |
| --- | --- | --- |
| `transaction` | string | `buy` or `rent`. |
| `propertyType` | string | `mieszkanie` (apartment) or `dom` (house). |
| `location` | string | Otodom's location slug path from a search URL, for example `malopolskie/krakow/krakow/krakow`, or `cala-polska` for all of Poland. |
| `maxPrice` | integer | Optional upper price limit in PLN, sent to Otodom with the request. |
| `ownerType` | string | `any` or `private` (private owners only). |
| `sortBy` | string | `relevance`, `priceAsc` or `newest`. |
| `maxItems` | integer | Cap on rows. |
| `maxPages` | integer | Optional cap on result pages (21 to 37 listings each, measured). |
| `proxyConfiguration` | object | Off by default. |

`transaction`, `propertyType`, `ownerType` and `sortBy` are enums in the input schema, so a value outside the list is refused before the run starts. `location` is free text. To find a slug, run a search on [otodom.pl](http://otodom.pl) and copy the part of the URL after the property type.

```python
import os
from apify_client import ApifyClient

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

# 2. Describe the search: rent, apartments, Krakow, max 3000 PLN, newest first
run_input = {
    "transaction": "rent",
    "propertyType": "mieszkanie",
    "location": "malopolskie/krakow/krakow/krakow",
    "maxPrice": 3000,
    "sortBy": "newest",
    "maxItems": 20,
    "maxPages": 1,
}
```

### Step 3: Run the Actor

`call()` starts the Actor on Apify, waits for the run to end and returns the run object (or `None` in client 3.x, which is why the script checks `run is None` first). In the example run on 2026-11-14 with the input above, the Actor returned 20 listings in 11.3 seconds without a proxy. We check its status, then read the rows from the default dataset:

```python
# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/otodom-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.")
```

### Step 4: Print the first rows

```python
for item in items[:3]:
    if item["price"] is None:
        price_text = "no price published"
    else:
        price_text = f'{item["price"]:,.0f} {item["currency"]}'
    area_text = "area n/a" if item["areaM2"] is None else f'{item["areaM2"]:g} m2'
    place = ", ".join(p for p in (item["district"], item["city"]) if p)
    print(item["title"])
    print(f'  {price_text} | {area_text} | rooms: {item["rooms"]}')
    print(f'  {place} | {item["sellerType"]}')
    print(f'  {item["url"]}')
```

A listing without a published price prints "no price published" instead of raising an error, and joining only the non-empty location parts avoids printing `None` when a neighbouring town has no district. That missing-price case is real, as the next sections show.

### Step 5: Look at a row

This is the first row from the live example run on 2026-11-14 using the input above, copied verbatim from the dataset:

```json
{
  "id": "68634101",
  "url": "https://www.otodom.pl/pl/oferta/semi-studio-z-przestrzenia-sypialniana-39-m2-ID4DYRD",
  "title": "Semi studio z przestrzenią sypialnianą 39 m2",
  "propertyType": "FLAT",
  "transaction": "RENT",
  "price": 2650,
  "currency": "PLN",
  "priceHidden": false,
  "pricePerSquareMeter": null,
  "priceFromPerSquareMeter": null,
  "areaM2": 39,
  "rooms": 2,
  "roomsLabel": "TWO",
  "floor": "GROUND",
  "street": "ul. Tadeusza Romanowicza",
  "voivodeship": "małopolskie",
  "city": "Kraków",
  "district": "Podgórze",
  "neighborhood": "Zabłocie",
  "sellerType": "business",
  "agencyName": "VAVELIA",
  "agencyType": "AGENCY",
  "advertiserName": "VAVELIA",
  "contactNames": [
    "Katarzyna Nowak"
  ],
  "isPrivateOwner": false,
  "isPromoted": false,
  "isExclusiveOffer": false,
  "features": [
    "BALCONY",
    "PARKING_SPOT",
    "SECURE_BUILDING",
    "GROUND_FLOOR"
  ],
  "investmentState": null,
  "investmentUnits": null,
  "investmentAreaFromM2": null,
  "investmentAreaToM2": null,
  "investmentDelivery": null,
  "createdAt": "2026-11-14T14:35:33+00:00",
  "pushedUpAt": null,
  "imageUrl": "https://ireland.apollo.olxcdn.com/v1/files/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmbiI6InNiM212bzJqa29lbjItQVBMIiwidyI6W3siZm4iOiJlbnZmcXFlMWF5NGsxLUFQTCIsInMiOiIxNiIsImEiOiIwIiwicCI6IjEwLC0xMCJ9XX0.Ymaj_Ja5kPat8QdTL5emeG7Bec8sB5sV8ONQ_e_dwzU/image;s=1280x1024;q=80",
  "searchUrl": "https://www.otodom.pl/pl/wyniki/wynajem/mieszkanie/malopolskie/krakow/krakow/krakow?priceMax=3000&by=LATEST&direction=DESC"
}
```

On a rent search `price` is the monthly rent. `pricePerSquareMeter` is `null`: in that 20-row run Otodom gave no value for it on any listing.

### Step 6: Rank rents per square metre

Since the site's own per-m² field is empty on rent listings, we compute it. Rows without a price or an area are skipped, and an ad that arrives under two ids is counted once, by `url`:

```python
# 5. Rank rents by price per square metre. Otodom leaves its own
# pricePerSquareMeter empty on rent listings, so we compute it.
unique = {}
for item in items:
    if item["price"] is None or not item["areaM2"]:
        continue  # developments and hidden prices have no total price
    unique.setdefault(item["url"], item)  # one ad can arrive under two ids

ranked = sorted(unique.values(), key=lambda i: i["price"] / i["areaM2"])
print(f"{len(items)} rows, {len(ranked)} with a price and an area. Cheapest per m2:")
for item in ranked[:5]:
    per_m2 = item["price"] / item["areaM2"]
    place = item["district"] or item["city"]
    print(
        f'{per_m2:6.1f} PLN/m2 | {item["price"]:6.0f} PLN | '
        f'{item["areaM2"]:5.1f} m2 | {place} | {item["sellerType"]}'
    )
```

Over the 20 rows of that live run, the snippet prints this (because the Krakow search also returns neighbouring municipalities such as Zielonki and Wieliczka where `district` is `null`, the snippet falls back to `city`). Your run will print different rows, because it reads whatever Otodom lists when it starts.

```text
20 rows, 20 with a price and an area. Cheapest per m2:
  44.1 PLN/m2 |   1500 PLN |  34.0 m2 | Swoszowice | business
  46.3 PLN/m2 |   2600 PLN |  56.1 m2 | Zielonki | business
  46.8 PLN/m2 |   2900 PLN |  62.0 m2 | Prądnik Biały | business
  48.0 PLN/m2 |   2400 PLN |  50.0 m2 | Grzegórzki | business
  49.6 PLN/m2 |   2800 PLN |  56.4 m2 | Grzegórzki | business
```

## Working with the API

Everything above is the Apify API behind a Python client. `client.actor("reventadata/otodom-scraper").call(run_input=...)` starts a run and blocks until it finishes; the returned run has a `status` and a `default_dataset_id`. The dataset holds the rows, and `list_items().items` reads them. If a run ends as failed, timed out or aborted, `run.status` says so and the script stops instead of reading a partial dataset. The dataset call returns a page object whose `.items` is a plain list of dictionaries, so the rest of the script is ordinary Python that you can test without calling the API again. Authentication is the token you pass to `ApifyClient`.

To read the run's log, `client.log(run.id).get()` returns it as text. The Actor's final log lines say how many rows were pushed and, if some were skipped as repeats, how many. A run with zero rows ends through one of two paths: it succeeds with a status message when Otodom answered normally but nothing matched, and it fails when a page could not be read or the location does not exist, with the reason in the status message.

For repeated work, an Apify schedule starts an Actor or a saved task on a cron expression, and the schedule can override the input with a JSON object ([schedules docs](https://docs.apify.com/actors/running/schedules)).

## Advanced usage patterns

**Batching searches.** One run is one search. To cover several cities, loop over `location` values in Python and call the Actor once per city, writing each result to its own file or table. Keep `maxItems` small while you develop. Because rows are dictionaries, `json.dump(items, f, ensure_ascii=False)` writes them to disk with the Polish characters intact. To compare sale and rent, run once per `transaction` and join the two result sets on `district`.

**Splitting big searches.** Otodom reported 561 result pages for apartments for sale in Warsaw on 2026-11-07, and 3,217 results over 90 pages for rents in Krakow. A deep walk is possible, but it is usually better to narrow the search with `maxPrice`, `ownerType` and `sortBy: "newest"`, then run it again on a schedule.

**Private owners only.** `ownerType: "private"` restricts results to private owners. In a check on 2026-11-07, a page requested that way held 37 listings and all 37 had `isPrivateOwner` true.

**Newest first.** `sortBy: "newest"` requests Otodom's newest-first order, which suits a daily job that only wants fresh ads. Use `createdAt` in the rows to keep the ones from the last day, and `url` to skip ads you stored earlier. Run the same input on a schedule and diff each result against the previous one to see what changed.

## Understanding your data

Each row has 37 fields. The Actor leaves a field `null` when the listing gives no value, and uses `null`, never 0, for a missing price. Two cases deserve attention.

**Developments.** A new-build listing has no total price. This excerpt (selected fields) of a development row from a Warsaw sale capture dated 2026-11-07 shows what you get instead: the "from" price per m², the unit count, the area range and the expected hand-over.

```json
{
  "title": "Piastova Osada",
  "propertyType": "INVESTMENT",
  "transaction": "SELL",
  "price": null,
  "currency": "PLN",
  "priceHidden": false,
  "areaM2": null,
  "priceFromPerSquareMeter": 13400.0,
  "investmentState": "IN_BUILDING",
  "investmentUnits": 106,
  "investmentAreaFromM2": 26.4,
  "investmentAreaToM2": 71.8,
  "investmentDelivery": "2027-Q4",
  "agencyType": "DEVELOPER"
}
```

**Hidden prices.** A seller can hide the price of an ordinary listing; then `price` is `null` and `priceHidden` is `true`.

`sellerType` passes through Otodom's own advertiser type string (`business`, `private_person`, `private` and `rental_management_agency` appeared in the 20-row run; `agency` and `developer` also appear on Otodom), and `agencyName`, `advertiserName` and `contactNames` are the public names shown on the ad. `createdAt` and `pushedUpAt` are ISO 8601 timestamps, and `pushedUpAt` is `null` unless the ad was bumped.

## Troubleshooting guide

- **Empty dataset, run succeeded.** The search matched nothing; the status message says so. Loosen `maxPrice` or check the slug.
- **Run failed with a location message.** The slug does not exist on Otodom. Copy one from a real search URL.
- **Run failed with "pages could not be read".** If the Actor stored no rows the run fails; if it stored some it keeps them and logs a warning. Turn on `proxyConfiguration` if requests keep failing.
- **Fewer rows than the site's count.** Otodom's pages held 21 to 37 listings in the 2026-11-07 tests, against a nominal page size of 36, and some listings repeat across pages; each id is returned once.
- **Reading the log.** It names the page where a failure happened and ends with the number of rows pushed.

For help, use the Actor's [Store page](https://apify.com/reventadata/otodom-scraper).

## Best practices

- Start with `maxItems: 20` and `maxPages: 1`, check the fields you need, then raise the caps.
- Treat `null` as information: filter on it instead of coercing it to 0.
- Key on `url` when you merge several runs, as step 6 does.
- Save `run.id` next to every dataset you keep, so any row can be traced back to the run that produced it.
- Space out repeated runs: a daily schedule is a reasonable start for a listing monitor.
- Check Otodom's terms and the rules that apply to your use of the data before you build on it.

## Conclusion and next steps

We configured an Otodom search, ran the Actor from Python, inspected rows and ranked rents per square metre.

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

Resources: [Otodom Scraper on Apify Store](https://apify.com/reventadata/otodom-scraper) and the [Apify Python client documentation](https://docs.apify.com/api/client/python/). Try Otodom Scraper yourself and let me know what you build.

*About the author: reventadata builds and maintains marketplace scrapers on the Apify Store.*
