By the end of this tutorial you will have a short Python script that pulls listings from OLX.ro, the Romanian classifieds site, into structured rows: title, asking price in RON, town, condition, posting date, photo link and a flag for paid promoted placements.
OLX Romania Scraper (reventadata/olx-ro-scraper) is the Apify Actor that does the reading. You give it search terms and a few filters, and it returns one row per ad. This guide runs it from Python with the Apify API client. Nothing on the Python side scrapes anything: the script only starts the run and reads its results. The sample rows below are copied from a real run of the Actor's public example task, not invented.
Prerequisites
You need three things:
-
Python 3.11+ with
pip. - A free Apify account. You can sign up with an email address or a GitHub login.
- Your Apify API token, from your account.
Install the client and export the token:
pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"
No scraping code is needed on your side. The Actor does the reading from public pages, with no login.
What you'll achieve
You will ask for up to 200 used laptops priced up to 1,500 RON, read the rows in Python and print one line per listing.
The same script works for any category on OLX.ro, because the Actor covers the whole site. A phone model, a flat to rent or a car: only the search terms and the filters change.
Each row says whether the ad is a paid promoted placement and whether the seller is a business account. No row carries a seller name, a phone number or a profile link. The script stays the same for any other search, so only the input changes.
Step 1: Open the Actor
Open the OLX Romania Scraper page on Apify Store and note its name, reventadata/olx-ro-scraper. The API call in Step 3 uses that name.
Step 2: Choose the search
The Actor reads these input fields:
-
searchQueries: a list of search terms, one search each. It has no default, so you must set at least one. -
condition:any,neworused. Any other value is refused before the run starts. -
sortBy:relevance(the default),priceAsc,priceDescornewest. Paid promoted placements are mixed in whatever the sort, so the order is best effort. -
minPriceandmaxPrice: in RON. Leave one out and no limit applies on that side. -
maxItems: the cap on rows across all search terms. The default is 1000. -
maxPages: pages per search term. OLX.ro serves at most 25 pages per search, and the value is capped at 25. -
excludeFeatured:falseby default. Set it totrueto drop promoted placements. -
requireKeywordMatch:trueby default. A listing stays only if its title contains every word of its search term. Accents are ignored in the match. -
proxyConfiguration: off by default. Turn it on only if requests fail.
Two search terms run two searches. A listing that both terms find is kept once.
This is the input of the public example run I read the rows from. Every other field keeps its default:
{
"searchQueries": ["laptop"],
"condition": "used",
"maxPrice": 1500,
"maxItems": 200
}
Step 3: Run it from Python
This script starts the Actor, reads the rows from the run's default dataset and prints one line per listing:
import os
from apify_client import ApifyClient
# 1. Initialise the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])
# 2. Describe the search: used laptops up to 1,500 RON
run_input = {
"searchQueries": ["laptop"],
"condition": "used",
"maxPrice": 1500,
"maxItems": 200,
}
# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/olx-ro-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
status = run.status if run else "unknown"
raise SystemExit(f"Run did not succeed (status: {status}).")
# 4. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} listings.\n")
# 5. Print one line per listing: title, asking price, town, promoted flag
for item in items:
price = item.get("price")
price_text = f"{price:g} RON" if price is not None else "no price"
print(f"{item['title']} | {price_text} | {item.get('location')} | promoted: {item.get('isFeatured')}")
call() starts the run and returns its Run object, whose status and default_dataset_id the script reads. list_items() returns a page of dataset items, and the rows sit in its items list. Both calls are in the Apify Python client reference, read on 2026-11-16.
Step 4: Read the output
Each dataset item is a row like the one below. Two long fields, description and imageUrl, are left out of this copy; the row carries them.
{
"id": "307652145",
"title": "Laptop HP Probook 470 G7 i5-1020u 16 gb ram ddr4 512 gb ssd Radeon Series Ecran Mare 17 inch Full HD Office 2016 Windows 11 Factura si Garantie 1 an",
"url": "https://www.olx.ro/d/oferta/laptop-hp-probook-470-g7-i5-1020u-16-gb-ram-ddr4-512-gb-ssd-radeon-series-ecran-mare-17-inch-full-hd-office-2016-windows-11-factura-si-garantie-1-an-IDkOSnn.html",
"price": 1330,
"priceNegotiable": false,
"currency": "RON",
"location": "Bucuresti",
"region": "Bucuresti - Ilfov",
"postedAt": "2026-08-06T12:07:48+03:00",
"refreshedAt": "2026-11-14T11:33:32+02:00",
"condition": "Utilizat",
"attributes": {
"state": "Utilizat",
"diagonala": "Diagonala peste 15.6\"",
"producator_procesor": "Intel ",
"tip_placa_video": "Dedicata",
"tip_stocare": "SSD",
"capacitate_memorie_ram": "12 - 16 GB"
},
"isFeatured": true,
"isBusiness": true,
"matchedKeyword": "laptop"
}
This row has isFeatured and isBusiness both set to true. The run returned 200 rows; this sample is the first 10 of them, copied as returned. Titles and descriptions stay in Romanian, as the sellers wrote them.
Understanding your results
Each row has these fields:
-
id: OLX.ro's listing ID. -
titleanddescription: as the seller wrote them, with HTML removed from the description. -
price: the asking price in RON. A listing with no stated price hasnull, never0. -
priceNegotiable:truewhen the ad is marked as negotiable. -
locationandregion: the town and the county. -
postedAtandrefreshedAt: ISO 8601 times with the site's offset. -
condition:Utilizat(used) orNou(new), ornull. -
attributes: the ad's structured fields, such as screen size and memory for laptops. -
isFeaturedandisBusiness: promoted placement, and business seller. -
matchedKeyword,urlandimageUrl: the term that found the ad, its link, and its first photo ornull.
The 10 sample rows, the first of the run's 200: all are Utilizat, prices run from 80 to 1,330 RON, three are promoted placements and one is a business seller. Two rows name a laptop in the title but are a laptop bag and a RAM module, and the title check keeps them.
Pro tips and advanced usage
-
Test small. Set
maxItemsandmaxPageslow while you build the script, then raise them, so each test run finishes quickly. -
Narrow to get past 25 pages. The site serves at most 25 pages per search. Narrowing with
minPrice,maxPriceorconditionbrings more ads into those pages. -
Drop promoted placements with
excludeFeatured: truewhen you want organic listings only. -
Keep the title check on. OLX.ro's own search is fuzzy, so with
requireKeywordMatchoff the result can include ads whose titles do not name the term. - Repeat the search. Save the input as an Apify task and run it on a schedule.
-
Check the flags before you rank. Promoted placements do not follow
sortBy, so readisFeaturedbefore you sort a list by price. -
Read the seller type.
isBusinesstells a business seller from a private one. No seller name is in the row.
Troubleshooting common issues
-
No matches. The run ends as
SUCCEEDEDwith a status message that says nothing matched. The dataset is empty. -
Pages could not be read. If the run stored no rows and a page could not be read, the run is marked
FAILED. The log names the search term and the page. - The run clock ends the run early. Rows already saved stay in the dataset, and the log carries a warning.
-
A refused input. A
conditionorsortByvalue outside its list is refused before the run starts. Fix the value and run again. - Read the log first. It names the search term and the page involved, and it is the first place to look for any problem above.
Next steps
Save the input as a task and add a schedule to repeat it, or read the dataset from your own script, as the Python above does. Use minPrice and maxPrice to watch one price band.
For current pricing and details, see the Store page.
What will you search for on OLX.ro? Drop a comment! 💬
About the author: reventadata builds and publishes data extraction Actors on the Apify Store.
Top comments (0)