# OLX-Group Real-Estate Scraper (PL/PT) (`barefoot_grade/olx-realestate-scraper`) Actor

Real-estate listings from OLX Group portals: Otodom (Poland) and Imovirtual (Portugal). Filter by country, buy or rent, property type and location. One normalized record: price, area, rooms, extras, images, listing URL. On-demand scrape — fresh listings every run.

- **URL**: https://apify.com/barefoot_grade/olx-realestate-scraper.md
- **Developed by:** [Philip Kirkbride](https://apify.com/barefoot_grade) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 listings

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

## Poland and Portugal Property Listings

### Quick Start

Find public sale or rental listings on Otodom or Imovirtual.
Useful for market research, property discovery, and price monitoring.
Start with this minimal input:

```json
{"country":"PL","operation":"buy","propertyType":"apartments","maxResults":10}
```

### Supported portals

| `country` | Portal | Domain | Local currency | UI language |
|---|---|---|---|---|
| `PL` (default) | Otodom | www.otodom.pl | PLN | pl-PL |
| `PT` | Imovirtual | www.imovirtual.com | EUR | pt-PT |

Both portals return the same normalized record schema, so one input set works for either country.

### Input

| Name | Type | Default | What it does |
| --- | --- | --- | --- |
| `country` | string | `PL` | Selects Poland/Otodom or Portugal/Imovirtual. |
| `operation` | string | `buy` | Searches sale or rental listings. |
| `propertyType` | string | `apartments` | Selects apartments or houses. |
| `location` | string | empty | Optional supported location slug, e.g. `cala-polska` or `mazowieckie` (PL) or `lisboa` (PT). Empty uses the portal's default location. |
| `maxPages` | integer | `1` | Maximum result pages, 1-5. |
| `maxResults` | integer | `50` | Maximum listings, 1-200. |

### Output

Each record includes `id`, `listingKey`, `url`, `name`, `price`, `currency`, `areaM2`, `rooms`, `bedrooms`, `bathrooms`, `address`, `imageUrl`, `images`, `operation`, `propertyType`, `location`, `portal`, `country`, `source`, and `collectedAt`.

```json
{"listingKey":"otodom.pl:4dQ000","url":"https://www.otodom.pl/pl/oferta/example-ID4dQ000","name":"Apartment in Warsaw","price":450000,"currency":"PLN","areaM2":52,"rooms":2,"bedrooms":1,"bathrooms":1,"images":[]}
```

Join on `listingKey`, never the bare `id`. Unavailable fields are `null`.

### FAQ

#### How fresh is the data?

Listings are collected when the Actor runs.

#### Which areas are supported?

Poland through Otodom and Portugal through Imovirtual, using supported location slugs.

#### How many listings can I collect?

Up to 5 pages and 200 listings per run.

#### What happens if a page cannot be read?

Temporary request problems are retried; persistent failures are reported in the run.

#### Can I collect rentals?

Yes. Set `operation` to `rent`.

For help, contact Apify Support and include the run URL.

# Actor input Schema

## `country` (type: `string`):

Country/portal to search. PL selects Otodom (otodom.pl, PLN); PT selects Imovirtual (imovirtual.com, EUR). The portal determines the domain, currency and URL grammar of every record.

## `operation` (type: `string`):

Listing operation to search: buy (sale) or rent (rental).

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

Property type to search. Each portal maps the facet to its own URL slug (otodom mieszkanie/dom, imovirtual apartamento/moradia).

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

Optional verified location slug. Only live-verified values are accepted; otodom's location grammar nests region/city segments, so a bare city slug such as "warszawa" 404s and is rejected before any fetch. Empty searches the portal's verified default (whole Poland on otodom, Lisboa on imovirtual). A slug that does not belong to the selected country fails with a named config error.

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

Search-result pages to fetch (pagination via the ?page=N query parameter).

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

Stop after this many listings.

## `requestDelaySecs` (type: `number`):

Minimum 0.5 seconds.

## Actor input object example

```json
{
  "country": "PL",
  "operation": "buy",
  "propertyType": "apartments",
  "location": "",
  "maxPages": 1,
  "maxResults": 50,
  "requestDelaySecs": 1
}
```

# Actor output Schema

## `results` (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 = {
    "country": "PL",
    "operation": "buy",
    "propertyType": "apartments",
    "location": "",
    "maxPages": 1,
    "maxResults": 50,
    "requestDelaySecs": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("barefoot_grade/olx-realestate-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 = {
    "country": "PL",
    "operation": "buy",
    "propertyType": "apartments",
    "location": "",
    "maxPages": 1,
    "maxResults": 50,
    "requestDelaySecs": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("barefoot_grade/olx-realestate-scraper").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 '{
  "country": "PL",
  "operation": "buy",
  "propertyType": "apartments",
  "location": "",
  "maxPages": 1,
  "maxResults": 50,
  "requestDelaySecs": 1
}' |
apify call barefoot_grade/olx-realestate-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,barefoot_grade/olx-realestate-scraper"
        }
    }
}
```

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/ehTQ3c9eIgBgJrcT0/builds/Y92dE1j7klWpMe3lk/openapi.json
