# OLX Scraper — Poland, Portugal, Romania, Bulgaria & Ukraine (`foxlabs/olx-scraper`) Actor

Extract classified listings from OLX across Poland (.pl), Portugal (.pt), Romania (.ro), Bulgaria (.bg), and Ukraine (.ua) with prices, full descriptions, structured category attributes, seller profiles, locations, and HD photos.

- **URL**: https://apify.com/foxlabs/olx-scraper.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Categories:** E-commerce, Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.80 / 1,000 olx classified 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

![OLX Europe Marketplace Scraper Banner](https://data.foxlabs.com.tr/img/olx-scraper-banner.svg)

## OLX Scraper — PL, PT, RO, BG, UA, KZ & UZ Classifieds + GPS & Dealer Data

Extract structured classified ads, real estate, automotive, electronics, and dealer listings from **OLX** across **7 countries — Poland (`olx.pl`), Portugal (`olx.pt`), Romania (`olx.ro`), Bulgaria (`olx.bg`), Ukraine (`olx.ua`), Kazakhstan (`olx.kz`), and Uzbekistan (`olx.uz`)** — including **GPS coordinates (`latitude`, `longitude`), full item descriptions, numeric prices & previous-price drops, structured category attributes (`m²`, rooms, year, mileage, condition), business/dealer bios, SafeDeal flags, and full-resolution HD photos**.

> **AI Agent Quick-Start:** Start with: `{"country":"PL","queries":["iphone 15"],"maxListingsPerSearch":40}`

***

### 1. What Does OLX Scraper Do?

OLX is the dominant classifieds, real estate, and automotive marketplace across Central/Eastern Europe and Portugal, hosting over `25,000,000+` active offers. Instead of requiring five separate country-specific scrapers or slow detail-page crawls, **`foxlabs/olx-scraper`** taps OLX's structured offer API so **every search page returns complete item descriptions, all category parameters, seller details, and HD images in one fast pass**.

- **5 European OLX Portals in One Actor:** Switch effortlessly between `PL` (`PLN`), `PT` (`EUR`), `RO` (`RON`/`EUR`), `BG` (`BGN`/`EUR`), and `UA` (`UAH`), or pass direct `searchUrls` from any supported OLX domain.
- **Complete Detail Fields Without Extra Requests:** Unlike HTML card scrapers that truncate descriptions, every `listing` record includes full `descriptionText` / `descriptionHtml`, complete `attributes` (`state`, `m`, `rooms`, `year`, `milage`, `engine_power`, etc.), `previousPrice`, and `photoUrls[]` resolved to native HD dimensions.
- **Commercial Dealer & Agency Intelligence:** Filter specifically for `businessOnly: true` to build B2B lead lists of real estate agencies, car dealerships, and commercial merchants (`companyName`, `hasBusinessPage`, `hasPhoneContact`).

***

### 2. Why Choose `foxlabs/olx-scraper`?

| Capability | Typical OLX Scrapers | `foxlabs/olx-scraper` |
| :--- | :--- | :--- |
| **Country Support** | Single country (`.pl` or `.ro` only) | **5 countries (`PL`, `PT`, `RO`, `BG`, `UA`)** |
| **Full Description & Category Params** | Requires slow per-ad detail requests | **Included in fast API pass (`$1.80 / 1K` all-in)** |
| **Price Drop & Negotiation Signals** | Current price text only | **`price`, `previousPrice`, `priceNegotiable`, `priceCurrency`** |
| **HD Image Resolution** | Thumbnail URLs or `{width}x{height}` templates | **Resolved native HD `photoUrls[]`** |
| **Pay-Per-Event Pricing** | Monthly rental or start fees | **$0 start fee; `$1.80 / 1K` delivered listings** |

***

### 3. Who Uses This Data?

1. **Real Estate Investors & PropTech Platforms:** Track apartment/house prices per m², private-owner FSBO (`privateOnly: true`) vs agency (`businessOnly: true`) inventory, and price reductions across Warsaw, Lisbon, Bucharest, Sofia, and Kyiv.
2. **Used Car Arbitrage & Dealership Teams:** Monitor underpriced vehicle listings (`sortBy: "created_at:desc"`) with structured `year`, `mileage`, fuel type, and dealer company names.
3. **E-Commerce Resellers & Recommerce Platforms:** Track secondhand iPhones, laptops, consoles, and industrial equipment with `onlyWithDelivery: true`.
4. **B2B Merchant Acquisition Teams:** Identify active commercial sellers (`isBusiness: true`, `companyName`) on OLX across five European markets.

***

### 4. Transparent Pay-Per-Event Pricing

Billing is tied strictly to delivered listing records via `Actor.getChargingManager()` — **no monthly rental, no actor-start fee, and $0 charge on filtered-out or diagnostic `status` rows**:

| Event Name | Price | Per 1,000 Records | When Charged |
| :--- | :---: | :---: | :--- |
| `listing` | **$0.0018** | **$1.80 / 1K** | Each unique OLX listing extracted (already includes full description, attributes & HD photos) |
| `status` | **$0.0000** | **Free** | Diagnostic note emitted only on empty input or zero matches |

***

### 5. Input Parameters

| Parameter | Type | Default | Description |
| :--- | :---: | :---: | :--- |
| `country` | `string` | `"PL"` | Target OLX country (`"PL"`, `"PT"`, `"RO"`, `"BG"`, `"UA"`, `"KZ"`, `"UZ"`). |
| `queries` | `string[]` | `["iphone 15"]` | Search keywords. |
| `searchUrls` | `string[]` | `[]` | Direct OLX web category/search URLs or `/api/v1/offers/` URLs. |
| `categoryId` | `integer` | — | Optional numeric OLX category ID. |
| `sortBy` | `string` | `"relevance"` | `"relevance"`, `"created_at:desc"`, `"filter_float_price:asc"`, `"filter_float_price:desc"`. |
| `minPrice` | `number` | — | Minimum price in local currency (filtered-out rows cost `$0`). |
| `maxPrice` | `number` | — | Maximum price in local currency. |
| `businessOnly` | `boolean` | `false` | Retain professional business/dealer listings only (`isBusiness: true`). |
| `privateOnly` | `boolean` | `false` | Retain private individual listings only (`isBusiness: false`). |
| `onlyWithDelivery` | `boolean` | `false` | Retain listings with OLX courier/parcel delivery enabled. |
| `maxListingsPerSearch` | `integer` | `40` | Max unique listings per query or `searchUrl` (`1–1000`). |
| `maxTotalListings` | `integer` | `100` | Global run cap on billable listings (`1–25000`). |
| `proxyConfiguration` | `object` | `{"useApifyProxy":true}` | Managed automatically out of the box. |

***

### 6. Quick-Start Examples

#### Fast Newest-First Arbitrage Monitor (`$1.80 / 1K`)

```json
{
  "country": "PL",
  "queries": ["iphone 15 pro", "macbook air m3"],
  "sortBy": "created_at:desc",
  "minPrice": 1500,
  "maxPrice": 5500,
  "privateOnly": true,
  "maxListingsPerSearch": 40
}
```

#### Real Estate Agency / Dealer Discovery in Romania & Portugal

```json
{
  "searchUrls": [
    "https://www.olx.ro/imobiliare/apartamente-garsoniere-de-vanzare/",
    "https://www.olx.pt/carros-motos-e-barcos/carros/"
  ],
  "businessOnly": true,
  "maxListingsPerSearch": 50,
  "maxTotalListings": 100
}
```

***

### 7. Sample Output Record

```json
{
  "rowType": "listing",
  "rowKey": "olx:pl:1113774311",
  "listingId": "1113774311",
  "country": "PL",
  "title": "Rower szosowy (w zestawie: zamek, światło przód i tył)",
  "url": "https://www.olx.pl/d/oferta/rower-szosowy-CID767-ID1dnhzN.html",
  "status": "active",
  "categoryId": 1652,
  "categoryType": "goods",
  "price": 700,
  "priceCurrency": "PLN",
  "priceFormatted": "700 zł",
  "priceNegotiable": false,
  "previousPrice": null,
  "attributes": {
    "state": "Jak nowe",
    "gender": "Uniseks",
    "colorfashion": "Czerwony",
    "wheelsize": "28\""
  },
  "attributesText": "Stan: Jak nowe | Płeć: Uniseks | Kolor: Czerwony | Rozmiar koła: 28\"",
  "descriptionText": "Ostatnio wymieniłem siodło, pedały, stopkę.",
  "isBusiness": false,
  "companyName": null,
  "sellerId": "2063163082",
  "sellerName": "Andrzej",
  "hasPhoneContact": true,
  "deliveryAvailable": false,
  "cityName": "Skarbimierz Osiedle",
  "regionName": "Opolskie",
  "isHighlighted": true,
  "isTopAd": true,
  "photoCount": 6,
  "thumbnailUrl": "https://ireland.apollo.olxcdn.com:443/v1/files/c2keli1rwslv2-PL/image;s=1000x879",
  "createdAt": "2026-11-21T01:57:39+01:00",
  "lastRefreshAt": "2026-11-21T07:25:35+01:00",
  "scrapedAt": "2026-11-23T00:00:00.000Z"
}
```

***

### 8. Output Schema Reference

- **Identity & Portal:** `rowType` (`listing` | `status`), `rowKey` (`olx:<country>:<listingId>`), `listingId`, `country`, `title`, `url`, `status`, `categoryId`, `categoryType`, `searchSource`.
- **Pricing:** `price`, `priceCurrency`, `priceFormatted`, `priceNegotiable`, `priceArranged`, `previousPrice`.
- **Structured Specs & Content:** `attributes` (key-value map of all category parameters), `attributesText`, `descriptionText`, `descriptionHtml`, `photoCount`, `thumbnailUrl`, `photoUrls[]`.
- **Seller, SafeDeal & GPS Location:** `isBusiness`, `sellerType`, `companyName`, `sellerAbout`, `sellerLogoUrl`, `sellerIsOnline`, `shopSubdomain`, `sellerId`, `sellerUuid`, `sellerName`, `sellerCreatedAt`, `sellerLastSeenAt`, `hasBusinessPage`, `hasPhoneContact`, `hasChatContact`, `deliveryAvailable`, `safeDealAvailable`, `condition`, `cityName`, `regionName`, `districtName`, `latitude`, `longitude`, `mapRadius`, `createdAt`, `lastRefreshAt`, `pushedUpAt`, `validToAt`.

***

### 9. API & SDK Integration

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~olx-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"country":"PL","queries":["iphone 15"],"maxListingsPerSearch":40}'
```

#### JavaScript (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('foxlabs/olx-scraper').call({"country":"PL","queries":["iphone 15"],"maxListingsPerSearch":40});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python (`apify-client`)

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("foxlabs/olx-scraper").call(run_input={"country":"PL","queries":["iphone 15"],"maxListingsPerSearch":40})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items))
```

***

### 10. Real-Time Standby HTTP Mode

When executed in Apify Standby mode, the container exposes synchronous HTTP endpoints:

- `GET /` — Readiness and health probe.
- `POST /scrape` — Accepts the same JSON input payload and returns `{"ok": true, "count": N, "items": [...]}` synchronously.

***

### 11. Deduplication & Crash Recovery

Promoted OLX ads (`top_ad: true`) frequently repeat across pages and overlapping keyword searches. Every listing is keyed by `rowKey: "olx:<country>:<listingId>"` and deduplicated across queries and container restarts so you never pay twice for promoted duplicates.

***

### 12. Anti-Bleed Filter Protection

Server-side query parameters (`filter_float_price`, `owner_type`) are combined with strict client-side pre-charge verification and a `2`-page zero-match circuit breaker.

***

### 13. Combining With Other foXLabs Actors

Pair `olx-scraper` with:

- **`foxlabs/leboncoin-scraper`** & **`foxlabs/craigslist-scraper`** for pan-European and North American classifieds coverage.
- **`foxlabs/allegro-product-intelligence`** (or European e-commerce price monitors) for new-vs-used retail arbitrage benchmarking.

***

### 14. Performance & Memory Footprint

Pure Node.js 22 JSON streaming (`40` full offers per request) runs in `<6s` for standard queries inside **`256 MB` RAM**.

***

### 15. Handling Empty Results & Diagnostics (`SOURCE_REPORT`)

- Empty inputs or strict filter combinations that match zero ads finish cleanly (`SUCCEEDED`) with one free `rowType: "status"` explanation row.
- Full request/retry telemetry is persisted to `SOURCE_REPORT` in the default Key-Value Store.

***

### 16. Known Limitations

- OLX's public search API caps deep pagination at `1,000` offers per single query (`offset <= 1000`). For larger datasets, split your input by price brackets (`minPrice`/`maxPrice`), queries, or regional `searchUrls`.
- Direct seller phone numbers on OLX require logged-in interactive challenges; `hasPhoneContact` indicates whether phone contact is active while providing `sellerName`, `companyName`, and `url`.

***

### 17. Frequently Asked Questions (FAQ)

#### 1. Which OLX countries are supported?

Poland (`olx.pl`), Portugal (`olx.pt`), Romania (`olx.ro`), Bulgaria (`olx.bg`), and Ukraine (`olx.ua`). Note that OLX Brazil (`olx.com.br`) and OLX India run on separate platform architectures and are not part of this European OLX actor.

#### 2. Why is there no separate `listing-detail` fee?

Because `foxlabs/olx-scraper` queries OLX's structured offer API directly, **every single `listing` (`$1.80/1K`) already includes the complete item description, all category attributes, seller company metadata, and full-size HD photo URLs**.

#### 3. Can I paste a category URL like `https://www.olx.pt/carros-motos-e-barcos/carros/`?

Yes! When you pass an OLX category web URL in `searchUrls`, the actor automatically resolves the underlying `category_id` / `region_id` and streams offers via the fast JSON API.

#### 4. How do I filter out car dealers or real estate agencies (FSBO only)?

Set `privateOnly: true` to keep private individual sellers (`isBusiness: false`) only. Conversely, set `businessOnly: true` to extract commercial dealers and agencies only.

#### 5. Does OLX Scraper detect price drops?

Yes. Whenever a seller lowers an ad's price, OLX exposes the prior price in `previousPrice` alongside the current `price`.

#### 6. How are category-specific fields (like apartment `m²`, car `year`, or `mileage`) structured?

All category parameters are normalized into a clean JSON object under `attributes` (e.g., `{"m": "54 m²", "rooms": "3 pokoje"}`) plus a human-readable `attributesText` string for spreadsheet exports.

#### 7. Are promoted / repeated ads charged twice?

No. Promoted ads (`isTopAd: true`) that reappear across pages are deduplicated by `rowKey` at `$0.00` extra cost.

#### 8. Do I need custom proxies or cookies?

No. Anti-bot routing and session rotation work out of the box with default settings.

#### 9. How do I monitor brand-new OLX listings every 15 minutes?

Set `sortBy: "created_at:desc"` and schedule the actor at your desired interval, deduplicating by `listingId` downstream.

#### 10. What happens when `maxTotalChargeUsd` is set?

The actor checks `Actor.getChargingManager()` before pushing rows and halts cleanly the instant your spending limit is reached.

***

### 18. Support & Feedback

Open an issue on the Actor page in Apify Console with your Run ID or `SOURCE_REPORT` summary for rapid assistance.

***

### 19. Legal & Responsible Use

This actor extracts publicly visible classified advertisements for market pricing, real estate/automotive analytics, and business intelligence.

# Changelog

This Actor's version history is a separate document: https://apify.com/foxlabs/olx-scraper/changelog.md

# Actor input Schema

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

Target OLX marketplace country when using queries or categoryId.

## `queries` (type: `array`):

Keywords to search on OLX (e.g. 'iphone 15', 'macbook pro', 'kawalerka', 'apartament', 'bmw x5').

## `searchUrls` (type: `array`):

Full OLX web category/search URLs or /api/v1/offers/ URLs across olx.pl, olx.pt, olx.ro, olx.bg, or olx.ua.

## `categoryId` (type: `integer`):

Optional numeric OLX category ID to scope keyword searches (or leave blank for all categories).

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

Ordering applied to OLX offer queries.

## `minPrice` (type: `number`):

Minimum price in the marketplace's local currency (PLN, EUR, RON, BGN, UAH). Filtered-out rows cost $0.

## `maxPrice` (type: `number`):

Maximum price in the marketplace's local currency.

## `businessOnly` (type: `boolean`):

Keep only professional business/agency/dealer listings (isBusiness: true).

## `privateOnly` (type: `boolean`):

Keep only private individual listings (isBusiness: false).

## `onlyWithDelivery` (type: `boolean`):

Keep only listings where OLX courier/parcel delivery is enabled.

## `maxListingsPerSearch` (type: `integer`):

Maximum unique listings extracted per query or searchUrl (~40 listings per API page).

## `maxTotalListings` (type: `integer`):

Global run cap on total billable OLX listings.

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

Apify Proxy configuration. Automatically routes requests out of the box.

## Actor input object example

```json
{
  "country": "PL",
  "queries": [
    "iphone 15"
  ],
  "sortBy": "relevance",
  "businessOnly": false,
  "privateOnly": false,
  "onlyWithDelivery": false,
  "maxListingsPerSearch": 40,
  "maxTotalListings": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

No description

## `sourceReport` (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",
    "queries": [
        "iphone 15"
    ],
    "maxListingsPerSearch": 40,
    "maxTotalListings": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/olx-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",
    "queries": ["iphone 15"],
    "maxListingsPerSearch": 40,
    "maxTotalListings": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/olx-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",
  "queries": [
    "iphone 15"
  ],
  "maxListingsPerSearch": 40,
  "maxTotalListings": 100
}' |
apify call foxlabs/olx-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,foxlabs/olx-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/nGewhTpGiVySdCMXG/builds/sovxVpQBFWvWmAGIb/openapi.json
