DEV Community

Cover image for How to Pull Storia Property Listings into Python with Storia Scraper
ReventaData
ReventaData

Posted on Originally published at apify.com

How to Pull Storia Property Listings into Python with Storia Scraper

This tutorial shows you how to pull property listings from Storia.ro into a Python script. You will call the Storia Scraper Actor (reventadata/storia-scraper) with the official apify-client package, wait for the run to finish, and print one block per listing. Each block shows the price, the area, the rooms, the district and the seller type. The output is JSON rows that you can store, filter or load into a spreadsheet.

Storia is a Romanian property portal for apartments and houses, for sale or for rent. Comparing listings by hand across several districts is slow. A script that returns the same fields for every listing makes that comparison straightforward. This Actor is not affiliated with Storia.


Prerequisites

You need Python 3 and a free Apify account. Copy your Apify API token from your account settings, then install the client and set the token as an environment variable:

pip install -U "apify-client~=3.0"
export APIFY_API_TOKEN="your_apify_token_here"
Enter fullscreen mode Exit fullscreen mode

No Storia login is needed. The Actor reads public search pages.


What you'll achieve

By the end of this guide you will have a Python script that takes a Storia search, runs the Actor and prints the listings it returns. For each listing you get the listing URL, the asking price in EUR, the price per square metre, the area, the number of rooms, the floor, the sector or city, the district, and whether the seller is a private owner or a business. Each row also carries the agency or developer name and the contact names the listing shows.

Example use case: you want to compare flats for sale in Bucharest under 100,000 EUR, offered by private owners. Run the script with a maximum price and the private-owner filter, then sort the rows by price per square metre.


Step 1: Find the Actor

Open the Storia Scraper page on Apify Store. The page lists the input fields and the dataset structure, so you can check both before you write any code.

In this tutorial we drive the Actor from Python, so the run is repeatable and the output lands in your own script.


Step 2: Set the input

The Actor takes its input as a run_input dictionary. These are the fields you are most likely to change:

Field Type Default Description
transaction string buy buy for sale or rent for rental listings.
propertyType string apartament apartament (apartment) or casa (house).
location string bucuresti The location path from a storia.ro search URL, such as bucuresti, cluj/cluj--napoca or toata-romania for the whole country.
maxPrice integer empty Optional upper price limit in EUR. On rent searches it limits the monthly rent.
ownerType string any any or private, which keeps private owners only.
sortBy string relevance relevance, priceAsc (cheapest first) or newest.
maxItems integer 1000 The most rows to save.

A location the site does not recognise stops the run with an input error, so copy the path exactly from a real search URL.

import os
from apify_client import ApifyClient

# 1. Initialize ApifyClient with the token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Define the input: apartments for sale in Bucharest, private owners only
run_input = {
    "transaction": "buy",
    "propertyType": "apartament",
    "location": "bucuresti",
    "maxPrice": 100000,
    "ownerType": "private",
    "sortBy": "newest",
    "maxItems": 10,
    "maxPages": 1,
}
Enter fullscreen mode Exit fullscreen mode

Step 3: Run the Actor

Start the run with client.actor("reventadata/storia-scraper").call(run_input=run_input). The call waits until the run finishes, then returns the run object:

# 3. Start the Actor run and wait for it to complete
print("Starting Storia listing extraction...")
run = client.actor("reventadata/storia-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. Fetch the resulting dataset items
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Extraction complete! Retrieved {len(items)} listings.\n")
Enter fullscreen mode Exit fullscreen mode

While the run is active, the Actor reads the search pages and saves each listing to the default dataset. You can leave the script waiting; the run continues on Apify's side.


Step 4: Read the results

Iterate through items and print the fields you need:

for item in items:
    print(item.get("price"), item.get("currency"), item.get("areaM2"), "m2", item.get("rooms"), "rooms")
    print(f"  District: {item.get('district')}, sector: {item.get('sector')}")
    print(f"  Seller: {item.get('sellerType')}, agency: {item.get('agencyName')}")
    print(f"  {item.get('url')}")
    print("-" * 50)
Enter fullscreen mode Exit fullscreen mode

Here is one row from a sample from a run dated 2026-11-20, a search for apartments for sale in Bucharest. The excerpt keeps selected fields only:

{
  "id": "10776680",
  "url": "https://www.storia.ro/ro/oferta/apartament-2-camere-decomandat-mobilat-utilat-metrou-berceni-IDJdwq",
  "price": 109000,
  "currency": "EUR",
  "pricePerSquareMeter": 1730.16,
  "areaM2": 63,
  "rooms": 2,
  "floor": "FIFTH",
  "county": "Bucuresti",
  "sector": "Sectorul 4",
  "district": "Aparatorii Patriei",
  "sellerType": "business",
  "agencyName": "TopHome.ro",
  "isPrivateOwner": false,
  "createdAt": "2026-11-12T18:06:23+00:00",
  "features": [
    "AIR_CONDITIONING",
    "SEPARATE_KITCHEN",
    "BALCONY",
    "SECURE_BUILDING"
  ]
}
Enter fullscreen mode Exit fullscreen mode

The dataset has no phone number field. It lists the contact names the listing shows in contactNames.

Export the rows as JSON, CSV or Excel from the dataset, or keep the Python list and write it to a file with the standard library.


Understanding your results

Each row describes one listing.

  • price and currency: the asking price. On rent searches it is the monthly rent. It is null, never 0, when the listing publishes no price.
  • priceHidden: true when the seller chose to hide the price.
  • pricePerSquareMeter: the price per square metre as the site computes it. It can be null on many rental listings.
  • areaM2, rooms and floor: the area in square metres, the number of rooms, and the floor as the site names it, such as GROUND or SECOND.
  • county, city, sector and district: the location fields. sector is set for Bucharest listings; city is set for listings in towns such as Popesti Leordeni, where sector and district are null.
  • sellerType, agencyName and isPrivateOwner: whether a private person, an agency, a business or a developer published the listing, and its name.
  • createdAt and pushedUpAt: when the listing was first created, and when it was last bumped to the top, as ISO 8601 timestamps.
  • investmentState and the other investment* fields: they describe new-development listings only, so they are null on a resale apartment.

Pro tips

  • Keep the cap small while you test. Set maxItems to 10 and maxPages to 1 while you check the fields, then raise them.
  • Use ownerType to narrow the results. private returns private owners only. Check isPrivateOwner on each row if you want to confirm it.
  • Sort at the source. sortBy: "priceAsc" returns the cheapest listings first, so a small maxItems gives you the cheapest part of the search.
  • Store the id field. It identifies a listing, so you can merge later runs into one table without duplicates.
  • Keep sale and rent apart. A sale price and a monthly rent are not comparable, so keep the two searches in separate tables.
  • Write the input down. Keep the run_input dictionary with the saved rows, so you can say later which search produced each row.
  • Check the sample against the site. Open two or three url values in a browser and compare the price and area with the row before you build on the data.

Troubleshooting common issues

  • The run stops with an input error about the location. Copy the path after the property type from a storia.ro search URL, for example cluj/cluj--napoca. A path the site does not have stops the run.
  • The run ends without rows. Open the run in the Apify Console and read its log. The log names the search it read. Check that the same search opens on storia.ro, then try again later.
  • A field is null on every row. Some fields only apply to certain listings. Check the field description in the Actor's dataset schema before you treat it as a bug.

Next steps

Once the script works, schedule it from the Apify Console, or call it from a cron job on your own machine. Load the rows into a database or a spreadsheet and track one district's prices over several weeks. Read the Store page for the current input fields and dataset structure.

For current pricing and details, see the Store page.

About the author: reventadata builds and maintains scrapers for public marketplace, job and property sites on the Apify Store.

Tell us in the comments which district you would compare first.

Top comments (0)