# Empik Scraper — Polish Books, Prices & Sellers (`unfenced-group/empik-scraper`) Actor

Scrape empik.com products by keyword, category, bestseller list or URL. Price, discount, 30-day lowest price, seller, stock, delivery, rating, categories, plus descriptions, images, publisher and release date. Price-change tracking.

- **URL**: https://apify.com/unfenced-group/empik-scraper.md
- **Developed by:** [Unfenced Group](https://apify.com/unfenced-group) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 products

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

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Empik Scraper

![Empik Scraper](https://api.apify.com/v2/key-value-stores/ozfxxAf3XDVQgsDbS/records/banner.png)

Extract products from empik.com, Poland's largest retailer of books, ebooks, games, film, music and toys: prices, 30-day lowest prices, discounts, sellers, stock, ratings, categories and full product details. Search by keyword, crawl categories and bestseller lists, or scrape product pages. No API key required.

***

### Why this scraper?

#### 🇵🇱 Built for empik.com

A dedicated Empik scraper covering books, ebooks, audiobooks, games, film, music, toys, stationery and beauty, with prices in złoty exactly as the site shows them.

#### 💰 Complete price picture

Current price, reference price and its type (publisher's suggested or regular), discount percentage, the Omnibus lowest price of the last 30 days, multi-buy offers and the "cheaper in the app" flag.

#### 🏪 Seller and marketplace data

Every row says whether Empik or a marketplace seller offers the product, with the seller's name and ID. Filter to Empik-only or marketplace-only offers.

#### 📦 Stock and delivery

Availability status, shipping time, free delivery, pre-orders, restocks and whether the product is stocked in Empik stores.

#### 📚 Full product details

Descriptions in HTML, text and Markdown, all gallery images and videos, series, publisher, producer, director, performer, release date, rating count, ebook format and Empik Go availability.

#### 🔁 Price monitoring

Every row carries the previous price and a change status. Switch on **Only new products and price changes** for a daily feed of what moved.

***

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | array | `[]` | Keywords to search for, one per line, for example `harry potter`. Barcode (ISBN/EAN) searches are blocked by empik.com and skipped. |
| `startUrls` | array | `[]` | Search, category, bestseller or product page URLs from www.empik.com. |
| `maxItems` | integer | `100` | Maximum number of products to return. `0` means no limit. |
| `fetchDetails` | boolean | `false` | Open every product page for the full detail fields below. Billed at the detailed rate. |
| `sellerType` | string | `"all"` | `all`, `empik` (Empik's own offers) or `marketplace` (third-party sellers only). |
| `minPrice` | integer | (empty) | Only products priced at or above this amount in PLN. |
| `maxPrice` | integer | (empty) | Only products priced at or below this amount in PLN. |
| `onlyDiscounted` | boolean | `false` | Only products currently below their reference price. |
| `inStockOnly` | boolean | `false` | Skip sold-out products. Pre-orders are kept. |
| `skipSponsored` | boolean | `true` | Leave out paid advertisement tiles mixed into the results. |
| `splitLargeCategories` | boolean | `true` | Crawl subcategories when a category holds more than 4,800 products. |
| `onlyChanges` | boolean | `false` | Return only products that are new or changed price since your previous run. |

When no search query or URL is given, the actor searches `harry potter` as an example.

***

### Output schema

Every field below is present on every record. Fields empik.com does not publish for a product are returned as `null` rather than omitted.

#### Always present

| Field | Type | Description |
|---|---|---|
| `productId` | string | Empik product ID, for example `p1638362029`. |
| `url` | string | Product page URL, without tracking parameters. |
| `name` | string | Product title. |
| `authors` | array | Authors or creators, each with `name` and `url` (the author's product listing on empik.com). |
| `author` | string | All authors in one comma-separated string. Null when none is listed. |
| `brand` | string | Brand, for toys and other branded goods. Null for most books. |
| `format` | string | Format or edition, for example `okładka miękka`, `ebook`, `Blu-ray Disc`. |
| `productGroup` | string | Main product group as shown on the tile, for example `Książki`, `Ebook`, `Zabawki`. |
| `categoryPath` | string | Full category path, for example `Książki/Dla młodzieży/Literatura dla młodzieży`. |
| `categories` | array | The category path as a list, top level first. |
| `mainCategory` | string | Top-level category. |
| `imageUrl` | string | Main product image. |
| `price` | number | Current price in PLN. |
| `currency` | string | Always `PLN`. |
| `originalPrice` | number | Reference price before the discount. Null when the product is not discounted. |
| `originalPriceType` | string | What the reference price is: `PUBLISHER_SUGGESTED`, `REGULAR` or `OTHER`. Null without a reference price. |
| `originalPriceLabel` | string | The reference-price label exactly as shown on the site. |
| `discountPercentage` | number | Discount against the reference price, in percent. 0 when not discounted. |
| `isOnSale` | boolean | True when the price is below the reference price. |
| `lowestPrice30Days` | number | Lowest price in the 30 days before the current promotion (EU Omnibus rule). Only published during promotions. |
| `hasLowestPriceGuarantee` | boolean | True when Empik shows its lowest-price guarantee on the product. |
| `rating` | number | Average customer rating out of 5. Null when the product has no ratings. |
| `availabilityCode` | string | Availability status: `IN_24_H`, `IN_48_H`, `IN_72_H`, `IN_6_8_DAYS`, `PRE_SALE`, `RE_SALE`, `DIGITAL`, `UNAVAILABLE`. |
| `availabilityText` | string | Availability as shown on the site, for example `Przewidywana wysyłka w 1 dzień rob.` |
| `inStock` | boolean | True when the product can be ordered now or pre-ordered. |
| `availableInStores` | boolean | True when the product is stocked in at least one Empik store. |
| `deliveryInfo` | string | Delivery note, for example `Dostawa za darmo`. Null for digital products. |
| `freeDelivery` | boolean | True when delivery is free. Null when no delivery note is shown. |
| `eligibleForEmpikPremium` | boolean | True when the offer qualifies for Empik Premium benefits. |
| `sellerId` | string | Seller ID. `0` is Empik itself; any other value is a marketplace seller. |
| `sellerName` | string | Seller name, for example `Empik` or the marketplace shop's name. |
| `isMarketplace` | boolean | True when the offer comes from a third-party marketplace seller. |
| `offerId` | string | Offer ID. `0` for Empik's own offer. |
| `badges` | array | Promotional labels on the product, for example `Megacena`, `Nowość`, `2 za 60 zł`. |
| `isBestseller` | boolean | Carries the bestseller (TOP) label. |
| `isNew` | boolean | Carries the new-release label. |
| `isPreorder` | boolean | Carries the pre-order label. |
| `isCheaperInApp` | boolean | Empik shows a lower price in its mobile app. |
| `isEmpikExclusive` | boolean | Sold only at Empik. |
| `isMegaPrice` | boolean | Carries the Megacena promotion label. |
| `multiBuyPromotion` | string | Multi-buy offer, for example `2 za 60 zł`. Null when none. |
| `bestsellerRank` | integer | Rank on a bestseller list. Null outside bestseller lists. |
| `alsoInOutlet` | boolean | A discounted outlet copy of the product is also offered. |
| `isSponsored` | boolean | The product was a paid advertisement in the results. |
| `position` | integer | Position in the search or category results. Null for sponsored rows. |
| `sourceMode` | string | How the row was found: `search`, `category`, `bestsellers`, `listing` or `product`. |
| `searchQuery` | string | The search keyword that returned the row. Null outside search mode. |
| `sourceUrl` | string | The page the row was collected from. |
| `detailFetched` | boolean | True when the product page was opened for this row. |
| `contentHash` | string | Stable hash of product ID and name, for deduplication. |
| `source` | string | Always `empik.com`. |
| `scrapedAt` | string | Time the row was collected (ISO 8601). |
| `firstSeenAt` | string | First time this product appeared in your runs. |
| `previousPrice` | number | Price in your previous run. Null on first sight. |
| `priceChange` | number | Price difference since your previous run, in PLN. |
| `changeStatus` | string | `NEW`, `PRICE_DROP`, `PRICE_INCREASE` or `UNCHANGED` compared with your previous run. |

#### With `fetchDetails: true` (and for product page URLs)

These fields are `null` on rows without details.

| Field | Type | Description |
|---|---|---|
| `categoryId` | string | ID of the most specific category. |
| `categoryTree` | array | Every category level with `id`, `name` and `url`. |
| `coverImages` | object | Cover image in three sizes: `small`, `medium`, `large`. |
| `images` | array | All gallery images in the largest size. |
| `imageCount` | integer | Number of gallery images. |
| `videos` | array | Product video URLs. |
| `ratingCount` | integer | Number of customer ratings. |
| `productType` | string | `PHYSICAL` or `DIGITAL` product. |
| `eproductType` | string | Digital product kind, for example `e-produkt`. Null for physical goods. |
| `digitalFormat` | string | Ebook or audiobook file format, for example `EPUB`. |
| `series` | string | Series or collection, for example `Harry Potter` or `LEGO HARRY POTTER`. |
| `license` | string | Licensed brand, for example `Minecraft` or `FC Barcelona`. |
| `publishers` | array | Publishers. |
| `producers` | array | Producers or manufacturers. |
| `directors` | array | Directors, for films. |
| `performers` | array | Performers, for music. |
| `releaseDate` | string | Release or premiere date (YYYY-MM-DD, Polish date). |
| `preSaleDate` | string | Start of sale as published by Empik (ISO 8601). |
| `reSaleDate` | string | Expected restock date. Null unless the product awaits a restock. |
| `parentalAdvisory` | boolean | Carries a parental advisory warning. |
| `unitPricingMeasure` | string | Unit-price base quantity, where Empik publishes a unit price. |
| `unitPricingUnit` | string | Unit-price unit, for example `szt`. |
| `pageBadges` | array | Labels on the product page, for example `Top`, `Nowość`, `Tylko w empiku`. |
| `inEmpikGoSubscription` | boolean | Included in the Empik Go ebook and audiobook subscription. |
| `hasFreeSample` | boolean | A free ebook or audiobook sample is available. |
| `faq` | array | Questions and answers on the product page, each with `question` and `answer`. |
| `variantName` | string | The edition or variant this page represents, for example `ebook, EPUB` or `DVD`. |
| `descriptionHtml` | string | Full product description as HTML. |
| `descriptionText` | string | Full product description as plain text. |
| `descriptionMarkdown` | string | Full product description as Markdown. |

#### Example record

```json
{
  "productId": "p1755121994",
  "url": "https://www.empik.com/ostatnie-zyczenie-wiedzmin-sapkowski-andrzej,p1755121994,ksiazka-p",
  "name": "Ostatnie życzenie. Wiedźmin",
  "authors": [
    {
      "name": "Sapkowski Andrzej",
      "url": "https://www.empik.com/szukaj/produkt?author=sapkowski+andrzej"
    }
  ],
  "author": "Sapkowski Andrzej",
  "brand": null,
  "format": "okładka miękka",
  "productGroup": "Książki",
  "categoryPath": "Książki/Komiks/Dla dorosłych",
  "categories": [
    "Książki",
    "Komiks",
    "Dla dorosłych"
  ],
  "mainCategory": "Książki",
  "imageUrl": "https://ecsmedia.pl/cir/b/ostatnie-zyczenie-wiedzmin-2026/07/03/1124343139774778215/5cdb3a73fe3f4ed0bd69a3379c49a2ec.webp",
  "price": 25.99,
  "currency": "PLN",
  "originalPrice": 29.99,
  "originalPriceType": "PUBLISHER_SUGGESTED",
  "originalPriceLabel": "cena sugerowana przez wydawcę",
  "discountPercentage": 13,
  "isOnSale": true,
  "lowestPrice30Days": null,
  "hasLowestPriceGuarantee": false,
  "rating": null,
  "availabilityCode": "IN_24_H",
  "availabilityText": "Przewidywana wysyłka w 1 dzień rob.",
  "inStock": true,
  "availableInStores": false,
  "deliveryInfo": "Dostawa za darmo",
  "freeDelivery": true,
  "eligibleForEmpikPremium": true,
  "sellerId": "0",
  "sellerName": "Empik",
  "isMarketplace": false,
  "offerId": "0",
  "badges": [
    "Taniej w apce"
  ],
  "isBestseller": false,
  "isNew": false,
  "isPreorder": false,
  "isCheaperInApp": true,
  "isEmpikExclusive": false,
  "isMegaPrice": false,
  "multiBuyPromotion": null,
  "bestsellerRank": null,
  "alsoInOutlet": false,
  "isSponsored": false,
  "position": 2,
  "sourceMode": "search",
  "searchQuery": "sapkowski",
  "sourceUrl": "https://www.empik.com/szukaj/produkt?q=sapkowski",
  "categoryId": "317401",
  "categoryTree": [
    {
      "id": "31",
      "name": "Książki",
      "url": "https://www.empik.com/ksiazki,31,s"
    },
    {
      "id": "3174",
      "name": "Komiks",
      "url": "https://www.empik.com/ksiazki/komiks,3174,s"
    },
    {
      "id": "317401",
      "name": "Dla dorosłych",
      "url": "https://www.empik.com/ksiazki/komiks/dla-doroslych,317401,s"
    }
  ],
  "coverImages": {
    "small": "https://ecsmedia.pl/cir/p/ostatnie-zyczenie-wiedzmin-2026/07/03/1124343139774778215/5cdb3a73fe3f4ed0bd69a3379c49a2ec.webp",
    "medium": "https://ecsmedia.pl/cir/w/ostatnie-zyczenie-wiedzmin-2026/07/03/1124343139774778215/5cdb3a73fe3f4ed0bd69a3379c49a2ec.webp",
    "large": "https://ecsmedia.pl/cir/b/ostatnie-zyczenie-wiedzmin-2026/07/03/1124343139774778215/5cdb3a73fe3f4ed0bd69a3379c49a2ec.webp"
  },
  "images": [],
  "imageCount": 0,
  "videos": [],
  "ratingCount": 0,
  "productType": "PHYSICAL",
  "eproductType": null,
  "digitalFormat": null,
  "series": "Wiedźmin",
  "license": null,
  "publishers": [
    "Story House Egmont"
  ],
  "producers": [],
  "directors": [],
  "performers": [],
  "releaseDate": "2026-09-23",
  "preSaleDate": "2026-09-22T22:00:00Z",
  "reSaleDate": null,
  "parentalAdvisory": false,
  "unitPricingMeasure": null,
  "unitPricingUnit": null,
  "pageBadges": [
    "Nowość"
  ],
  "inEmpikGoSubscription": false,
  "hasFreeSample": false,
  "faq": [],
  "variantName": null,
  "descriptionHtml": "Gdy Jaskier wyłowił z jeziora stary dzban zamknięty tajemniczą pieczęcią, nie mógł go nie otworzyć. Bard liczył, że z naczynia wyłoni się dżinn, który ochoczo spełni jego życzenia. Miał rację co do ducha, ale już nie co …",
  "descriptionText": "Gdy Jaskier wyłowił z jeziora stary dzban zamknięty tajemniczą pieczęcią, nie mógł go nie otworzyć. Bard liczył, że z naczynia wyłoni się dżinn, który ochoczo spełni jego życzenia. Miał rację co do ducha, ale już nie co …",
  "descriptionMarkdown": "Gdy Jaskier wyłowił z jeziora stary dzban zamknięty tajemniczą pieczęcią, nie mógł go nie otworzyć. Bard liczył, że z naczynia wyłoni się dżinn, który ochoczo spełni jego życzenia. Miał rację co do ducha, ale już nie co …",
  "detailFetched": true,
  "contentHash": "2aaaa15f9799c1d9",
  "source": "empik.com",
  "scrapedAt": "2026-09-20T05:52:23.317Z",
  "firstSeenAt": "2026-09-20T05:52:23.317Z",
  "previousPrice": null,
  "priceChange": null,
  "changeStatus": "NEW"
}
```

***

### Examples

**Search for books by an author, with full details:**

```json
{
    "searchQueries": ["sapkowski"],
    "maxItems": 200,
    "fetchDetails": true
}
```

**Discounted LEGO sets from marketplace sellers under 200 zł:**

```json
{
    "searchQueries": ["lego"],
    "sellerType": "marketplace",
    "onlyDiscounted": true,
    "maxPrice": 200,
    "maxItems": 500
}
```

**A whole category, a bestseller list and a single product:**

```json
{
    "startUrls": [
        { "url": "https://www.empik.com/ksiazki/dla-mlodziezy,3170,s" },
        { "url": "https://www.empik.com/bestsellery/ksiazki" },
        { "url": "https://www.empik.com/lego-76421-harry-potter-skrzat-domowy-zgredek-lego,p1379939939,zabawki-p" }
    ],
    "maxItems": 0
}
```

**Daily price-change feed for a category (schedule it once a day):**

```json
{
    "startUrls": [{ "url": "https://www.empik.com/bestsellery/ebooki" }],
    "onlyChanges": true,
    "maxItems": 0
}
```

***

### 💰 Pricing

**$0.49 per 1,000 results** — you only pay for products delivered to your dataset. Failed retries are never charged.

**$0.79 per 1,000 results with product details** — for rows where the product page was opened (`fetchDetails: true` or product page URLs).

| Results | Listing rows | With details |
|---|---|---|
| 100 | ~$0.05 | ~$0.08 |
| 1,000 | ~$0.49 | ~$0.79 |
| 10,000 | ~$4.90 | ~$7.90 |
| 100,000 | ~$49.00 | ~$79.00 |

> Flat-rate alternatives typically charge $29–$49/month regardless of usage.

Use the **Max results** cap in the input to control your spend exactly.

***

### Performance

| Run size | Listing rows | With details |
|---|---|---|
| 100 results | under 1 minute | about 2 minutes |
| 1,000 results | about 2–3 minutes | about 13 minutes |
| 10,000 results | about 25 minutes | split into several runs |

***

### Known limitations

- empik.com shows at most 4,800 products for any single search or category. Large categories are split into subcategories automatically; for very broad searches, use more specific keywords.
- ISBN and EAN codes are not included: empik.com does not make them available to automated visitors, and it blocks barcode searches.
- The 30-day lowest price, reference price and multi-buy offers only appear while a promotion runs.
- Product details are collected at a measured pace. One run delivers roughly 4,500 detailed rows per hour; split larger jobs across runs.

***

### Technical details

- **Source:** empik.com — Polish online retailer and marketplace
- **Coverage:** all product groups, searchable by keyword, category, bestseller list and product URL
- **Memory:** 512 MB
- **Change tracking:** key-value store `empik-scraper-history`, 180-day retention
- **Retry:** automatic retry on network errors and blocks, on a fresh connection each time
- **Compliance:** follows empik.com's robots.txt; sorting and filter parameters in URLs are ignored

***

### Rate this actor

If this scraper does its job, a short review on the **Reviews** tab helps other users find it. Something not working? Open an issue on the **Issues** tab instead — issues get fixed.

***

### Need a custom scraper?

**[Unfenced Group](https://www.unfencedgroup.nl)** builds Apify actors for any website — for free.

If the site you need isn't in our portfolio yet, just ask. We scope, build, and publish it at no cost to you. You only pay for results — we absorb the compute and proxy costs ourselves. Same pay-per-result pricing, same quality, same standards as every actor in this portfolio.

**Get in touch:** [www.unfencedgroup.nl](https://www.unfencedgroup.nl)

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search empik.com for, exactly as in the site's search box. One search per line, for example "harry potter", "lego" or "remigiusz mróz". Barcode (ISBN/EAN) searches are blocked by empik.com and skipped. Leave empty when you only use Start URLs.

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

Empik.com pages to scrape: search results (https://www.empik.com/szukaj/produkt?q=wiedzmin), category pages (https://www.empik.com/ksiazki/fantastyka,3179,s), bestseller lists (https://www.empik.com/bestsellery/ksiazki) or product pages (one full record each). Sorting and filter parameters in a URL are ignored.

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

Maximum number of products to return across all queries, URLs and codes, for example 500. Set to 0 for no limit.

## `fetchDetails` (type: `boolean`):

Open every product page to add the full description, all gallery images and videos, the full category tree with IDs, rating count, series, publisher, producer, director, performer, release date and product type. Slower and billed at the detailed rate. Product page URLs in Start URLs are always fetched in full.

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

Which offers to return: all (default), empik (only products sold by Empik itself) or marketplace (only products sold by third-party marketplace sellers).

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

Only return products priced at or above this amount in złoty, for example 20. Leave empty for no minimum.

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

Only return products priced at or below this amount in złoty, for example 100. Leave empty for no maximum.

## `onlyDiscounted` (type: `boolean`):

Only return products currently priced below their regular or publisher's suggested price.

## `inStockOnly` (type: `boolean`):

Skip products that are sold out or waiting for a restock. Pre-orders are kept.

## `skipSponsored` (type: `boolean`):

Leave out paid advertisement tiles that empik.com mixes into search and category results. Turn off to keep them; they are flagged with isSponsored.

## `splitLargeCategories` (type: `boolean`):

empik.com lists at most 4,800 products per page sequence. When a category is larger, crawl its subcategories instead so you can reach the full assortment.

## `onlyChanges` (type: `boolean`):

Return only products that are new since your previous run or whose price changed. Use it for a daily price-monitoring feed; every row also carries previousPrice and changeStatus.

## Actor input object example

```json
{
  "searchQueries": [
    "harry potter"
  ],
  "startUrls": [
    {
      "url": "https://www.empik.com/bestsellery/ksiazki"
    }
  ],
  "maxItems": 20,
  "fetchDetails": false,
  "sellerType": "all",
  "onlyDiscounted": false,
  "inStockOnly": false,
  "skipSponsored": true,
  "splitLargeCategories": true,
  "onlyChanges": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "searchQueries": [
        "harry potter"
    ],
    "startUrls": [
        {
            "url": "https://www.empik.com/bestsellery/ksiazki"
        }
    ],
    "maxItems": 20,
    "fetchDetails": false,
    "sellerType": "all",
    "onlyDiscounted": false,
    "inStockOnly": false,
    "skipSponsored": true,
    "splitLargeCategories": true,
    "onlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("unfenced-group/empik-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 = {
    "searchQueries": ["harry potter"],
    "startUrls": [{ "url": "https://www.empik.com/bestsellery/ksiazki" }],
    "maxItems": 20,
    "fetchDetails": False,
    "sellerType": "all",
    "onlyDiscounted": False,
    "inStockOnly": False,
    "skipSponsored": True,
    "splitLargeCategories": True,
    "onlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("unfenced-group/empik-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 '{
  "searchQueries": [
    "harry potter"
  ],
  "startUrls": [
    {
      "url": "https://www.empik.com/bestsellery/ksiazki"
    }
  ],
  "maxItems": 20,
  "fetchDetails": false,
  "sellerType": "all",
  "onlyDiscounted": false,
  "inStockOnly": false,
  "skipSponsored": true,
  "splitLargeCategories": true,
  "onlyChanges": false
}' |
apify call unfenced-group/empik-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,unfenced-group/empik-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/VN5mtRb4f0IF3ThyU/builds/9R358X6o3A6Y2IXmb/openapi.json
