# Njuskalo.hr Search All categories and details Scraper (`memo23/njuskalo-scraper`) Actor

Structured Njuskalo.hr marketplace data: listing identity, chronology, commercial terms, canonical URLs, classification, location, narrative and attribute specifications, merchant profile, contact channels, resolution-variant imagery, listing analytics, supplementary metadata, and audit provenance

- **URL**: https://apify.com/memo23/njuskalo-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Real estate, Automation, Lead generation
- **Stats:** 5 total users, 3 monthly users, 92.3% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.69 / 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.

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.hr Scraper

**Unlock the Full Power of Njuskalo.hr Marketplace Data** - Each exported row mirrors the dataset shape documented below: core listing fields (id, title, dates, price, URLs, category), list previews (abstracts, badges, thumbnails), meta and map location, full description, category-specific `details`, seller and contact, image galleries, stats, optional `rawDetail`, plus `sourceUrl`, `searchUrl`, `detailUrl`, and `scrapedAt`. JSON or CSV.

*"Paste a Njuskalo URL; get the same rich field set you see in the output sample and field reference."*

### Overview

The Njuskalo.hr Scraper extracts listings and listing details from Njuskalo.hr using the site's mobile API flow. It supports category pages, filtered result URLs, `/search/` URLs, and direct listing links. The actor resolves the web URL, follows the correct mobile API endpoint, paginates through results, and optionally enriches every listing with full detail data.

### What does Njuskalo.hr Scraper do?

The Njuskalo.hr Scraper is a powerful tool that enables you to:

#### Comprehensive Data Collection
- **Listing Data**
  - Extract listing titles, prices, metadata, category info, and seller flags
  - Capture preview fields from result pages such as search abstracts, badges, and image thumbnails
  - Fetch full listing descriptions, seller contact info, detailed attributes, and media galleries
  - Preserve the original Njuskalo web URL together with the resolved API detail URL
  - Collect category-specific detail fields for vehicles, real estate, and other listing types
- **Seller and Listing Context**
  - Gather seller/store information, verification flags, and profile URLs
  - Capture phone numbers, message endpoints, statistics, and raw detail metadata
  - Track the search URL or source URL that produced each listing in the dataset

#### Advanced Scraping Capabilities
- **Pagination Handling**: Automatically follows list and search pagination until `maxItems` is reached
- **Direct Link Support**: Scrapes single `...-oglas-{id}` listing URLs without first going through result pages
- **Automatic URL Resolution**: Uses the mobile deep-link resolver to map web URLs to the correct API flow
- **Scheduled Monitoring**: Re-run the actor in monitoring mode to save only newly seen listings
- **Incremental Data Collection**: Build historical datasets over time while avoiding duplicates

#### Flexible Scraping Options
- **Category Pages**: Scrape standard category URLs
  - Example: `https://www.njuskalo.hr/prodaja-stanova`
- **Filtered Category Pages**: Use Njuskalo filters directly in the browser URL
  - Example: `https://www.njuskalo.hr/prodaja-kuca/zadarska`
- **Search Pages**: Scrape `/search/` URLs with keywords and sorting
  - Example: `https://www.njuskalo.hr/search/?keywords=suv&categoryId=7&sort=expensive`
- **Direct Listing Pages**: Scrape one listing directly
  - Example: `https://www.njuskalo.hr/nekretnine/kuca-tri-stana-prostranom-okucnicom-1233m2-centar-vir-oglas-49966243`

This tool is ideal for:
- Real estate research and monitoring
- Vehicle market tracking and pricing analysis
- Marketplace trend analysis across Njuskalo categories
- Lead generation and seller discovery
- Building listing databases for BI, alerts, or custom integrations

### Features

- **Comprehensive Data Extraction**: Result-page data plus optional full listing details
- **Multiple URL Modes**:
  - **Category and filter URLs**: Scrape listings from category pages and filtered category pages
  - **Search URLs**: Scrape `/search/` result pages with keyword/filter combinations
  - **Direct listing URLs**: Scrape one listing directly from its Njuskalo page
- **Flexible Input**: Supports multiple Njuskalo URL formats in one run
- **Automatic Pagination**: Handles both `page-ad-list` and `ad-search` pagination flows
- **Efficient Processing**: Concurrent scraping with configurable concurrency settings
- **Reliable Performance**: Built-in retries, session handling, and proxy support
- **Structured Data Export**: Download the results in JSON or CSV for further analysis

### How to Use

#### Scraping Njuskalo Listings
To scrape Njuskalo listings:
1. **Set Up**: Ensure you have an Apify account and access to the Apify platform.
2. **Configure Input**: Paste one or more Njuskalo URLs from your browser:
   - `https://www.njuskalo.hr/prodaja-stanova`
   - `https://www.njuskalo.hr/search/?keywords=suv&categoryId=7&sort=expensive`
   - `https://www.njuskalo.hr/nekretnine/kuca-tri-stana-prostranom-okucnicom-1233m2-centar-vir-oglas-49966243`
3. **Adjust Settings**: Configure options like max items, monitoring mode, details, concurrency, retries, and proxy settings as needed.
4. **Run the Scraper**: Execute the scraper on the Apify platform.
5. **Data Collection**: The scraper will output structured Njuskalo listing data in JSON/CSV.

### Input Configuration

Here's an example of how to set up the input for the Njuskalo.hr Scraper:

```json
{
  "startUrls": [
    "https://www.njuskalo.hr/prodaja-stanova",
    "https://www.njuskalo.hr/search/?keywords=suv&categoryId=7&sort=expensive",
    "https://www.njuskalo.hr/nekretnine/kuca-tri-stana-prostranom-okucnicom-1233m2-centar-vir-oglas-49966243"
  ],
  "maxItems": 1000,
  "monitoringMode": false,
  "maxConcurrency": 4,
  "minConcurrency": 1,
  "maxRequestRetries": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
````

#### Input Fields Explanation

- `startUrls`: Array of Njuskalo URLs to scrape. Supported inputs include category pages, filtered pages, `/search/` pages, and direct listing URLs. Category resolution normally comes from Njuskalo’s mobile-links response; if you ever hit a resolution error, append `rootCategoryId` as a query parameter on that start URL (for example `...&rootCategoryId=9580`).
- `maxItems`: Maximum number of listings to process in a single run.
- `monitoringMode`: When `true`, only listings not seen in earlier runs for the same user are stored (list/search flows and direct listing start URLs).
- `maxConcurrency`: Maximum number of requests processed simultaneously. A lower value reduces load on Njuskalo and can help with transient errors.
- `minConcurrency`: Minimum number of concurrent requests.
- `maxRequestRetries`: Number of retries for failed requests before the actor gives up.
- `proxy`: Proxy settings used by the scraper. Residential proxies are recommended for reliability.

### Monitoring Mode

When `monitoringMode` is enabled, the scraper will only collect listings that have not been seen in previous runs. This is useful for:

- Tracking newly published listings
- Building a historical archive of Njuskalo inventory
- Monitoring specific searches/categories without saving duplicates

#### How Monitoring Mode Works

1. The scraper stores previously seen listing IDs per user.
2. On later runs with `monitoringMode: true`, it checks each listing against that stored state.
3. Only new listing IDs are processed and pushed to the dataset.
4. The internal state is updated with the newly seen IDs for the next run.

Direct listing URLs in `startUrls` use the same per-user store: repeats are skipped without re-fetching detail.

### Output Structure

The scraper always fetches the classified detail endpoint for each processed listing, so dataset rows combine list context with full detail fields (seller/contact, media, stats, and crawl context where available). The sample below is based on the **first object currently present in `data.json`**.

#### Sample JSON Output

```json
{
  "id": "50105137",
  "title": "Mercedes-Benz G 63 AMG** FACELIFT** 605 KS** 360** LED**",
  "dateCreated": "2026-04-10T13:47:26+00:00",
  "dateFirstCreated": "2026-03-16T15:23:33+00:00",
  "expiresAt": "2038-01-07T13:27:27+00:00",
  "price": {
    "primary": "269.990 EUR",
    "label": null,
    "escrow": null
  },
  "formattedPrice": "269.990,00 EUR",
  "hidePrice": false,
  "abstracts": [
    "29000 km",
    "2024"
  ],
  "tags": [],
  "mobileUrl": "https://iapi.njuskalo.hr/auti/mercedes-benz-g-63-amg-facelift-oglas-50105137",
  "webUrl": "https://www.njuskalo.hr/auti/mercedes-benz-g-63-amg-facelift-oglas-50105137",
  "isAdOwnerResidentialSeller": false,
  "image": {
    "type": "ad-image",
    "id": "273606219",
    "relationships": {
      "originalVariation": [],
      "browseVariation": {
        "data": {
          "type": "ad-image-variation",
          "id": "image_273606219_variation_200x150"
        }
      }
    }
  },
  "imageVariations": [
    {
      "type": "ad-image-variation",
      "id": "image_273606219_variation_200x150",
      "attributes": {
        "url": "https://www.njuskalo.hr/image-200x150/auti/mercedes-benz-g-63-amg-facelift-slika-273606219.jpg"
      }
    }
  ],
  "meta": {
    "condition": "rabljeno",
    "deadline": null,
    "distance": null,
    "belongsToAuthenticatedUser": false,
    "isComparable": true,
    "itemSize": null
  },
  "category": {
    "type": "ad-category",
    "id": "7",
    "attributes": {
      "urlAlias": "rabljeni-auti",
      "title": "Rabljeni automobili"
    }
  },
  "user": {
    "type": "ad-user",
    "id": "2688348",
    "attributes": {
      "isAdOwnerResidentialSeller": false
    }
  },
  "badges": [
    {
      "type": "ad-badge",
      "id": "badge_map",
      "attributes": {
        "badgeType": "map",
        "label": "Prikazi na mapi"
      }
    }
  ],
  "searchAbstract": [
    {
      "caption": null,
      "value": "29000 km"
    },
    {
      "caption": null,
      "value": "2024"
    }
  ],
  "categoryId": 7,
  "state": "active",
  "userType": "b2c",
  "ownerId": 2688348,
  "isOnlinePaymentEnabled": false,
  "location": {
    "label": null,
    "lat": 51.063791427861,
    "lng": 10.61824551179,
    "radiusMeters": 500,
    "isApproximate": true
  },
  "description": "MERCEDES-BENZ G63 AMG** ...",
  "details": {
    "lokacija_vozila": "Njemacka",
    "marka_automobila": "Mercedes-Benz",
    "model_automobila": "G",
    "tip_automobila": "63 AMG",
    "godina_proizvodnje": "2024. godiste",
    "godina_modela": "2024.",
    "u_prometu_od": "2024.",
    "prije_eni_kilometri": "29000 km",
    "motor": "Benzin",
    "snaga_motora": "445 kW",
    "radni_obujam": "3982 cm3",
    "mjenjac": "Automatski",
    "ekoloska_kategorija_vozila": "Euro 6",
    "vlasnik": "prvi",
    "servisna_knjiga": "Da",
    "garaziran": "Da",
    "mogucnost_placanja": "gotovina\\nkredit\\nleasing",
    "sifra_oglasa": "50105137",
    "oglas_objavljen": "10.04.2026. u 15:47",
    "do_isteka_jos": "do prodaje"
  },
  "additionalDetails": {},
  "seller": {
    "name": "Luxury-Cars",
    "email": null,
    "location": "Varazdinska",
    "profileImage": "https://www.njuskalo.hr/logo-w185/Luxury-Cars-logo-2688348.jpg?quality=100",
    "additionalInfo": null,
    "isVerified": true,
    "verificationLabel": "Korisnik je verificirao broj u drzavi: Hrvatska",
    "isActive": true,
    "userType": "store",
    "storeUrl": "https://iapi.njuskalo.hr/trgovina/luxury-cars",
    "allListingsUrl": "https://iapi.njuskalo.hr/trgovina/luxury-cars"
  },
  "contact": {
    "phoneNumbers": [
      {
        "label": "099/528-2230",
        "number": "+385995282230"
      }
    ],
    "messageUrl": "https://iapi.njuskalo.hr/ccapi/v2/classified-callback-message-action/50105137"
  },
  "media": {
    "images": [
      "https://www.njuskalo.hr/image-xlsize/auti/mercedes-benz-g-63-amg-facelift-slika-273606219.jpg",
      "https://www.njuskalo.hr/image-xlsize/auti/mercedes-benz-g-63-amg-facelift-slika-273606220.jpg",
      "... more image URLs from the same first object ..."
    ],
    "imageVariants": [
      {
        "id": "273606219-xlsize",
        "href": "https://www.njuskalo.hr/image-xlsize/auti/mercedes-benz-g-63-amg-facelift-slika-273606219.jpg",
        "variant": "xlsize"
      },
      {
        "id": "273606219-small",
        "href": "https://www.njuskalo.hr/image-small/auti/mercedes-benz-g-63-amg-facelift-slika-273606219.jpg",
        "variant": "small"
      },
      "... more image variants from the same first object ..."
    ]
  },
  "stats": {
    "adCode": "50105137",
    "publishedAt": "10.04.2026. u 15:47",
    "expiresIn": "do prodaje",
    "views": null
  },
  "rawDetail": {
    "forceWeb": false,
    "categoryHierarchy": {
      "level0": 2,
      "level1": 13688,
      "level2": 7,
      "level3": 0,
      "level4": 0
    },
    "tracking": {
      "xiti": {
        "siteNumber": 563795,
        "xtn2": 1,
        "xtpage": "auti::rabljeni-auti::mercedes::oglas-50105137"
      }
    },
    "adOwnerIsResidentialSeller": false,
    "displayElementCount": 44,
    "mainTitleLabel": "Mercedes-Benz G 63 AMG** FACELIFT** 605 KS** 360** LED**"
  },
  "sourceUrl": "https://www.njuskalo.hr/auti/mercedes-benz-g-63-amg-facelift-oglas-50105137",
  "searchUrl": "https://www.njuskalo.hr/search/?keywords=suv&categoryId=7&sort=expensive",
  "detailUrl": "https://iapi.njuskalo.hr/ccapi/v2/classified-page/50105137?include=360View",
  "scrapedAt": "2026-04-13T12:38:25.358Z"
}
```

### Output Fields Explanation

This section explains **every field present in the first object of `data.json`**. Some fields are common across categories, while some nested keys inside `details` are category-specific.

#### Core Listing Fields

- `id` (String): Njuskalo classified ID.
- `title` (String): Main listing title.
- `dateCreated` (ISO 8601 String): When the current listing version was created.
- `dateFirstCreated` (ISO 8601 String): When the listing first appeared on Njuskalo.
- `expiresAt` (ISO 8601 String): Expiration timestamp returned by the API.
- `formattedPrice` (String): Human-readable formatted price.
- `hidePrice` (Boolean): Whether the seller hides the price.
- `mobileUrl` (String): Mobile-style Njuskalo URL returned by the API.
- `webUrl` (String): Standard Njuskalo web URL for the listing.
- `categoryId` (Number): Numeric category ID.
- `state` (String): Listing state, for example `active`.
- `userType` (String): Njuskalo user type, for example `b2c`.
- `ownerId` (Number): Numeric seller/owner ID.
- `isOnlinePaymentEnabled` (Boolean): Whether Njuskalo online payment is enabled for the listing.
- `description` (String): Full listing description text.
- `sourceUrl` (String): URL that led directly to this record.
- `searchUrl` (String): Search/category URL that originally produced the listing.
- `detailUrl` (String): Detail API endpoint used to fetch full listing data.
- `scrapedAt` (ISO 8601 String): Timestamp when this record was saved by the actor.

#### Price Fields

- `price` (Object): Raw price container from the API.
- `price.primary` (String): Main visible price value.
- `price.label` (String or null): Optional extra label attached to the price.
- `price.escrow` (String or null): Optional escrow/payment-related price value.

#### Result Preview Fields

- `abstracts` (Array\[String]): Flat summary values shown in listing previews.
- `abstracts[]` (String): One summary token, such as mileage or year.
- `tags` (Array): List of simple tag values from the result item.
- `tags[]` (Unknown): One tag entry when present.
- `searchAbstract` (Array\[Object]): Structured version of preview summary items.
- `searchAbstract[]` (Object): One search summary item.
- `searchAbstract[].caption` (String or null): Optional label for the summary item.
- `searchAbstract[].value` (String): Value of the summary item.
- `badges` (Array\[Object]): Badges shown on the result card.
- `badges[]` (Object): One badge object.
- `badges[].type` (String): Badge resource type.
- `badges[].id` (String): Badge ID.
- `badges[].attributes` (Object): Badge attribute container.
- `badges[].attributes.badgeType` (String): Badge kind, such as `map`.
- `badges[].attributes.label` (String): Badge display text.

#### Image Preview Fields

- `image` (Object): Main image relationship from the result item.
- `image.type` (String): Resource type of the main image.
- `image.id` (String): Image ID.
- `image.relationships` (Object): Related preview variations for the image.
- `image.relationships.originalVariation` (Array): Original variation relationship payload.
- `image.relationships.originalVariation[]` (Unknown): One original variation reference when present.
- `image.relationships.browseVariation` (Object): Browse thumbnail relationship.
- `image.relationships.browseVariation.data` (Object): Related browse variation reference.
- `image.relationships.browseVariation.data.type` (String): Resource type of the browse variation.
- `image.relationships.browseVariation.data.id` (String): Browse variation ID.
- `imageVariations` (Array\[Object]): Included thumbnail variation resources.
- `imageVariations[]` (Object): One image variation resource.
- `imageVariations[].type` (String): Variation resource type.
- `imageVariations[].id` (String): Variation ID.
- `imageVariations[].attributes` (Object): Variation attributes.
- `imageVariations[].attributes.url` (String): URL of that image variation.

#### Listing Metadata Fields

- `meta` (Object): Additional metadata from the result item.
- `meta.condition` (String or null): Listing condition, for example `rabljeno`.
- `meta.deadline` (String or null): Deadline-related metadata when present.
- `meta.distance` (Number or null): Distance metadata when location-based search is used.
- `meta.belongsToAuthenticatedUser` (Boolean): Whether the listing belongs to the authenticated app user.
- `meta.isComparable` (Boolean): Whether the item can be compared in the Njuskalo app.
- `meta.itemSize` (String or null): Optional item size metadata.

#### Category and User Reference Fields

- `category` (Object): Category resource attached to the item.
- `category.type` (String): Category resource type.
- `category.id` (String): Category ID as returned by the API.
- `category.attributes` (Object): Category attributes.
- `category.attributes.urlAlias` (String): URL alias/slug of the category.
- `category.attributes.title` (String): Human-readable category title.
- `user` (Object): Minimal user resource attached to the result.
- `user.type` (String): User resource type.
- `user.id` (String): User ID as returned in the result payload.
- `user.attributes` (Object): User attributes.
- `user.attributes.isAdOwnerResidentialSeller` (Boolean): Whether the ad owner is marked as a residential seller.
- `isAdOwnerResidentialSeller` (Boolean): Same seller-type signal flattened to the top level for convenience.

#### Location Fields

- `location` (Object): Listing location object.
- `location.label` (String or null): Human-readable location label when present.
- `location.lat` (Number or null): Latitude.
- `location.lng` (Number or null): Longitude.
- `location.radiusMeters` (Number or null): Accuracy radius in meters.
- `location.isApproximate` (Boolean): Whether the location is approximate.

#### Detail Attribute Fields

- `details` (Object): Flattened category-specific detail attributes.
- `details.lokacija_vozila` (String): Vehicle location.
- `details.marka_automobila` (String): Car brand.
- `details.model_automobila` (String): Car model.
- `details.tip_automobila` (String): Car trim/type.
- `details.godina_proizvodnje` (String): Production year.
- `details.godina_modela` (String): Model year.
- `details.u_prometu_od` (String): In-traffic/registration reference year.
- `details.prije_eni_kilometri` (String): Mileage value from the listing details.
- `details.motor` (String): Engine/fuel type.
- `details.snaga_motora` (String): Engine power.
- `details.radni_obujam` (String): Engine displacement.
- `details.mjenjac` (String): Transmission type.
- `details.ekoloska_kategorija_vozila` (String): Emissions category.
- `details.vlasnik` (String): Ownership info.
- `details.servisna_knjiga` (String): Service-book availability.
- `details.garaziran` (String): Whether the vehicle is garage-kept.
- `details.mogucnost_placanja` (String): Payment methods.
- `details.sifra_oglasa` (String): Listing code shown in the detail page.
- `details.oglas_objavljen` (String): Human-readable published date/time.
- `details.do_isteka_jos` (String): Remaining time / status until expiration.
- `additionalDetails` (Object): Additional grouped detail fields when the API exposes them separately.

#### Seller Fields

- `seller` (Object): Flattened seller/store information.
- `seller.name` (String or null): Seller or store name.
- `seller.email` (String or null): Seller email when available.
- `seller.location` (String or null): Seller location string.
- `seller.profileImage` (String or null): Seller/store logo or profile image URL.
- `seller.additionalInfo` (String or null): Extra seller description shown by Njuskalo.
- `seller.isVerified` (Boolean): Whether Njuskalo marks the seller as verified.
- `seller.verificationLabel` (String or null): Verification message text.
- `seller.isActive` (Boolean): Whether the seller account/store is active.
- `seller.userType` (String or null): Seller profile type, for example `store`.
- `seller.storeUrl` (String or null): Seller/store profile URL.
- `seller.allListingsUrl` (String or null): URL for all listings from that seller.

#### Contact Fields

- `contact` (Object): Contact endpoints and phone numbers.
- `contact.phoneNumbers` (Array\[Object]): Available phone numbers.
- `contact.phoneNumbers[]` (Object): One phone number object.
- `contact.phoneNumbers[].label` (String): Human-readable phone label.
- `contact.phoneNumbers[].number` (String): Normalized phone number.
- `contact.messageUrl` (String or null): API endpoint used for contacting the seller.

#### Media Fields

- `media` (Object): Full media payload from the detail page.
- `media.images` (Array\[String]): Main image URLs, usually xlsize versions.
- `media.images[]` (String): One image URL.
- `media.imageVariants` (Array\[Object]): All discovered image variant URLs.
- `media.imageVariants[]` (Object): One image variant descriptor.
- `media.imageVariants[].id` (String): Variant ID.
- `media.imageVariants[].href` (String): Variant URL.
- `media.imageVariants[].variant` (String): Variant size name such as `small`, `big`, or `xlsize`.

#### Statistics Fields

- `stats` (Object): Listing statistics and publication summary.
- `stats.adCode` (String): Listing/ad code.
- `stats.publishedAt` (String): Human-readable publication timestamp.
- `stats.expiresIn` (String): Human-readable expiration status.
- `stats.views` (Number or null): Number of views when exposed by the API.

#### Raw Detail Fields

- `rawDetail` (Object): Unflattened supplemental metadata kept for debugging and advanced use cases.
- `rawDetail.forceWeb` (Boolean): Internal flag from Njuskalo's payload.
- `rawDetail.categoryHierarchy` (Object): Category tree identifiers.
- `rawDetail.categoryHierarchy.level0` (Number): Top category level ID.
- `rawDetail.categoryHierarchy.level1` (Number): Second category level ID.
- `rawDetail.categoryHierarchy.level2` (Number): Third category level ID.
- `rawDetail.categoryHierarchy.level3` (Number): Fourth category level ID.
- `rawDetail.categoryHierarchy.level4` (Number): Fifth category level ID.
- `rawDetail.tracking` (Object): Internal tracking metadata.
- `rawDetail.tracking.xiti` (Object): Xiti analytics payload.
- `rawDetail.tracking.xiti.siteNumber` (Number): Analytics site number.
- `rawDetail.tracking.xiti.xtn2` (Number): Analytics section code.
- `rawDetail.tracking.xiti.xtpage` (String): Analytics page identifier.
- `rawDetail.adOwnerIsResidentialSeller` (Boolean): Raw seller-type flag from the detail payload.
- `rawDetail.displayElementCount` (Number): Number of display elements in the detail payload.
- `rawDetail.mainTitleLabel` (String): Main title label from the raw detail response.

***

### Explore More Scrapers

If you found this Njuskalo.hr Scraper useful, be sure to check out our other scraping and automation tools on [memo23's Apify profile](https://apify.com/memo23).

### Support

- For issues or feature requests, please use the [Issues](https://console.apify.com/actors/7Fw4OYjfMapM6l49D/issues) section of this actor.
- If you need customization or have questions, feel free to contact the author:
  - Author's website: <https://muhamed-didovic.github.io/>
  - Email: <muhamed.didovic@gmail.com>

### Additional Services

- Request customization or a full dataset export: <muhamed.didovic@gmail.com>
- If you need anything else scraped, or this actor customized, email: <muhamed.didovic@gmail.com>
- For API services of this scraper (no Apify fee, just usage fee for the API), contact: <muhamed.didovic@gmail.com>
- Email: muhamed.didovic@gmail.com

# Actor input Schema

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

Supported URLs: category pages, filtered pages, `/search/` pages, and direct `...-oglas-{id}` listing links.

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

Maximum number of listings processed in this run.

## `monitoringMode` (type: `boolean`):

When enabled, each listing id is checked against a per-user key-value store: only ids not seen in earlier runs are fetched and saved. You may see fewer rows than on the website if most listings were already stored. **Turn this off** for a full scrape of the current results.

## `maxConcurrency` (type: `integer`):

Maximum number of requests processed in parallel. Lower values reduce load on Njuskalo and can cut transient 503 errors.

## `minConcurrency` (type: `integer`):

Minimum concurrent requests.

## `maxRequestRetries` (type: `integer`):

Retries per failed request before giving up.

## `proxy` (type: `object`):

Specifies proxy servers used by the scraper.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.njuskalo.hr/prodaja-stanova"
  ],
  "maxItems": 1000,
  "monitoringMode": false,
  "maxConcurrency": 10,
  "minConcurrency": 1,
  "maxRequestRetries": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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/prodaja-stanova"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/njuskalo-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 = {
    "startUrls": ["https://www.njuskalo.hr/prodaja-stanova"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/njuskalo-scraper").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/prodaja-stanova"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call memo23/njuskalo-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Njuskalo.hr Search All categories and details Scraper",
        "description": "Structured Njuskalo.hr marketplace data: listing identity, chronology, commercial terms, canonical URLs, classification, location, narrative and attribute specifications, merchant profile, contact channels, resolution-variant imagery, listing analytics, supplementary metadata, and audit provenance",
        "version": "0.0",
        "x-build-id": "tvBIoGVueMnWYQVSd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/memo23~njuskalo-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-memo23-njuskalo-scraper",
                "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/memo23~njuskalo-scraper/runs": {
            "post": {
                "operationId": "runs-sync-memo23-njuskalo-scraper",
                "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/memo23~njuskalo-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-memo23-njuskalo-scraper",
                "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",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Supported URLs: category pages, filtered pages, `/search/` pages, and direct `...-oglas-{id}` listing links.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings processed in this run.",
                        "default": 1000
                    },
                    "monitoringMode": {
                        "title": "Monitoring mode (new listings only)",
                        "type": "boolean",
                        "description": "When enabled, each listing id is checked against a per-user key-value store: only ids not seen in earlier runs are fetched and saved. You may see fewer rows than on the website if most listings were already stored. **Turn this off** for a full scrape of the current results.",
                        "default": false
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "type": "integer",
                        "description": "Maximum number of requests processed in parallel. Lower values reduce load on Njuskalo and can cut transient 503 errors.",
                        "default": 10
                    },
                    "minConcurrency": {
                        "title": "Min Concurrency",
                        "type": "integer",
                        "description": "Minimum concurrent requests.",
                        "default": 1
                    },
                    "maxRequestRetries": {
                        "title": "Max Request Retries",
                        "type": "integer",
                        "description": "Retries per failed request before giving up.",
                        "default": 100
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Specifies proxy servers used by the scraper.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
