# OLX Scraper (`maximedupre/olx-scraper`) Actor

Scrape OLX listings by keyword, category ID, search URL, or API URL. Export prices, locations, seller details, photos, attributes, and source URLs.

- **URL**: https://apify.com/maximedupre/olx-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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/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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

### 🛒 OLX scraper for listing data

OLX Scraper collects public listings from [OLX](https://www.olx.pl/) marketplaces and saves them as clean rows you can export, schedule, or use through the Apify API. Search by keyword, category ID, OLX search URL, or OLX API offers URL, then get listing titles, prices, seller details, locations, photos, attributes, source URLs, and scrape timestamps.

Use this OLX scraper when you need marketplace data for price monitoring, second-hand market research, local listing checks, seller research, or repeat reports. For a small first run, keep the prefilled `iphone` search in Poland, keep `Listing limit` at `100` or lower it to `25`, and review the dataset before scaling up.

### 🔎 What this OLX scraper does

- Scrapes public OLX listing search results.
- Accepts plain search terms such as `iphone`, `bike`, or `sofa`.
- Accepts OLX search URLs and OLX API offers URLs.
- Supports OLX markets for Poland, Bulgaria, Romania, Portugal, and Ukraine.
- Lets you combine plain searches with country-specific category IDs.
- Filters by minimum price and maximum price.
- Sorts plain searches and category ID runs by newest, low price, or high price.
- Saves one dataset row per accepted OLX listing.
- Can add detail enrichment for each saved listing when you need the richer API payload.
- Works with Apify exports, schedules, webhooks, integrations, and API clients.

The Actor focuses on public OLX listing data. It does not log in, message sellers, reveal protected phone numbers, scrape private account data, submit forms, or enrich rows from third-party data sources. Public OLX listing page URLs are not used as direct targets unless they are OLX API offers URLs.

### 📦 Data you can extract

Each dataset item is one OLX listing. Some fields can be empty when OLX does not show or return that value for a listing.

- `listingId` - OLX listing ID.
- `title` - listing title.
- `url` - source OLX listing URL.
- `sourceTarget` and `sourceType` - input search, category, or API URL that produced the row.
- `resultPosition` and `pageOffset` - listing position in the collected result set.
- `country` - OLX market used for the row.
- `status`, `offerType`, `createdAt`, `lastRefreshAt`, and `validTo`.
- `price` - visible price text, numeric amount, currency, negotiable flag, and arranged-price flag.
- `location` - city, region, latitude, longitude, map radius, and detailed-map flag when available.
- `seller` - public seller ID, name, profile URL, photo URL, account age, online status, and contact flags.
- `category` - OLX category ID and type when returned.
- `descriptionText` - public listing description.
- `attributes` - listing parameters such as condition, model, memory, color, or other category-specific values.
- `photos` - listing image URLs with source dimensions when available.
- `promotion` and `delivery` - source flags such as highlighted, urgent, top ad, and delivery mode.
- `detailPageFetched` and `detailUnavailableReason` - whether detail enrichment was fetched for the row.
- `scrapedAt` - timestamp when the row was saved.

### 🧭 Common use cases

- Track used product prices across OLX markets.
- Watch new listings for a keyword or category.
- Compare seller activity, locations, and listing attributes.
- Build second-hand marketplace reports.
- Export OLX listing data to CSV, JSON, Excel, Google Sheets, webhooks, or your own API workflow.
- Schedule repeat searches for price and inventory monitoring.

### 🚀 How to run

1. Open the Input tab.
2. Keep the prefilled `iphone` search for a quick test, or add your own OLX search terms.
3. Choose the country for plain searches and category IDs.
4. Add category IDs only when you know the OLX category IDs you want to use.
5. Set price filters, sorting, and listing limit.
6. Turn on `Add listing details` only when you need detail enrichment.
7. Run the Actor and open the dataset.

Plain search terms and category IDs use the selected country. Pasted OLX search URLs and OLX API offers URLs keep their own market.

### ⚙️ Input options

- `Searches or OLX URLs` - search terms, OLX search URLs, or OLX API offers URLs. You can mix values in one run.
- `Category IDs` - optional OLX category IDs to combine with plain search terms.
- `Country for searches and category IDs` - OLX market for plain searches and category IDs: Poland, Bulgaria, Romania, Portugal, or Ukraine.
- `Sort listings by` - newest first, price low to high, or price high to low.
- `Minimum price` and `Maximum price` - optional price bounds in the selected OLX market's local currency.
- `Listing limit` - maximum listings to save across all targets.
- `Add listing details` - fetch detail enrichment for each saved listing. This costs more per saved listing.

### 📊 Output example

```json
{
  "listingId": "1076929565",
  "title": "Bateria 100% iPhone 14 Pro Max 256gb Deep Purple Idealny",
  "url": "https://www.olx.pl/d/oferta/bateria-100-iphone-14-pro-max-256gb-deep-purple-idealny-CID99-ID1aSGzH.html",
  "sourceTarget": "iphone",
  "sourceType": "search",
  "resultPosition": 1,
  "country": "pl",
  "price": {
    "text": "2 350 zł",
    "amount": 2350,
    "currency": "PLN",
    "negotiable": false
  },
  "location": {
    "city": "Warszawa",
    "region": "Mazowieckie",
    "latitude": 52.23876,
    "longitude": 21.08553
  },
  "seller": {
    "id": "330413574",
    "name": "SuperMen S",
    "profileUrl": "https://www.olx.pl/oferty/uzytkownik/330413574/",
    "canChat": true,
    "hasPhone": true
  },
  "category": {
    "id": "2298",
    "type": "electronics"
  },
  "detailPageFetched": false,
  "scrapedAt": "2026-06-05T15:05:00.000Z"
}
````

### 💵 Pricing

This Actor uses pay-per-event pricing:

- `Actor start` - small charge for starting one run.
- `Listing` - charged for each saved listing.
- `Detailed listing` - charged for each saved listing when `Add listing details` is turned on.

You only pay listing events for rows saved to the dataset. Keep `Listing limit` small for a first run, then raise it when the output looks right.

### ⚠️ Limits and caveats

- The Actor uses public OLX data only.
- Direct public OLX listing page URLs are not direct targets. Use search terms, OLX search URLs, OLX API offers URLs, or category IDs.
- Category IDs are country-specific.
- Full OLX search URLs keep their own country domain.
- Detail enrichment can add richer listing data, but it costs more per saved listing.
- Some fields can be empty when OLX does not return them for a listing.

### ❓ FAQ

#### Can I scrape OLX listing URLs directly?

Use OLX API offers URLs when you need an exact listing target. Public listing page URLs are not direct targets in this version.

#### Do I need an OLX account?

No. The Actor works with public OLX listing data and does not ask for OLX login credentials.

#### Which OLX countries are supported?

The input supports Poland, Bulgaria, Romania, Portugal, and Ukraine.

#### Can I use this with the Apify API?

Yes. You can run the Actor through the Apify API, schedule it, export the dataset, or send rows to other tools with webhooks.

### 📝 Changelog

- 0.0: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~olx-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Other actors

- [Mercado Libre Search Scraper ↗](https://apify.com/maximedupre/mercado-libre-search-scraper) - Scrape Mercado Libre product search rows with prices, sellers, images, and rank.
- [Allegro Scraper ↗](https://apify.com/maximedupre/allegro-scraper) - Scrape Allegro product listings, prices, sellers, delivery text, and parameters.
- [Trendyol Scraper ↗](https://apify.com/maximedupre/trendyol-scraper) - Scrape Trendyol product data and optional review rows.
- [Autotrader Scraper ↗](https://apify.com/maximedupre/autotrader-scraper) - Scrape US vehicle listings with prices, seller data, VINs, photos, and specs.
- [BusinessesForSale Scraper ↗](https://apify.com/maximedupre/businessesforsale-scraper) - Scrape business opportunity listings with prices, locations, tags, and seller contact links.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `targets` (type: `array`):

Enter OLX search terms like iphone, paste OLX search URLs, or paste OLX API offers URLs. You can mix terms and URLs in one run. Category IDs go in the field below.

## `categoryIds` (type: `array`):

Optional OLX category IDs to combine with plain searches. Category IDs are country-specific; category URLs are easier when you have them.

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

OLX market to use for plain search terms and category IDs. Full OLX URLs keep their own country domain.

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

Sort order for plain searches and category IDs. Full OLX URLs keep their source sort when possible.

## `minPrice` (type: `integer`):

Optional minimum listing price in the selected OLX market's local currency.

## `maxPrice` (type: `integer`):

Optional maximum listing price in the selected OLX market's local currency.

## `maxItems` (type: `integer`):

Maximum listing rows to save across all targets. Start small for a quick test, then raise the limit for larger exports.

## `includeDetails` (type: `boolean`):

Open each listing page to add detail-only fields such as coordinates when available. This costs more per saved listing.

## Actor input object example

```json
{
  "targets": [
    "iphone"
  ],
  "categoryIds": [],
  "country": "pl",
  "sortBy": "newest",
  "maxItems": 100,
  "includeDetails": false
}
```

# Actor output Schema

## `results` (type: `string`):

Open the dataset of OLX listings with prices, locations, seller details, photos, attributes, and source URLs.

# 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 = {
    "targets": [
        "iphone"
    ],
    "categoryIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/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 = {
    "targets": ["iphone"],
    "categoryIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/olx-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 '{
  "targets": [
    "iphone"
  ],
  "categoryIds": []
}' |
apify call maximedupre/olx-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OLX Scraper",
        "description": "Scrape OLX listings by keyword, category ID, search URL, or API URL. Export prices, locations, seller details, photos, attributes, and source URLs.",
        "version": "0.0",
        "x-build-id": "7AcfXmFvGNwfIgWHZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~olx-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-olx-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/maximedupre~olx-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-olx-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/maximedupre~olx-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-olx-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",
                "required": [
                    "targets"
                ],
                "properties": {
                    "targets": {
                        "title": "Searches or OLX URLs",
                        "minItems": 1,
                        "type": "array",
                        "description": "Enter OLX search terms like iphone, paste OLX search URLs, or paste OLX API offers URLs. You can mix terms and URLs in one run. Category IDs go in the field below.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "categoryIds": {
                        "title": "Category IDs",
                        "type": "array",
                        "description": "Optional OLX category IDs to combine with plain searches. Category IDs are country-specific; category URLs are easier when you have them.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "country": {
                        "title": "Country for searches and category IDs",
                        "enum": [
                            "pl",
                            "bg",
                            "ro",
                            "pt",
                            "ua"
                        ],
                        "type": "string",
                        "description": "OLX market to use for plain search terms and category IDs. Full OLX URLs keep their own country domain.",
                        "default": "pl"
                    },
                    "sortBy": {
                        "title": "Sort listings by",
                        "enum": [
                            "newest",
                            "price_asc",
                            "price_desc"
                        ],
                        "type": "string",
                        "description": "Sort order for plain searches and category IDs. Full OLX URLs keep their source sort when possible.",
                        "default": "newest"
                    },
                    "minPrice": {
                        "title": "Minimum price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional minimum listing price in the selected OLX market's local currency."
                    },
                    "maxPrice": {
                        "title": "Maximum price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional maximum listing price in the selected OLX market's local currency."
                    },
                    "maxItems": {
                        "title": "Listing limit",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum listing rows to save across all targets. Start small for a quick test, then raise the limit for larger exports.",
                        "default": 100
                    },
                    "includeDetails": {
                        "title": "Add listing details",
                        "type": "boolean",
                        "description": "Open each listing page to add detail-only fields such as coordinates when available. This costs more per saved listing.",
                        "default": 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
