# Otodom Property Price & Stock Monitor (`blond_triathlon/otodom-price-monitor`) Actor

Monitor Otodom searches and get a row only when a listing really changes: price cuts, rises, withdrawn and relisted offers. Rows include area, rooms, price per m2, district and seller. Pay per page fetched and per change.

- **URL**: https://apify.com/blond_triathlon/otodom-price-monitor.md
- **Developed by:** [Bartosz Pełka](https://apify.com/blond_triathlon) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 search page fetcheds

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

## Otodom Property Price & Stock Monitor

Monitor any Otodom search and get a row **only when a listing really changes** - price cuts, price rises, withdrawn offers and offers that come back.

Perfect for following a street, a district or a whole city without re-reading the same unchanged listings every morning. The Actor keeps a snapshot per watchlist, compares each run against it and returns only the deltas.

### Change types

| `change_type` | Meaning |
| --- | --- |
| `new_offer` | listing appeared in the search (baseline run or a new offer) |
| `price_down` | price fell by at least `minPriceChangePct` |
| `price_up` | price rose by at least `minPriceChangePct` |
| `out_of_stock` | listing withdrawn / unavailable |
| `back_in_stock` | listing available again |
| `seller_changed` | same property, different agency or owner |
| `removed` | listing missing for `removedAfterRuns` consecutive runs |

### Quick start

1. Set your filters on otodom.pl, copy the address bar and paste it into **Otodom search URLs**.
2. Or build a simple search with the **filters** object (transaction, property type, location, price, area, rooms, seller, build year).
3. Reuse the same **History namespace** (`stateKey`) on every run.

```json
{
  "startUrls": [
    { "url": "https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/mazowieckie/warszawa/warszawa/warszawa?priceMax=900000&limit=36" }
  ],
  "maxPagesPerSearch": 1,
  "maxOffersPerSearch": 36,
  "mode": "changes",
  "stateKey": "otodom-watchlist-1",
  "removedAfterRuns": 2,
  "proxyMode": "auto",
  "maxRequests": 40,
  "minPriceChangePct": 0.5
}
```

The first run is a **baseline**: every listing is emitted as `new_offer`. Real deltas start on the second run. A `startUrls` entry pointing at `/pl/oferta/...` tracks that single property.

### Inputs

| Input | Default | Notes |
| --- | --- | --- |
| `startUrls` | - | search or single-offer URLs |
| `filters` | - | build one search from transaction, type, location, price, area, rooms |
| `maxPagesPerSearch` | `1` | pages per search (up to 36 listings each) |
| `maxOffersPerSearch` | `36` | cap per search |
| `mode` | `changes` | `changes` emits deltas, `snapshot` dumps every listing |
| `stateKey` | `otodom-watchlist-1` | history namespace |
| `removedAfterRuns` | `2` | consecutive misses before `removed` is reported |
| `minPriceChangePct` | `0.5` | ignore smaller moves |
| `alertOn` | all | restrict to specific change types |
| `proxyMode` | `auto` | datacenter IPs work; no residential proxy needed |
| `telegram` | - | `{ "botToken": "...", "chatId": "..." }` for push alerts |

### Output

```json
{
  "type": "change",
  "change_type": "price_down",
  "offer_id": "68612912",
  "title": "2-room flat with a 109 m2 garden",
  "price": 879000.0,
  "prev_price": 895000.0,
  "delta": -16000.0,
  "delta_pct": -1.79,
  "currency": "PLN",
  "available": true,
  "rooms": "2",
  "area_m2": 66,
  "price_per_m2": 13318.18,
  "floor": "ground",
  "build_year": 2019,
  "city": "Warszawa",
  "district": "Bialoleka",
  "private": false,
  "url": "https://www.otodom.pl/pl/oferta/..."
}
```

`mode: "snapshot"` writes every parsed property instead, with the full detail set.

### Pricing (pay per event)

| Event | Price | Charged when |
| --- | --- | --- |
| `apify-actor-start` | $0.010 | run starts |
| `page-scraped` | $0.006 | search page fetched (up to 36 listings) |
| `change-detected` | $0.002 | change row written |

A daily one-search check that finds nothing costs about **$0.016 per run** (~$0.48/month).

### Notes

- Delistings wait for `removedAfterRuns` misses, so a page that shifts results does not create a false "withdrawn" alert.
- Listings without a visible price are skipped - they cannot be monitored for price changes.
- A blocked or empty run does not overwrite history and does not emit fake `removed` events.
- Read-only monitoring of publicly visible listings. No account access, no messaging to sellers.

# Actor input Schema

## `startUrls` (type: `array`):

Paste one or more Otodom search-result URLs (the /pl/wyniki/... page). Set the city, price, area and room filters on otodom.pl, copy the address bar, and paste it here. Each URL is one independent watchlist. A single /pl/oferta/... URL is also accepted and tracks that one property.

## `filters` (type: `object`):

Alternative to startUrls. Builds exactly one Otodom search from the fields below. Use startUrls if you need district-level or equipment filters, which are easiest to set on the site itself.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to fetch per search. Each page is one request and holds up to 36 properties. Keep at 1 to stay inside the free tier.

## `maxOffersPerSearch` (type: `integer`):

Cap on listings kept per search. Listings beyond this are ignored.

## `mode` (type: `string`):

changes = emit only price/availability changes (recommended for scheduled monitoring). snapshot = emit every property seen.

## `stateKey` (type: `string`):

Key-value store record that holds the previous run's prices. Use the same value on every run of a given watchlist; use different values for independent watchlists.

## `removedAfterRuns` (type: `integer`):

How many consecutive runs a property must be missing before it is reported as delisted. 2 avoids false alarms when results shift between pages.

## `proxyMode` (type: `string`):

Otodom serves normal datacenter IPs, so 'auto' is free and sufficient. 'unblocker' costs ~$1.5 per 1,000 requests and is only needed if your runs start getting 403s.

## `proxyUrl` (type: `string`):

Optional. Overrides proxyMode entirely, e.g. http://user:pass@host:port. Leave empty to use Apify Proxy.

## `maxRequests` (type: `integer`):

Hard cap on outbound requests in this run. This is your cost guard.

## `requestDelayMs` (type: `integer`):

Politeness delay. 800-2000 ms is recommended.

## `maxRetries` (type: `integer`):

Retries on 403/429/5xx. Each retry is a request.

## `alertOn` (type: `array`):

Which change types are written to the dataset.

## `minPriceChangePct` (type: `number`):

Price moves smaller than this percentage are ignored. Filters noise from rounding.

## `debugHtml` (type: `boolean`):

Store the first fetched search page in the run's key-value store so the parser can be inspected. Turn off in production.

## `telegram` (type: `object`):

Optional free alerting. Create a bot with @BotFather, then send it a message and read the chat id from getUpdates.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/mazowieckie/warszawa/warszawa/warszawa?priceMax=900000&limit=36"
    }
  ],
  "maxPagesPerSearch": 1,
  "maxOffersPerSearch": 36,
  "mode": "changes",
  "stateKey": "otodom-watchlist-1",
  "removedAfterRuns": 2,
  "proxyMode": "auto",
  "maxRequests": 40,
  "requestDelayMs": 1200,
  "maxRetries": 2,
  "alertOn": [
    "new_offer",
    "price_down",
    "price_up",
    "back_in_stock",
    "out_of_stock",
    "removed"
  ],
  "minPriceChangePct": 0.5,
  "debugHtml": false
}
```

# Actor output Schema

## `changes` (type: `string`):

One row per detected change in mode=changes, or one row per property in mode=snapshot.

## `runSummary` (type: `string`):

Counters for this run: searches, requests used, properties parsed and changes emitted.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/mazowieckie/warszawa/warszawa/warszawa?priceMax=900000&limit=36"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("blond_triathlon/otodom-price-monitor").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 = { "startUrls": [{ "url": "https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/mazowieckie/warszawa/warszawa/warszawa?priceMax=900000&limit=36" }] }

# Run the Actor and wait for it to finish
run = client.actor("blond_triathlon/otodom-price-monitor").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 '{
  "startUrls": [
    {
      "url": "https://www.otodom.pl/pl/wyniki/sprzedaz/mieszkanie/mazowieckie/warszawa/warszawa/warszawa?priceMax=900000&limit=36"
    }
  ]
}' |
apify call blond_triathlon/otodom-price-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blond_triathlon/otodom-price-monitor"
        }
    }
}
```

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/RfgyWAMVsGOO4cH9H/builds/THAR8GdSN88m211BS/openapi.json
