# Njuskalo Listing Extractor (`kawsar/njuskalo-listing-extractor`) Actor

Scrape listings, prices, and images from Njuskalo.hr without getting blocked. Extract cars, apartments, and jobs into structured CSV or JSON files to track market trends and monitor classified ads in real time.

- **URL**: https://apify.com/kawsar/njuskalo-listing-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Real estate, Jobs, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Njuskalo Listing Extractor

A premium, production grade classified ads scraper built specifically for Croatia's largest online marketplace, **Njuskalo.hr**. This actor extracts and structures publicly available listing data from search results and category pages in real time, delivering clean datasets for automobiles, real estate, electronics, jobs, and more.

Equipped with a built-in smart network routing layer and autonomous browser simulation, this extractor automatically handles geo-blocking, anti-bot protections, and rate limits. This means you do not need to purchase, configure, or manage your own proxy subscriptions.

---

### Key Features

- **Multi URL Category Queuing**: Scrape multiple search results or category listing URLs in a single run.
- **High Speed Extraction**: Bypasses deep detail page fetches, scanning search results cards directly. This results in up to 10 times faster crawling speeds and significantly reduced execution costs.
- **Built-In Smart Proxies**: Seamlessly routes requests through localized connections to bypass Croatia-only geo-restrictions and anti-bot systems.
- **Adaptive Pagination**: Intelligent page detection automatically clicks through results until your specified limit is met or there are no more listings.
- **Pristine Data Cleanups**: Automatically removes empty or null values (including location, descriptions, and badges) to deliver a perfectly compact, ready to analyze dataset.
- **Per URL Limit Control**: Set custom maximum limits per category link, giving you precise control over your budget and data volume.

---

### Use Cases

- **Automotive Market Analysis**: Monitor listings in the vehicle category to analyze price trends, age distribution, and popularity across brands.
- **Real Estate Monitoring**: Track apartments, houses, and commercial property prices across Zagreb and other Croatian regions to spot high-yield investment opportunities.
- **Competitor Intelligence**: Keep continuous track of newly posted ads in your business niche and get immediate market supply updates.
- **Lead Generation**: Scan jobs, services, and local trade listings to discover active service providers and business entities.

---

### Extracted Data Fields

The extractor collects all key listing parameters displayed on the search result cards. To maintain maximum data efficiency, optional fields that are not present or populated on a specific listing are completely removed from the output record.

The following fields are extracted and structured:

| Output Field | Type | Description |
| :--- | :--- | :--- |
| `listingId` | string | Unique classified ad identifier on Njuskalo. |
| `listingTitle` | string | Full public title of the classified ad. |
| `price` | string | Displayed price string including currency formatting. |
| `currency` | string | Normalized currency code (such as EUR or HRK). |
| `location` | string | Listed city, neighborhood, or region (removed if empty). |
| `postedDate` | string | Raw timestamp or text indicating when the listing was posted or bumped. |
| `url` | string | Permanent direct link to the listing. |
| `thumbnailUrl` | string | URL of the primary listing image. |
| `category` | string | Direct category or breadcrumb path (removed if empty). |
| `badges` | array | Promoted tags like "Top", "Istaknuto", or "Provjereno" (removed if empty). |
| `scrapedAt` | string | ISO timestamp of when the record was processed. |

#### Sample Output Record

```json
{
  "listingId": "41526374",
  "listingTitle": "Audi A4 Avant 2.0 TDI, S-line, 2019. g, izvrsno stanje",
  "price": "21.400 €",
  "currency": "EUR",
  "location": "Grad Zagreb, Črnomerec",
  "postedDate": "2026-06-02T15:30:00Z",
  "url": "https://www.njuskalo.hr/auti/audi-a4-avant-2.0-tdi-oglas-41526374",
  "thumbnailUrl": "https://img.njuskalo.hr/image-w920x690/auti/audi-a4-avant-2.0-tdi-slika-12345.jpg",
  "category": "Osobni automobili",
  "badges": [
    "Istaknuti oglas",
    "Provjereno"
  ],
  "scrapedAt": "2026-06-03T15:00:24.123Z"
}
````

***

### Input Configuration

To run the extractor, provide your desired search or category links from Njuskalo.hr.

#### Configuration Properties

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `startUrls` | array | **Required** | One or more Njuskalo.hr category, search, or filtered result page URLs. |
| `maxItems` | integer | `25` | Maximum number of listings to extract per start URL. |
| `requestTimeoutSecs` | integer | `30` | Network request timeout in seconds. Increase for slow connections. |

#### Sample Input JSON

```json
{
  "startUrls": [
    "https://www.njuskalo.hr/auti/abarth",
    "https://www.njuskalo.hr/iznajmljivanje-stanova/zagreb"
  ],
  "maxItems": 50,
  "requestTimeoutSecs": 30
}
```

***

### How It Works Under the Hood

1. **URL Validation**: The actor parses and normalizes each input link, validating that they belong to the `njuskalo.hr` domain and filtering out invalid links.
2. **Croatian Traffic Routing**: It sends GET requests to pages using a built-in proxy layer that routes connections through Croatian IP addresses, completely bypassing geo-fencing.
3. **Card Detection**: It reads the page HTML and parses classified cards (regular, promoted, and featured listings).
4. **Data Compaction**: Any of the optional fields (such as category, location, or badges) that are null, empty, or empty lists are stripped out of the listing object before pushing.
5. **Page Navigation**: The extractor checks the pagination container for active next-page elements. If more listings are available and the per-URL limit is not reached, it constructs the next page URL (by appending `?page=X`) and continues.
6. **Dataset Storage**: Records are saved immediately to your default Apify dataset during the run.

***

### FAQ and Troubleshooting

##### Why does the scraper require specialized connection routing?

Njuskalo.hr uses strict geo-blocking. Requests from outside Croatia, or from generic data centers, are blocked or presented with impossible CAPTCHAs. This actor has localized connection routing built directly into its core, allowing it to crawl the marketplace smoothly without requiring any custom proxy setup from you.

##### Is there a limit on how many items can be extracted?

You can scrape hundreds of items in a single run. However, we recommend setting a reasonable limit (like 25 to 100 items per URL) to ensure your runs remain fast, cost-effective, and safe from site changes.

##### Can this actor extract seller telephone numbers?

No. Njuskalo hides telephone numbers behind dynamic buttons that require a verified user login and manual browser interaction. To protect your privacy and ensure compliance, this actor only extracts public, search-level classified ad data.

##### What should I do if a run returns fewer items than maxItems?

This occurs if the search or category you entered has fewer total listings available than your limit, or if you have reached the end of the available pages. The actor will log a message and cleanly exit when no further pages are found.

# Actor input Schema

## `startUrls` (type: `array`):

One or more Njuskalo.hr category, search, or filter result page URLs to scrape listings from. Paste a search results URL after applying your filters on njuskalo.hr.

## `maxItems` (type: `integer`):

Maximum number of listings to process per start URL.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds. Increase if you experience timeouts on slow connections.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.njuskalo.hr/nekretnine"
  ],
  "maxItems": 25,
  "requestTimeoutSecs": 30
}
```

# 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 = {
    "startUrls": [
        "https://www.njuskalo.hr/auti"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/njuskalo-listing-extractor").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 = { "startUrls": ["https://www.njuskalo.hr/auti"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/njuskalo-listing-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.njuskalo.hr/auti"
  ]
}' |
apify call kawsar/njuskalo-listing-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=kawsar/njuskalo-listing-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Njuskalo Listing Extractor",
        "description": "Scrape listings, prices, and images from Njuskalo.hr without getting blocked. Extract cars, apartments, and jobs into structured CSV or JSON files to track market trends and monitor classified ads in real time.",
        "version": "0.0",
        "x-build-id": "djeghgvAiSIe2EfLp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~njuskalo-listing-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-njuskalo-listing-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/kawsar~njuskalo-listing-extractor/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-njuskalo-listing-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/kawsar~njuskalo-listing-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-njuskalo-listing-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Njuskalo search or category URLs",
                        "type": "array",
                        "description": "One or more Njuskalo.hr category, search, or filter result page URLs to scrape listings from. Paste a search results URL after applying your filters on njuskalo.hr.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max items per URL",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of listings to process per start URL.",
                        "default": 25
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Per-request timeout in seconds. Increase if you experience timeouts on slow connections.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
