# RynekPierwotny Scraper (`trev0n/rynekpierwotny-scraper`) Actor

Scrape rynekpierwotny.pl — Poland's biggest primary-market real-estate portal. Get new housing developments and individual flats/houses with prices, areas, developers and floor plans. Filter by city, price, area and rooms, and run cheap incremental monitoring that emits only new/updated records.

- **URL**: https://apify.com/trev0n/rynekpierwotny-scraper.md
- **Developed by:** [Paweł](https://apify.com/trev0n) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🏠 RynekPierwotny Scraper — New Developments & Flats in Poland

🎯 **Get every new housing development in Poland — with prices, floor plans, developers and availability — in minutes, not weeks of manual browsing.**

This scraper collects structured data from rynekpierwotny.pl, Poland's biggest primary-market real-estate portal. It extracts new housing developments (inwestycje) with their full price/area ranges, developer contacts and promotions — and can drill down to every individual flat or house, including its exact price, price per m², floor, room count and floor plan.

### 🚀 What Does It Do?

This scraper automatically searches new-development listings across all of Poland and collects **structured, ready-to-use data** from rynekpierwotny.pl. No manual browsing needed — just set your filters and hit Start.

💡 **Two levels of data:**

1. **🏗️ Investments mode** — one record per housing development: price and area ranges, developer, location with GPS coordinates, construction dates, promotions and unit counts
2. **🚪 Units mode** — one record per individual flat/house: exact price, price per m², rooms, floor, area, reservation status and floor plan, with the parent development's context attached

💡 **Two modes of operation:**

1. **🔍 Discovery Mode** — pick a city (or city + district), set your price/area/rooms filters, and let it sweep every matching development
2. **📋 Direct URL Mode** — paste specific rynekpierwotny.pl search or offer URLs and scrape exactly those

### 👥 Who Is This For?

| 🏢 Use Case                       | 💬 How It Helps                                                                             |
| --------------------------------- | ------------------------------------------------------------------------------------------- |
| 📊 **Market analysts & proptech** | Track supply, pricing per m² and sales velocity across every Polish city in one dataset     |
| 🏦 **Real-estate investors**      | Spot below-market units, fresh price cuts and developer promotions the moment they appear   |
| 🤝 **Real-estate agencies**       | Keep an always-current catalog of the primary market to match clients with new developments |
| 🏗️ **Developers**                 | Monitor competitors' pricing, availability and promotions around your own investments       |
| 📣 **Lead generation**            | Collect developer names, sales-office addresses and phone numbers for outreach              |
| 🧠 **Data science & AI**          | Feed clean, structured housing data into pricing models, dashboards and LLM workflows       |

### ✨ Features

- 🏙️ **Any location in Poland** — search by city or even a single district ("Warszawa Mokotów"), Polish characters optional
- 🚪 **Unit-level detail** — expand every development into individual flats/houses with exact prices and floor plans
- 💰 **Full pricing data** — price, price per m², promotional prices, lowest price within 30 days, discounts
- 📍 **GPS coordinates** — every development comes with latitude/longitude, street address and district
- 🔔 **Incremental monitoring** — schedule recurring runs that emit only NEW / UPDATED / REAPPEARED records; save 80–95% on daily monitoring
- 📲 **Instant notifications** — get new developments and price changes pushed to Telegram, Slack, Discord or any webhook
- 🎛️ **Smart Filters** — property type, price range, area, rooms, price per m², search radius, luxury-only, include/exclude keywords
- 🏷️ **Promotions tracking** — active developer promotions and rebates captured on every record
- 🧹 **Deduplication** — every record appears exactly once per run, even across overlapping searches
- ⚡ **Fast & Scalable** — hundreds of developments or thousands of units per run, in minutes
- 📤 **Export Anywhere** — Download results as JSON, CSV, Excel, or push to Google Sheets, Zapier, Make, or your CRM

### 🎛️ Filters & Options

| Option                                 | What It Does                                                                         |
| -------------------------------------- | ------------------------------------------------------------------------------------ |
| 🏙️ **Location**                        | City or city + district to search in (e.g. "Warszawa", "Kraków", "Warszawa Mokotów") |
| 🏘️ **Property type**                   | Flats, houses or commercial units                                                    |
| 🔀 **Scrape mode**                     | One record per development, or one record per individual flat/house                  |
| 💰 **Price min/max**                   | Price range in PLN                                                                   |
| 📐 **Area min/max**                    | Unit area range in m²                                                                |
| 🚪 **Rooms min/max**                   | Room count range                                                                     |
| 📊 **Price per m² min/max**            | Price-per-square-meter range in PLN                                                  |
| 📍 **Search radius**                   | Extend the search a number of kilometers around the chosen location                  |
| 💎 **Luxury only**                     | Only premium developments                                                            |
| 🏚️ **Include sold-out**                | Also return developments with nothing currently for sale                             |
| ↕️ **Sort by**                         | Price (low to high) or update date                                                   |
| 🚪 **Only units for sale**             | Units mode: skip already-sold units                                                  |
| 🏗️ **Include full investment details** | Add buildings, floors, parking and sales-office contacts to every development        |
| 🔔 **Incremental monitoring**          | Emit only new/changed records across scheduled runs                                  |
| 📲 **Notifications**                   | Telegram, Slack, Discord or webhook alerts for new findings                          |
| 🔢 **Max Results**                     | Control how many items to extract per run                                            |
| 🔗 **Direct URLs**                     | Optionally provide specific URLs to scrape                                           |

### 📦 What You Get (Output Fields)

Every development (investments mode) includes:

#### 🏗️ Development

| Field            | Example                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------- |
| offerId          | `16901`                                                                                   |
| name             | `XYZ Place`                                                                               |
| url              | `https://rynekpierwotny.pl/oferty/matexi-polska-sp-z-oo/xyz-place-warszawa-okecie-16901/` |
| propertyType     | `flats`                                                                                   |
| developer        | `Matexi Polska Sp. z o.o.`                                                                |
| developerWebsite | `https://matexipolska.pl/warszawa/xyz-place`                                              |

#### 📍 Location

| Field       | Example                                                       |
| ----------- | ------------------------------------------------------------- |
| address     | `Warszawa, Włochy, Okęcie, ul. Komitetu Obrony Robotników 32` |
| city        | `Warszawa`                                                    |
| district    | `Włochy`                                                      |
| voivodeship | `mazowieckie`                                                 |
| latitude    | `52.18012`                                                    |
| longitude   | `20.97972`                                                    |

#### 💰 Pricing & Availability

| Field              | Example                                  |
| ------------------ | ---------------------------------------- |
| priceMin           | `588000`                                 |
| priceMax           | `1957000`                                |
| priceM2Min         | `13190`                                  |
| priceM2Max         | `25043`                                  |
| currency           | `PLN`                                    |
| areaMin            | `29`                                     |
| areaMax            | `88`                                     |
| rooms              | `[1, 2, 3, 4]`                           |
| unitsForSale       | `50`                                     |
| unitsTotal         | `144`                                    |
| promotions         | `["Rabaty do 121 000 zł na mieszkanie"]` |
| constructionDateTo | `2025-12-31`                             |

Every unit (units mode) additionally includes:

#### 🚪 Unit

| Field      | Example                                        |
| ---------- | ---------------------------------------------- |
| unitId     | `1309046`                                      |
| unitNumber | `F1.B.03.03`                                   |
| price      | `648574`                                       |
| priceM2    | `13900`                                        |
| area       | `46.66`                                        |
| rooms      | `2`                                            |
| floor      | `7`                                            |
| isReserved | `false`                                        |
| planPdf    | `https://rynekpierwotny.pl/media/plans/...pdf` |
| planImage  | `https://thumbs.rynekpierwotny.pl/...jpg`      |

#### 🔔 Monitoring (incremental mode)

| Field       | Example                    |
| ----------- | -------------------------- |
| changeType  | `NEW`                      |
| firstSeenAt | `2026-07-11T08:00:00.000Z` |
| lastSeenAt  | `2026-07-12T08:00:00.000Z` |
| isRepost    | `false`                    |

### 📊 Example Output

```json
{
    "offerId": 16901,
    "name": "XYZ Place",
    "slug": "xyz-place-warszawa-okecie",
    "url": "https://rynekpierwotny.pl/oferty/matexi-polska-sp-z-oo/xyz-place-warszawa-okecie-16901/",
    "propertyType": "flats",
    "developer": "Matexi Polska Sp. z o.o.",
    "developerId": 1868,
    "developerWebsite": "https://matexipolska.pl/warszawa/xyz-place",
    "address": "Warszawa, Włochy, Okęcie, ul. Komitetu Obrony Robotników 32",
    "street": "ul. Komitetu Obrony Robotników 32",
    "city": "Warszawa",
    "district": "Włochy",
    "voivodeship": "mazowieckie",
    "latitude": 52.18012061645618,
    "longitude": 20.979721216828093,
    "priceMin": 588000,
    "priceMax": 1957000,
    "priceM2Min": 13190,
    "priceM2Max": 25043,
    "currency": "PLN",
    "areaMin": 29,
    "areaMax": 88,
    "roomsMin": 1,
    "roomsMax": 4,
    "rooms": [1, 2, 3, 4],
    "unitsForSale": 50,
    "unitsTotal": 144,
    "constructionDateFrom": "2024-02-29",
    "constructionDateTo": "2025-12-31",
    "promotions": [
        "Cena promocyjna od 14 000 zł/m2!",
        "Rabaty do 121 000 zł na mieszkanie + indywidualny projekt wnętrz!"
    ],
    "hasPromotions": true,
    "description": "XYZ Place to nowoczesne osiedle na warszawskim Okęciu...",
    "mainImage": "https://thumbs.rynekpierwotny.pl/3e79b87d/offers/offer/16901/main_image/xyz-place.jpg",
    "imageCount": 7,
    "parkingPlaces": null,
    "salesOffices": null,
    "scrapedAt": "2026-07-11T12:00:00.000Z"
}
````

### 📋 Dataset Views

The Apify Console gives you **3 ready-made table views** to quickly browse your results:

| View                | What It Shows                                                                     |
| ------------------- | --------------------------------------------------------------------------------- |
| 📊 **Overview**     | Development, developer, city, price and area ranges, units for sale               |
| 🔔 **Monitoring**   | Change type, prices and first/last-seen timestamps — perfect for incremental runs |
| 📋 **Full Details** | Every single field — the complete dataset                                         |

### ❓ FAQ

**🤔 What is the difference between investments and units mode?**
Investments mode returns one record per housing development, with aggregated price/area ranges — great for market overviews. Units mode goes deeper and returns every individual flat or house with its exact price, floor and floor plan — great for finding specific apartments.

**🤔 Can I monitor new developments and price changes automatically?**
Yes! Turn on incremental monitoring and schedule the scraper (e.g. daily). After the first baseline run it emits only NEW, UPDATED or REAPPEARED records — and can ping you on Telegram, Slack, Discord or a webhook the moment something changes.

**🤔 Can I search a specific district instead of a whole city?**
Yes — just write the city and district together, e.g. "Warszawa Mokotów" or "Kraków Podgórze". You can also paste any rynekpierwotny.pl search URL directly.

**🤔 Does it cover all of Poland?**
Yes — every city and region on rynekpierwotny.pl, over 15,000 active developments. You can also run it with no location at all to sweep the whole country.

**🤔 Can I export the data?**
Yes — JSON, CSV, Excel, XML, HTML, RSS. You can also push data directly to Google Sheets, Zapier, Make, or any webhook/API endpoint.

**🤔 How often should I run this?**
For fresh data, run daily or weekly. You can schedule automatic runs on Apify with just a few clicks — combined with incremental monitoring it stays very cheap.

**🤔 Does it work with proxies?**
It runs fine without any proxy for typical workloads. For very large or frequent runs you can enable Apify's built-in proxy service with one click.

### 🛠️ Need Custom Filters or Features?

**I'm happy to customize this scraper for your specific needs!** 🤝

Whether you need:

- 🎯 Additional filters (completion date, specific developers, floor level, parking availability)
- 📊 Extra data fields or custom output formats
- 🔄 Integration with your CRM, Google Sheets, or database
- ⏰ Scheduled scraping with automatic deduplication
- 🌐 Scraping from other real-estate platforms alongside rynekpierwotny.pl

👉 **Don't hesitate to reach out via private message** — I respond quickly and I'm always open to building exactly what you need. No request is too small or too specific!

### ⚖️ Legal & Ethical Use

This scraper collects **only publicly available information** from rynekpierwotny.pl. It does not access private data, bypass authentication, or collect personal information beyond publicly listed business contacts. Please use the data responsibly and in compliance with applicable laws and platform terms of service.

# Actor input Schema

## `location` (type: `string`):

City, or city + district, to search in (e.g. "Warszawa", "Kraków", "Warszawa Mokotów", "Gdańsk"). Polish characters optional. Leave empty to search all of Poland or to use Start URLs.

## `propertyType` (type: `string`):

Type of properties inside the developments.

## `scrapeMode` (type: `string`):

"Investments" returns one record per housing development (with price/area ranges). "Units" expands every development into individual flats/houses — one record per unit, with its exact price, floor, rooms and floor plan.

## `priceMin` (type: `integer`):

Lower bound of the price range, in złoty.

## `priceMax` (type: `integer`):

Upper bound of the price range, in złoty (0 = no limit).

## `areaMin` (type: `integer`):

Smallest acceptable unit area, in square meters.

## `areaMax` (type: `integer`):

Largest acceptable unit area, in square meters (0 = no limit).

## `roomsMin` (type: `integer`):

Fewest acceptable rooms.

## `roomsMax` (type: `integer`):

Most acceptable rooms (0 = no limit).

## `priceM2Min` (type: `integer`):

Lower bound of price per square meter.

## `priceM2Max` (type: `integer`):

Upper bound of price per square meter (0 = no limit).

## `distance` (type: `integer`):

Extend the search this many kilometers around the chosen location (0 = exact region only).

## `isLuxury` (type: `boolean`):

Only premium / luxury developments.

## `includeSoldOut` (type: `boolean`):

Also return developments with no units currently for sale (the website hides these by default).

## `sortBy` (type: `string`):

Ordering of search results.

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

Optional rynekpierwotny.pl search-result or offer URLs to scrape directly instead of (or alongside) the location search.

## `maxResults` (type: `integer`):

Maximum number of records to collect — investments or units, depending on scrape mode (0 = unlimited).

## `maxPages` (type: `integer`):

Cap on search-result pages to fetch per search, 30 investments each (0 = no cap).

## `onlyAvailableUnits` (type: `boolean`):

Units mode: skip units that are already sold. Reserved units are kept (see the isReserved field).

## `includeOfferDetails` (type: `boolean`):

Investments mode: fetch each development's full profile — buildings, floors, parking, sales offices, creation date. One extra request per development.

## `detailConcurrency` (type: `integer`):

How many detail/unit requests to run in parallel (1-20). Higher is faster.

## `includeKeywords` (type: `array`):

Keep only records whose name/description/developer/address contains at least one of these terms.

## `excludeKeywords` (type: `array`):

Drop records whose name/description/developer/address contains any of these terms.

## `compact` (type: `boolean`):

Output only the core fields — handy for AI workflows.

## `excludeEmptyFields` (type: `boolean`):

Omit null / empty fields from each record.

## `regionIds` (type: `array`):

Numeric rynekpierwotny.pl region ids to search in, for power users (e.g. 8647 = Warszawa). Combined with the Location field.

## `incrementalMode` (type: `boolean`):

Track state across runs and emit only NEW / UPDATED / REAPPEARED records. The first run builds a baseline; later runs charge only for the diff — ideal for cheap recurring monitoring of new developments and price changes.

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

Custom identifier for the monitoring baseline. Leave empty to derive it from the search config automatically.

## `emitUnchanged` (type: `boolean`):

Also output records whose content didn't change since the last run.

## `emitExpired` (type: `boolean`):

Also output a record for listings that disappeared since the last run (changeType = EXPIRED) — e.g. a sold-out development or a sold unit.

## `skipReposts` (type: `boolean`):

Drop new records detected as reposts of a recently expired one (same content, new id).

## `notifyOnlyChanges` (type: `boolean`):

Only send notifications when there are new/updated records.

## `notificationLimit` (type: `integer`):

Maximum number of records listed in a single notification message.

## `includeRunSummary` (type: `boolean`):

Attach the run summary object to the generic webhook payload.

## `webhookUrl` (type: `string`):

Generic webhook to POST results to (JSON).

## `telegramBotToken` (type: `string`):

Telegram bot token for notifications.

## `telegramChatId` (type: `string`):

Telegram chat id to send notifications to.

## `discordWebhookUrl` (type: `string`):

Discord channel webhook for notifications.

## `slackWebhookUrl` (type: `string`):

Slack incoming webhook for notifications.

## `proxyConfiguration` (type: `object`):

Proxy settings. The data source works without a proxy; enable one only for very large or frequent runs.

## Actor input object example

```json
{
  "location": "Warszawa",
  "propertyType": "",
  "scrapeMode": "investments",
  "priceMin": 0,
  "priceMax": 0,
  "areaMin": 0,
  "areaMax": 0,
  "roomsMin": 0,
  "roomsMax": 0,
  "priceM2Min": 0,
  "priceM2Max": 0,
  "distance": 0,
  "isLuxury": false,
  "includeSoldOut": false,
  "sortBy": "",
  "maxResults": 100,
  "maxPages": 0,
  "onlyAvailableUnits": true,
  "includeOfferDetails": false,
  "detailConcurrency": 10,
  "compact": false,
  "excludeEmptyFields": false,
  "regionIds": [],
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "skipReposts": false,
  "notifyOnlyChanges": true,
  "notificationLimit": 10,
  "includeRunSummary": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "location": "Warszawa",
    "regionIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("trev0n/rynekpierwotny-scraper").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 = {
    "location": "Warszawa",
    "regionIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("trev0n/rynekpierwotny-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "location": "Warszawa",
  "regionIds": []
}' |
apify call trev0n/rynekpierwotny-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=trev0n/rynekpierwotny-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RynekPierwotny Scraper",
        "description": "Scrape rynekpierwotny.pl — Poland's biggest primary-market real-estate portal. Get new housing developments and individual flats/houses with prices, areas, developers and floor plans. Filter by city, price, area and rooms, and run cheap incremental monitoring that emits only new/updated records.",
        "version": "1.0",
        "x-build-id": "S14DdkegNQvfrrGQj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/trev0n~rynekpierwotny-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-trev0n-rynekpierwotny-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/trev0n~rynekpierwotny-scraper/runs": {
            "post": {
                "operationId": "runs-sync-trev0n-rynekpierwotny-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/trev0n~rynekpierwotny-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-trev0n-rynekpierwotny-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, or city + district, to search in (e.g. \"Warszawa\", \"Kraków\", \"Warszawa Mokotów\", \"Gdańsk\"). Polish characters optional. Leave empty to search all of Poland or to use Start URLs."
                    },
                    "propertyType": {
                        "title": "Property type",
                        "enum": [
                            "",
                            "flats",
                            "houses",
                            "commercial"
                        ],
                        "type": "string",
                        "description": "Type of properties inside the developments.",
                        "default": ""
                    },
                    "scrapeMode": {
                        "title": "Scrape mode",
                        "enum": [
                            "investments",
                            "units"
                        ],
                        "type": "string",
                        "description": "\"Investments\" returns one record per housing development (with price/area ranges). \"Units\" expands every development into individual flats/houses — one record per unit, with its exact price, floor, rooms and floor plan.",
                        "default": "investments"
                    },
                    "priceMin": {
                        "title": "Minimum price (PLN)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Lower bound of the price range, in złoty.",
                        "default": 0
                    },
                    "priceMax": {
                        "title": "Maximum price (PLN)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Upper bound of the price range, in złoty (0 = no limit).",
                        "default": 0
                    },
                    "areaMin": {
                        "title": "Minimum area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Smallest acceptable unit area, in square meters.",
                        "default": 0
                    },
                    "areaMax": {
                        "title": "Maximum area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Largest acceptable unit area, in square meters (0 = no limit).",
                        "default": 0
                    },
                    "roomsMin": {
                        "title": "Minimum rooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Fewest acceptable rooms.",
                        "default": 0
                    },
                    "roomsMax": {
                        "title": "Maximum rooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Most acceptable rooms (0 = no limit).",
                        "default": 0
                    },
                    "priceM2Min": {
                        "title": "Minimum price per m² (PLN)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Lower bound of price per square meter.",
                        "default": 0
                    },
                    "priceM2Max": {
                        "title": "Maximum price per m² (PLN)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Upper bound of price per square meter (0 = no limit).",
                        "default": 0
                    },
                    "distance": {
                        "title": "Search radius (km)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Extend the search this many kilometers around the chosen location (0 = exact region only).",
                        "default": 0
                    },
                    "isLuxury": {
                        "title": "Luxury only",
                        "type": "boolean",
                        "description": "Only premium / luxury developments.",
                        "default": false
                    },
                    "includeSoldOut": {
                        "title": "Include sold-out developments",
                        "type": "boolean",
                        "description": "Also return developments with no units currently for sale (the website hides these by default).",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "",
                            "price-asc",
                            "recently-updated",
                            "oldest-updated"
                        ],
                        "type": "string",
                        "description": "Ordering of search results.",
                        "default": ""
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Optional rynekpierwotny.pl search-result or offer URLs to scrape directly instead of (or alongside) the location search.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of records to collect — investments or units, depending on scrape mode (0 = unlimited).",
                        "default": 100
                    },
                    "maxPages": {
                        "title": "Max search pages",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap on search-result pages to fetch per search, 30 investments each (0 = no cap).",
                        "default": 0
                    },
                    "onlyAvailableUnits": {
                        "title": "Only units for sale",
                        "type": "boolean",
                        "description": "Units mode: skip units that are already sold. Reserved units are kept (see the isReserved field).",
                        "default": true
                    },
                    "includeOfferDetails": {
                        "title": "Include full investment details",
                        "type": "boolean",
                        "description": "Investments mode: fetch each development's full profile — buildings, floors, parking, sales offices, creation date. One extra request per development.",
                        "default": false
                    },
                    "detailConcurrency": {
                        "title": "Detail concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "How many detail/unit requests to run in parallel (1-20). Higher is faster.",
                        "default": 10
                    },
                    "includeKeywords": {
                        "title": "Include keywords",
                        "type": "array",
                        "description": "Keep only records whose name/description/developer/address contains at least one of these terms.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "excludeKeywords": {
                        "title": "Exclude keywords",
                        "type": "array",
                        "description": "Drop records whose name/description/developer/address contains any of these terms.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "compact": {
                        "title": "Compact output",
                        "type": "boolean",
                        "description": "Output only the core fields — handy for AI workflows.",
                        "default": false
                    },
                    "excludeEmptyFields": {
                        "title": "Exclude empty fields",
                        "type": "boolean",
                        "description": "Omit null / empty fields from each record.",
                        "default": false
                    },
                    "regionIds": {
                        "title": "Region IDs (advanced)",
                        "type": "array",
                        "description": "Numeric rynekpierwotny.pl region ids to search in, for power users (e.g. 8647 = Warszawa). Combined with the Location field."
                    },
                    "incrementalMode": {
                        "title": "Incremental monitoring mode",
                        "type": "boolean",
                        "description": "Track state across runs and emit only NEW / UPDATED / REAPPEARED records. The first run builds a baseline; later runs charge only for the diff — ideal for cheap recurring monitoring of new developments and price changes.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "State key",
                        "type": "string",
                        "description": "Custom identifier for the monitoring baseline. Leave empty to derive it from the search config automatically."
                    },
                    "emitUnchanged": {
                        "title": "Emit unchanged records",
                        "type": "boolean",
                        "description": "Also output records whose content didn't change since the last run.",
                        "default": false
                    },
                    "emitExpired": {
                        "title": "Emit expired records",
                        "type": "boolean",
                        "description": "Also output a record for listings that disappeared since the last run (changeType = EXPIRED) — e.g. a sold-out development or a sold unit.",
                        "default": false
                    },
                    "skipReposts": {
                        "title": "Skip reposts",
                        "type": "boolean",
                        "description": "Drop new records detected as reposts of a recently expired one (same content, new id).",
                        "default": false
                    },
                    "notifyOnlyChanges": {
                        "title": "Notify only on changes",
                        "type": "boolean",
                        "description": "Only send notifications when there are new/updated records.",
                        "default": true
                    },
                    "notificationLimit": {
                        "title": "Records per notification",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of records listed in a single notification message.",
                        "default": 10
                    },
                    "includeRunSummary": {
                        "title": "Include run summary in webhook",
                        "type": "boolean",
                        "description": "Attach the run summary object to the generic webhook payload.",
                        "default": true
                    },
                    "webhookUrl": {
                        "title": "Webhook URL",
                        "type": "string",
                        "description": "Generic webhook to POST results to (JSON)."
                    },
                    "telegramBotToken": {
                        "title": "Telegram bot token",
                        "type": "string",
                        "description": "Telegram bot token for notifications."
                    },
                    "telegramChatId": {
                        "title": "Telegram chat ID",
                        "type": "string",
                        "description": "Telegram chat id to send notifications to."
                    },
                    "discordWebhookUrl": {
                        "title": "Discord webhook URL",
                        "type": "string",
                        "description": "Discord channel webhook for notifications."
                    },
                    "slackWebhookUrl": {
                        "title": "Slack webhook URL",
                        "type": "string",
                        "description": "Slack incoming webhook for notifications."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The data source works without a proxy; enable one only for very large or frequent runs.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
