# KupujemProdajem Listings Scraper (`bovi/kupujemprodajem-scraper`) Actor

Collects public KupujemProdajem listing cards with titles, displayed prices, locations, listing attributes, view counts, publish-time labels, and image URLs.

- **URL**: https://apify.com/bovi/kupujemprodajem-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 86.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.50 / 1,000 kupujemprodajem listings 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

## KupujemProdajem Listings Scraper

This Actor collects public listing cards from KupujemProdajem, a Serbian classifieds marketplace. It reads result pages and follows their next-page links until it reaches the requested result limit. It does not sign in or request private contact details.

### What it collects

Each dataset record includes the listing ID, title, listing URL, displayed price, a parsed numeric price and currency when available, location, visible attribute chips, view count, the published-time label, image URLs, and the time the record was collected. Fields such as seller identity, phone number, and full description are not emitted because they are not present on the listing cards parsed by this Actor.

### Input

Provide a public KupujemProdajem results URL in startUrl. Category result URLs ending in /najnoviji and public search-results URLs are supported. The prefilled URL is a current automobile category result page. Set maxResults to cap the total number of unique records across pages; the default is 50. proxyConfiguration is optional. If omitted, or if useApifyProxy is false, the Actor sends requests directly to KupujemProdajem.

### Example output

```json
{
  "id": "195998180",
  "title": "Fiat Punto 1.2",
  "url": "https://www.kupujemprodajem.com/automobili/fiat/fiat-punto-1-2/oglas/195998180?filterId=8812356859",
  "price": "500 €",
  "price_amount": 500,
  "currency": "EUR",
  "location": "Pančevo",
  "attributes": ["2010.", "260.000 km", "Benzin + Gas"],
  "view_count": 223,
  "posted_text": "danas"
}
```

### Price per result

Each emitted record is one Apify dataset item. The platform applies the dataset-item rate shown for your Apify account; this Actor does not add a separate charge event.

### Usage

1. Enter a KupujemProdajem listing-results URL.
2. Choose maxResults.
3. Optionally enable an Apify proxy in proxyConfiguration.
4. Start the Actor and review the output dataset.

# Actor input Schema

## `startUrl` (type: `string`):

A public KupujemProdajem results URL. Use a category URL ending in /najnoviji or a search-results URL.

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

Maximum number of unique listing records to collect across result pages.

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

Optional Apify proxy settings. With no proxy or useApifyProxy=false, requests go directly to KupujemProdajem.

## Actor input object example

```json
{
  "startUrl": "https://www.kupujemprodajem.com/automobili/kategorija/2919/najnoviji?categoryId=2919",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with the scraped records.

# 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 = {
    "startUrl": "https://www.kupujemprodajem.com/automobili/kategorija/2919/najnoviji?categoryId=2919",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/kupujemprodajem-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 = {
    "startUrl": "https://www.kupujemprodajem.com/automobili/kategorija/2919/najnoviji?categoryId=2919",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/kupujemprodajem-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 '{
  "startUrl": "https://www.kupujemprodajem.com/automobili/kategorija/2919/najnoviji?categoryId=2919",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/kupujemprodajem-scraper --silent --output-dataset

```

## MCP server setup

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