# Polovni Automobili Car Scraper (`bovi/polovniautomobili-scraper`) Actor

Collect public used-car listings from polovniautomobili.com with vehicle details, price, mileage, seller, location and available photos.

- **URL**: https://apify.com/bovi/polovniautomobili-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 polovni automobili car scrapers

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

<div align="center">

## Polovni Automobili Car Scraper

Collect public used-car listings from <code>polovniautomobili.com</code>.

</div>

This Actor opens the public search page in the supplied browser runtime and reads the listing data rendered by the site. It follows the search page pagination links until it reaches <code>maxResults</code> unique cars or the final page. It does not sign in or open individual detail pages.

### Collected data

Each dataset row can include the listing ID and URL, title, make, model, year, price and currency, mileage, fuel, transmission, engine power, engine size, body type, city, seller details, image URLs, listing status, and the last update time. Optional fields are included only when the search result contains them. The output keeps the values published by the marketplace; EUR and RSD currency labels are normalized.

### Input

<ul>
<li><code>searchUrl</code> — optional HTTPS search or results URL on Polovni Automobili. An empty value uses the public car search page.</li>
<li><code>maxResults</code> — maximum unique rows to save; defaults to 50 and is capped at 1,000.</li>
<li><code>proxyConfiguration</code> — optional Apify Proxy input. The form defaults to the RESIDENTIAL group; set <code>useApifyProxy</code> to false to browse without a proxy.</li>
</ul>

Example input:

<pre><code>{
  "searchUrl": "https://www.polovniautomobili.com/auto-oglasi/pretraga?brand=BMW&amp;model[]=X6",
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}</code></pre>

### Example output

<pre><code>{
  "listing_id": "30433741",
  "listing_url": "https://www.polovniautomobili.com/auto-oglasi/30433741/bmw-x6-m50d-xdrive-moze-zamena",
  "title": "BMW X6 M50d xDrive (može zamena)",
  "make": "BMW",
  "model": "X6",
  "year": 2020,
  "price": 54990,
  "currency": "EUR",
  "mileage_km": 113589,
  "fuel_type": "Dizel",
  "transmission": "Automatski / poluautomatski",
  "engine_power_hp": 400,
  "engine_size_cc": 2993,
  "location": "Beograd"
}</code></pre>

### Pricing

The reference champion lists a price of <strong>$0.002 per result</strong> at its free tier. Apify bills dataset items automatically as they are saved; this Actor does not trigger a separate per-item charge event. Check the Store listing for the current price available to your account.

The Actor uses a browser-rendered page and captures public JSON responses when available, then falls back to embedded page data and structured listing markup. Search results can omit some optional fields, so those keys are absent from rows where the site did not provide a value.

# Actor input Schema

## `searchUrl` (type: `string`):

HTTPS search or results URL from polovniautomobili.com. Leave empty to use the public car search page.

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

Maximum number of unique car listings to save.

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

Optional Apify Proxy settings. Disable useApifyProxy to browse without a proxy.

## Actor input object example

```json
{
  "searchUrl": "https://www.polovniautomobili.com/auto-oglasi/pretraga",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All saved car listings as JSON.

## `datasetItemsCsv` (type: `string`):

The dataset exported as CSV.

## `datasetView` (type: `string`):

Open the run dataset in Apify Console.

# 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 = {
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/polovniautomobili-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 = {
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/polovniautomobili-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 '{
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/polovniautomobili-scraper --silent --output-dataset

```

## MCP server setup

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