# OLX.ba Property Scraper - Bosnia Real Estate Listings (`sian.agency/olx-ba-property-scraper`) Actor

Export olx.ba (PIK.ba) property adverts across Bosnia and Herzegovina: price in KM and EUR, m², rooms, floor, heating, address, GPS, seller type and photos.

- **URL**: https://apify.com/sian.agency/olx-ba-property-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.32 / 1,000 property listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.ba Scraper - Bosnia Property Listings & Prices 🏠

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Halo Oglasi](https://img.shields.io/badge/Store-Halo%20Oglasi%20Scraper-1AE392)](https://apify.com/sian.agency/halooglasi-property-scraper?fpr=sian) [![Njuskalo](https://img.shields.io/badge/Store-Nju%C5%A1kalo%20Scraper-1AE392)](https://apify.com/sian.agency/njuskalo-property-scraper?fpr=sian) [![4zida](https://img.shields.io/badge/Store-4zida.rs%20Scraper-1AE392)](https://apify.com/sian.agency/4zida-property-scraper?fpr=sian)

#### 🎉 Every olx.ba property advert as a row, with area, rooms, floor, address and GPS

##### For agencies, investors and analysts who need Sarajevo, Banja Luka, Mostar and the rest of Bosnia and Herzegovina in a spreadsheet

### 🔎 What is the OLX.ba Bosnia Property Scraper — and when should you use it?

The **OLX.ba Bosnia Property Scraper** turns public olx.ba (PIK.ba) property adverts from anywhere in Bosnia and Herzegovina into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** Bosnian sale, rental and short-term property adverts as rows. The price comes back as a number in KM (BAM) next to the text the site shows, plus EUR at the fixed 1.95583 rate and price per m². Each row carries area, rooms, bathrooms, floor, heating, condition, year built, land-registry status, amenities, the street address, GPS, the town, canton and entity, every photo, and whether the seller is a private person or a business account.

**Use something else when:** the property is in Serbia or Croatia rather than Bosnia and Herzegovina. Use [Halo Oglasi Scraper](https://apify.com/sian.agency/halooglasi-property-scraper?fpr=sian) for Serbia's biggest property classifieds, with price per m², rooms, floor and heating. Use [Njuškalo Scraper](https://apify.com/sian.agency/njuskalo-property-scraper?fpr=sian) for Croatia's largest classifieds site, property section included. This actor reads the property section of olx.ba only: apartments, houses, land, offices and shops, holiday homes, garages, warehouses, prefab buildings, rooms and short-term apartments. Cars, phones and jobs are not read. Seller phone numbers are not returned.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/olx-ba-property-scraper

**Your agent can pay for its own runs.** This Actor is eligible for [agentic payments](https://docs.apify.com/platform/actors/publishing/monetize), so an agent can discover it, run it and settle the bill over [x402](https://www.x402.org/) (USDC on Base) or [Skyfire](https://www.skyfire.xyz/) — without an Apify account or API token of its own. Billing is the same either way: per successful row, never for errors.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want property listings and asking prices from olx.ba in Bosnia and Herzegovina using the Apify Actor `sian.agency/olx-ba-property-scraper`.

Use it when I need: Bosnian sale, rental and short-term property adverts as rows. The price comes back as a number in KM (BAM) next to the text the site shows, plus EUR at the fixed 1.95583 rate and price per m². Each row carries area, rooms, bathrooms, floor, heating, condition, year built, land-registry status, amenities, the street address, GPS, the town, canton and entity, every photo, and whether the seller is a private person or a business account.

Don't use it when: the property is in Serbia or Croatia rather than Bosnia and Herzegovina — use halooglasi-property-scraper or njuskalo-property-scraper instead.

How to call it: set `propertyType` to `apartments`, `houses`, `land`, `commercial`, `short-term`, `holiday-homes`, `garages`, `warehouses`, `prefab`, `rooms`, `other` or `all`, `listingType` to `sell`, `rent` or `any`, and `region` to a canton or region slug such as `kanton-sarajevo`, `banja-luka`, `tuzlanski` or `hercegovacko-neretvanski` (or `all`). Narrow with `cities` (town names like Mostar, Banja Luka or Ilidža), `sellerType` (`private` or `business`), `searchQuery` (a keyword), `minPrice`/`maxPrice` in KM and `minArea`/`maxArea` in m². `sortBy` is `newest`, `price-asc` or `price-desc`.

Start with this input:
{
  "operation": "search",
  "propertyType": "apartments",
  "listingType": "sell",
  "region": "kanton-sarajevo",
  "sellerType": "all",
  "sortBy": "newest",
  "maxResults": 50
}

Ask me which canton or towns to cover, sale or rent, the property type and a price range in KM, and whether they want private sellers only, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *Pull apartments for sale in Sarajevo under 300,000 KM and rank municipalities by median price per m².*
- *List private-seller houses for sale around Banja Luka with land-registry status and GPS on each row.*
- *Compare nightly rates of short-term apartments in Sarajevo and Mostar.*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/olx-ba-property-scraper.md](https://apify.com/sian.agency/olx-ba-property-scraper.md).

### 📋 Overview

**olx.ba, now branded PIK.ba, is the largest classifieds site in Bosnia and Herzegovina.** Most of the country's property is advertised in its Nekretnine section. About 15,500 adverts are live at any time: apartments, houses, land, offices and shops, holiday homes, garages and per-night apartments. This actor turns any search on it into clean rows.

**What you get:**

- ✅ **No login, no API key, no proxy to set up.** Pick a property type and a canton and press Start.
- ⚡ **Every advert opened for its details**, so area, rooms, floor, heating and the address are columns, not text to parse.
- 🎯 **Private sellers or businesses, your choice.** The site's own seller filter is applied, so a private-only run bills only private adverts.
- 💰 **$1.50 per 1,000 adverts** at the Bronze tier, plus a $0.005 run start.
- 💎 **Prices in KM with EUR beside them** at the fixed 1.95583 rate, plus price per m² on sales.
- ✨ **NEW**: towns by name in Latin or Cyrillic, so Banja Luka and Бања Лука both work.

### ✨ Features

- 🏢 **Eleven property sections**: apartments, houses, land, offices and shops, short-term apartments, holiday homes, garages, warehouses, prefab buildings, rooms and other property, or all of them.
- 🗺️ **All 17 cantons and regions**: the ten Federation cantons, the six Republika Srpska regions and Brčko District.
- 🏙️ **Town filter by name**: Mostar, Tuzla, Ilidža. Sarajevo selects all four city municipalities.
- 🙋 **Seller filter**: private sellers only, agencies and business accounts only, or both.
- 🔤 **Keyword search** in the local language, such as garsonjera or novogradnja.
- 💵 **Price range in KM and area range in m²**, applied by the site within each section.
- 🧾 **Structured facts**: rooms, bathrooms, floor, storeys, heating, condition, furnishing, year built, facing and land-registry status.
- ✨ **Amenities list** (lift, parking, balcony, air conditioning) plus every attribute the seller filled in.
- 🌐 **GPS, town, canton and entity** on every advert, and the street address where the seller gave one.
- 🖼️ **Every photo** plus a thumbnail for the dataset view.

### 🎬 Quick Start

Open the actor and press Start: apartments for sale in Kanton Sarajevo are already selected. Change the section, canton or towns first if you want something else. Results land in a dataset you can download as JSON, CSV or Excel.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~olx-ba-property-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"propertyType":"apartments","listingType":"sell","region":"kanton-sarajevo","maxResults":50}'
```

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose what to search

A property section, then for sale or for rent.

#### Step 2: Choose where

Pick a canton or region, or type towns. Add a price range, an area range, a keyword or private sellers only.

#### Step 3: Press Start

Raise Max listings if you want more than the first 50.

**In a minute or two you will have:**

- Adverts with price, area, rooms and floor as columns
- GPS coordinates, town and canton for every advert
- A seller type on every row, so you can split private sellers from agencies

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `propertyType` | string | No | `apartments`, `houses`, `land`, `commercial`, `short-term`, `holiday-homes`, `garages`, `warehouses`, `prefab`, `rooms`, `other` or `all`. Defaults to `apartments` |
| `listingType` | string | No | `sell`, `rent` or `any`. Defaults to `sell`. Ignored for short-term apartments |
| `region` | string | No | Canton or region slug such as `kanton-sarajevo`, `banja-luka`, `tuzlanski`, or `all`. Defaults to `kanton-sarajevo` |
| `cities` | array | No | Town names, for example Mostar or Ilidža. Replaces the canton |
| `sellerType` | string | No | `all`, `private` or `business` |
| `searchQuery` | string | No | A word the advert must contain |
| `minPrice` / `maxPrice` | integer | No | Price range in KM (monthly for rent) |
| `minArea` / `maxArea` | integer | No | Area range in m² |
| `sortBy` | string | No | `newest`, `price-asc` or `price-desc` |
| `maxResults` | integer | No | Stop after this many adverts. Defaults to 50 |

**Example: private-seller apartments for sale in Sarajevo under 300,000 KM**

```json
{
  "propertyType": "apartments",
  "listingType": "sell",
  "region": "kanton-sarajevo",
  "sellerType": "private",
  "maxPrice": 300000,
  "maxResults": 100
}
```

**Example: rentals in two towns**

```json
{
  "propertyType": "apartments",
  "listingType": "rent",
  "cities": ["Banja Luka", "Mostar"],
  "maxResults": 100
}
```

### 📤 Output

Each advert is one row with **50 fields**. The most useful ones:

| Field | Type | Description |
|-------|------|-------------|
| `propertyTitle` | string | The advert title |
| `price` | number | Price in KM; empty when the price is on request |
| `priceText` | string | The price as the site shows it, for example 289.000 KM or Na upit |
| `priceEur` | number | Price in EUR at the fixed 1.95583 rate |
| `pricePerSqm` | number | KM per m², on sales |
| `listingType` | string | `sale`, `rent` or `short-term` |
| `areaSqm` | number | Area in m² |
| `rooms` / `roomsText` | number / string | Rooms as a number, and the site's wording (Dvosoban (2), Garsonjera) |
| `floor` | string | Floor, for example 8 or Prizemlje |
| `heating` | string | Heating type |
| `landRegistered` | boolean | Registered in the land registry (uknjiženo / ZK) |
| `address` | string | Street address, where the seller gave one |
| `city` / `canton` / `entity` | string | Town, canton or region, and FBiH, RS or Brčko District |
| `latitude` / `longitude` | number | GPS coordinates |
| `sellerType` | string | `private` or `business` |
| `amenities` | array | Amenities ticked on the advert |
| `attributes` | object | Every attribute the seller filled in, by its site name |

**Example row:**

```json
{
  "listingId": 76866397,
  "url": "https://olx.ba/artikal/76866397",
  "propertyTitle": "Ilidža strogi centar sa pogledom na rijeku i zeleni pojas",
  "price": 1500,
  "priceText": "1.500 KM",
  "priceEur": 766.94,
  "listingType": "rent",
  "category": "Stanovi i apartmani",
  "propertySubtype": "Stan",
  "areaSqm": 76,
  "rooms": 3,
  "roomsText": "Trosoban (3)",
  "bathrooms": "1",
  "floor": "1",
  "condition": "Renoviran",
  "heating": "Centralno (gradsko)",
  "furnishing": "Namješten",
  "yearBuilt": "1990 do 1999",
  "orientation": "Sjeveroistok",
  "landRegistered": true,
  "amenities": ["Balkon", "Internet", "Kablovska TV", "Klima", "Video nadzor"],
  "address": "Ibrahima ljubovića",
  "city": "Ilidža",
  "canton": "Kanton Sarajevo",
  "entity": "Federacija BiH",
  "latitude": 43.8319819,
  "longitude": 18.3040207,
  "sellerType": "private",
  "photoCount": 25,
  "renewedAt": "2026-10-03T15:24:28.000Z"
}
```

### 💼 Use Cases & Examples

#### 1. Private-seller leads for agencies

**Agencies looking for listings to win set Seller to Private sellers only.**

**Input:** a canton or towns, Private sellers only
**Output:** owner-posted adverts with town, address, price and photos
**Use:** about half of olx.ba's property adverts are private, and the advert link is where you make contact.

#### 2. Asking-price tracking

**Analysts run the same canton every week and compare.**

**Input:** a section, a canton, Newest
**Output:** price in KM and EUR, price per m², area and rooms
**Use:** price movement becomes a subtraction between two exports, not a parsing job.

#### 3. Rental yield for investors

**Investors run a town once for sale and once for rent.**

**Input:** the same town and section, sell then rent
**Output:** both halves of a yield calculation on the same fields
**Use:** compare monthly rent with asking price per m² in Sarajevo, Banja Luka or Tuzla.

#### 4. Short-term rental supply

**Hosts and tourism analysts track the Stan na dan section.**

**Input:** Short-term apartments, a canton
**Output:** nightly price, beds, check-in time, town and GPS from the advert attributes
**Use:** see how many per-night apartments compete in a neighbourhood and at what rate.

#### 5. Mapping and location analysis

**GIS teams load the rows straight into a map.**

**Input:** any section, All of Bosnia and Herzegovina
**Output:** GPS, town, canton and entity on every row
**Use:** heat-map asking prices or supply by municipality.

#### 6. Due diligence screening

**Buyers' advisers filter adverts before calling.**

**Input:** a section and a price range
**Output:** land-registry status, condition, year built and the agency's brokerage-contract number in the site's own wording
**Use:** drop adverts that are not in the land registry before anyone spends time on them.

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/olx-ba-property-scraper').call({
  propertyType: 'apartments',
  listingType: 'sell',
  region: 'kanton-sarajevo',
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/olx-ba-property-scraper').call(
    run_input={'propertyType': 'houses', 'listingType': 'sell', 'cities': ['Banja Luka'], 'maxResults': 100}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['propertyTitle'], item.get('price'), item.get('areaSqm'))
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~olx-ba-property-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"propertyType":"apartments","listingType":"rent","cities":["Mostar"],"maxResults":50}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: a weekly schedule
2. **HTTP Request**: start the actor with your saved input
3. **Process**: read the dataset items as JSON
4. **Action**: append new adverts to a sheet, or alert on price drops

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 adverts** per run with every field
- No credit card required
- Enough to check the data before you scale up

#### PAID Tier (Production Ready)

- **No row cap** per run
- Pay per advert returned, at $1.50 per 1,000 on Bronze and less on higher plans
- A search that matches nothing is not billed for rows

Each advert takes about one second, so 1,000 adverts take around 15 to 20 minutes.

🔗 [View current pricing](https://apify.com/sian.agency/olx-ba-property-scraper?fpr=sian)

### ❓ Frequently Asked Questions

**Q: Do I need an olx.ba account, an API key or a proxy?**
A: No. Pick a property type and a canton and press Start. There is no proxy setting and no separate bill.

**Q: Is this the same site as PIK.ba?**
A: Yes. olx.ba now runs under the PIK.ba brand, and pik.ba forwards to olx.ba. Same adverts, same advert numbers.

**Q: Why is there no phone number?**
A: olx.ba shows the phone only after a click, and it is personal data. The row carries the seller's public username, seller ID and profile link, plus the advert link, which is where a buyer makes contact.

**Q: What currency are prices in?**
A: Convertible marks (KM, BAM), as the site shows them. Price (EUR) uses the fixed currency-board rate of 1.95583 KM per euro, so it never drifts. Adverts with the price on request have no number and are flagged.

**Q: Can I search one town?**
A: Yes. Type it in Towns, for example Mostar or Banja Luka. Sarajevo covers all four city municipalities; type Ilidža or Vogošća for those separately. Names work with or without accents, and in Cyrillic.

**Q: Why does a price-ordered search return fewer adverts?**
A: olx.ba leaves adverts with the price on request out of searches ordered by price. Use Newest to see every advert.

**Q: How is sale or rent decided?**
A: From the advert's own "Vrsta oglasa" field, which is what the site's filter uses. Short-term apartments are always per-night lets and are labelled short-term.

**Q: What output formats are available?**
A: JSON, CSV, Excel, XML and HTML from the Apify dataset, or straight from the API.

### 🐛 Troubleshooting

**The run stopped with "is not a town olx.ba lists"**

- Type the town the way olx.ba lists it: Mostar, Banja Luka, Tuzla, Ilidža
- Or leave Towns empty and pick the canton instead

**No adverts match**

- Widen the price or area range, or clear the keyword
- Pick a wider canton, or All of Bosnia and Herzegovina

**All property with a sale/rent or area filter is slow**

- With All property each advert is checked after it is opened, and the ones that do not match are skipped without a charge
- Pick a single section to have the site apply the filter directly

**Fewer adverts than the site shows**

- A price-ordered search leaves out adverts with the price on request; use Newest

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

OLX.ba and PIK.ba are trademarks of their respective owners (Pik d.o.o.). This actor is not affiliated with, endorsed by, or sponsored by OLX.ba, PIK.ba, Pik d.o.o. or OLX Group.

### 🤝 Support

**Join our active support community**

- For issues or questions, open an issue on the actor's Issues tab
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Changelog

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

# Actor input Schema

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

One operation: Property Listing. It reads olx.ba's property search, 40 adverts per page, and opens each advert for its full details: area, rooms, floor, heating, condition, address, land-registry status, amenities and the description.

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

The olx.ba property section to read. Each one is the site's own category, so the counts match what a visitor sees. Short-term apartments are priced per night.

## `listingType` (type: `string`):

Which side of the market to read. Rent prices are monthly. Short-term apartments are always per-night lets, so this setting is ignored for them and the log says so.

## `region` (type: `string`):

The ten Federation cantons, the six Republika Srpska regions and Brčko District, as olx.ba groups them. Leave on All of Bosnia and Herzegovina to search the whole country.

## `cities` (type: `array`):

Optional. Town or municipality names as olx.ba lists them, for example Mostar, Banja Luka, Tuzla or Ilidža. Sarajevo selects all of the city's municipalities (Centar, Novi Grad, Novo Sarajevo, Stari Grad). Accents are optional and Cyrillic works, so Ilidza and Бања Лука are fine. Towns replace the canton setting; an unknown name stops the run before anything is charged.

## `sellerType` (type: `string`):

olx.ba marks each advert as posted by a private user or by a business account (agencies, developers, PIK shops). The filter is applied by the site, so you are only billed for the kind you ask for. About half of the property adverts are private.

## `searchQuery` (type: `string`):

Optional. A word the advert must contain, in the local language, for example garsonjera, novogradnja, Grbavica or pogled. Leave empty to read the whole section.

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

Lowest price in convertible marks (KM, BAM). 1 EUR is fixed at 1.95583 KM. For rent this is the monthly rent. Adverts with the price on request are left out when a price range is set.

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

Highest price in KM. Leave empty for no ceiling.

## `minArea` (type: `integer`):

Smallest area in square metres. The site applies it within one property type; with All property the actor checks each advert's area itself and skips the rest without billing them.

## `maxArea` (type: `integer`):

Largest area in square metres. Leave empty for no maximum.

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

Order of the results. olx.ba leaves adverts with the price on request out of a price-ordered search, so use Newest to see every advert.

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

Stop after this many adverts. Each search page holds 40 and every advert is opened for its details, so 1,000 adverts take 15 to 20 minutes. Free-plan runs are capped lower and the log says so.

## Actor input object example

```json
{
  "operation": "search",
  "propertyType": "apartments",
  "listingType": "sell",
  "region": "kanton-sarajevo",
  "sellerType": "all",
  "sortBy": "newest",
  "maxResults": 50
}
```

# Actor output Schema

## `olxBaListings` (type: `string`):

Every listing this run returned.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics

# 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 = {
    "operation": "search",
    "propertyType": "apartments",
    "listingType": "sell",
    "region": "kanton-sarajevo",
    "sellerType": "all",
    "sortBy": "newest",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/olx-ba-property-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 = {
    "operation": "search",
    "propertyType": "apartments",
    "listingType": "sell",
    "region": "kanton-sarajevo",
    "sellerType": "all",
    "sortBy": "newest",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/olx-ba-property-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 '{
  "operation": "search",
  "propertyType": "apartments",
  "listingType": "sell",
  "region": "kanton-sarajevo",
  "sellerType": "all",
  "sortBy": "newest",
  "maxResults": 50
}' |
apify call sian.agency/olx-ba-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/olx-ba-property-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/MPZU7tge6qxPaEsNL/builds/h6Ci11cguStfoDBdG/openapi.json
