# Marzi Allegro Scraper (`marzi.ai/allegro-scraper`) Actor

Allegro.pl product data as JSON: scrape offers, search results and categories into one record per offer — price, rating, seller, offer count, Allegro's 30-day buyer counter, GTIN and stock on request. Pay per product. Built by Marzi.

- **URL**: https://apify.com/marzi.ai/allegro-scraper.md
- **Developed by:** [Marzi.ai Support](https://apify.com/marzi.ai) (community)
- **Categories:** E-commerce, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 product scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Marzi Allegro Scraper

Scrape **Allegro.pl** — Poland's largest marketplace — into clean, structured
JSON. Give it a product link, a search phrase or a category, and get back
prices, ratings, sellers, offer counts and Allegro's own 30-day buyer
counters for every product. Pay only for products actually delivered.

Built and run by [Marzi](https://marzi.ai), the Allegro market-analytics
platform: the parsers behind this Actor are the ones that read Allegro every
week for Marzi's Category Insights, Competitor Tracker and Price Tracker.

### What it scrapes

| Mode | Input | What you get |
|---|---|---|
| `PRODUCT` | one or more `allegro.pl/oferta/…` links | one record per offer, read from the offer page: price, price with delivery, rating and reviews, this seller's and the product's 30-day buyer counters, units sold, stock, GTIN/EAN, category path, parameters, seller details |
| `SEARCH` | a search phrase (or an `allegro.pl/listing?string=…` link) | the product cards Allegro shows for that search, page by page, in Allegro's order |
| `CATEGORY` | one or more `allegro.pl/kategoria/…` links | the product cards of the category, page by page |

Listing modes read what a buyer sees on the results page: title, price,
crossed-out price, delivery, rating and rating count, offer count, the
30-day buyer counter, brand, seller, Smart! and promotion badges, parameters
and photos. Switch on **Open every offer page** (`fetchDetails`) to add the
offer-page fields to every card — GTIN/EAN, stock, units sold, category path,
written reviews count, the seller's own buyer counter.

Switch off **Include parameters** / **Include images** for a compact record
(`parameters` and `images` become `null`): they are over half of a record's
size and rarely part of a decision — the same default the Marzi MCP uses for
AI clients.

Every listing mode accepts Allegro's own filters: sort (relevance,
popularity, price, newest), condition (new / used), price range.

### Output

One record per Allegro offer. Money is PLN as displayed; a field the page
does not show is `null`, never a guessed zero.

```json
{
  "offerId": "15764131793",
  "productId": "23b94313-35f0-457e-8fd4-26512cbbfe28",
  "url": "https://allegro.pl/oferta/15764131793",
  "title": "Powerbank Matnox 20000 mAh 22,5 W czarny",
  "imageUrl": "https://a.allegroimg.com/s360/118106/1ef2aa4741fa84a0fe22152beccf/…",
  "brand": null,
  "categoryId": 252023,
  "price": 119.9,
  "originalPrice": null,
  "priceWithDelivery": null,
  "currency": "PLN",
  "freeDelivery": false,
  "rating": 4.95,
  "ratingCount": 1842,
  "offersCount": 11,
  "recentBuyers": 1246,
  "promo": true,
  "sponsored": false,
  "smart": true,
  "sellerName": "AGILER_SKLEP",
  "sellerId": "121347218",
  "sellerSuperSeller": true,
  "sellerPositivePercent": 99.9,
  "parameters": [{ "name": "Materiał obudowy", "value": "tworzywo sztuczne" }],
  "images": ["https://a.allegroimg.com/s360/118106/…"],
  "position": 3,
  "source": { "mode": "SEARCH", "query": "powerbank 20000mah", "url": "https://allegro.pl/listing?string=powerbank%2020000mah", "page": 1 },
  "scrapedAt": "2026-09-15T17:49:10Z"
}
```

A `PRODUCT` record (or a listing record with `fetchDetails`) adds:

```json
{
  "brand": "Matnox",
  "priceWithDelivery": 130.39,
  "category": "Powerbanki",
  "categoryPath": ["Elektronika", "Telefony i Akcesoria", "Powerbanki"],
  "reviewsCount": 432,
  "offerRecentBuyers": 1231,
  "unitsSold": 1300,
  "stock": 2618,
  "gtin": "5907173930583",
  "offerEndedAt": null,
  "details": true
}
```

Field notes — these are Allegro's semantics, kept exactly:

- `recentBuyers` — Allegro's counter of **people** who bought the product
  card in the last 30 days, all sellers together. Not units, not sales.
  `offerRecentBuyers` is the same counter for one offer (its seller only).
- `ratingCount` — star ratings on the product card, shared by every seller
  of that product. `reviewsCount` — written reviews (offer pages only).
- `offersCount` — offers on the product card (sellers × variants), not
  unique sellers.
- `sponsored` — the card was a paid ad slot. Ads are skipped by default
  because they repeat on every page; `includeSponsored: true` keeps them.
- `offerId` is the record's identity: no run returns the same offer twice.
- `promo` — the seller pays to promote the offer; `smart` — the Allegro Smart!
  badge; `sellerSuperSeller` — the Super Seller badge. Badges, not quality.

The full schema, with a description on every field, is in the Actor's
dataset schema (Storage → Dataset → Schema in Apify Console). Export as
JSON, CSV, XLSX or read it through the Apify API.

### Input

```json
{
  "mode": "SEARCH",
  "searchQuery": "powerbank 20000mah",
  "maxProducts": 100,
  "sort": "popularity",
  "condition": "new",
  "priceMin": 50,
  "priceMax": 300,
  "fetchDetails": false,
  "includeSponsored": false,
  "concurrency": 2
}
```

```json
{
  "mode": "PRODUCT",
  "startUrls": [
    { "url": "https://allegro.pl/oferta/18673609654" },
    { "url": "https://allegro.pl/oferta/15764131793" }
  ]
}
```

```json
{
  "mode": "CATEGORY",
  "startUrls": [{ "url": "https://allegro.pl/kategoria/powerbanki-252023" }],
  "maxProducts": 500,
  "sort": "popularity"
}
```

| Field | Default | Notes |
|---|---|---|
| `mode` | `SEARCH` | `PRODUCT`, `SEARCH` or `CATEGORY` |
| `searchQuery` | — | SEARCH mode. Polish phrases work best |
| `startUrls` | `[]` | allegro.pl links only; the kind must match the mode |
| `maxProducts` | `100` | stop after this many products; hard ceiling 10,000 per run |
| `sort` | `relevance` | `relevance`, `popularity`, `price_asc`, `price_desc`, `newest` |
| `condition` | `all` | `all`, `new`, `used` |
| `priceMin` / `priceMax` | — | PLN |
| `fetchDetails` | `false` | open every offer page (one extra page per product) |
| `includeSponsored` | `false` | keep paid ad slots, flagged `sponsored: true` |
| `includeParameters` | `true` | off = `parameters: null` on every record |
| `includeImages` | `true` | off = `images: null` (`imageUrl` stays) |
| `concurrency` | `2` | parallel browser sessions, 1–5 |

### Pricing

**Pay per event: one `product-scraped` event per product delivered.** The
price per product is on this page under *Pricing*. You are not charged for
failed pages, duplicates, invalid records, empty results or the Actor's own
errors — the event is charged after the record is validated and stored in
your dataset, never before. Set **Maximum cost per run** in Console or the
API and the run stops at your limit.

For a `SEARCH` or `CATEGORY` run, one Allegro page yields about 60 products.
`fetchDetails` and `PRODUCT` mode read one page per product and take
proportionally longer.

### How it works, and its limits

- Pages are read through a real browser on Polish residential connections,
  paced the way Allegro tolerates (a few pages per identity, then a fresh
  one). Blocks are retried on a new identity with exponential back-off; a
  page that cannot be read after several attempts is recorded in
  `RUN_SUMMARY` (key-value store) and the run goes on.
- Allegro serves at most 100 pages of any listing (~6,000 products). For a
  larger category, run several narrower inputs (price ranges, condition,
  sub-categories).
- Allegro's "popularity" sort of a seller's storefront is limited to its
  first page by Allegro; storefronts are not a mode of this Actor.
- Only `allegro.pl` links are accepted. Allegro Lokalnie, allegro.cz/.sk/.hu
  are different marketplaces and are refused; Lokalnie classifieds that
  Allegro mixes into a listing are skipped, not stored.
- The run's own account of itself — pages read, products, duplicates,
  failed URLs with reasons, provider usage, duration — is stored as
  `RUN_SUMMARY` in the run's default key-value store.

### Use with AI agents and MCP

The Actor has a strict input schema, a typed output schema, deterministic
records and no interactive steps, so it can be run through
[Apify's MCP server](https://docs.apify.com/platform/integrations/mcp) or
any agent framework that calls Actors.

If you want more than scraping — a weekly index of every Allegro category
(Category Insights, Market Intelligence), Competitor Tracker, Price Tracker,
Keyword Tracker, Smart Pricing, and monitors that run on their own and
report to your AI assistant — that is
**[Marzi AI Integration](https://marzi.ai/products/ai-integration/)**: the
same Allegro parsers, plus Marzi's market data, as a Model Context Protocol
server with 26 functions for Claude, ChatGPT, Claude Code and your own
agents. Set-up guide: [mcp.marzi.ai](https://mcp.marzi.ai).

### Troubleshooting

| Symptom | What it means |
|---|---|
| `Invalid input: startUrls: … — Only allegro.pl links work here` | the link is not an allegro.pl page, or its kind does not match the mode (a category link in PRODUCT mode, an offer in CATEGORY mode) |
| `… is a product card, not an offer` | `/produkt/…` links point at a product card with many sellers; open one offer (`/oferta/…`) or use SEARCH |
| a run ends with fewer products than `maxProducts` | Allegro had fewer results, or a page could not be read — `RUN_SUMMARY.failures` lists every page that failed and why |
| `blocked on … new identity in N s` in the log | Allegro's anti-bot answered; the Actor waits and retries on a fresh identity. Frequent blocks slow a run down but do not fail it |
| `No page provider configured` | the Actor's provider keys are missing on this version — contact the developer |
| `brand: null` on listing cards | Allegro does not always put the brand on the card; `fetchDetails` reads it from the offer page when published |

### Example tasks

See the *Examples* on this page: scrape one product, scrape search results,
scrape a category, extract prices and ratings, collect products for AI
research. Every example is a real input with real output.

***

Keywords: Allegro scraper, Allegro API, Allegro data, Allegro product
scraper, Allegro search scraper, Allegro category scraper, Poland ecommerce,
Polish marketplace, product data, price data, price monitoring, AI agent,
MCP.

# Changelog

This Actor's version history is a separate document: https://apify.com/marzi.ai/allegro-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

PRODUCT reads offer pages you list in startUrls. SEARCH walks Allegro search results for searchQuery (or a search URL). CATEGORY walks the category pages you list in startUrls.

## `searchQuery` (type: `string`):

SEARCH mode: what to type into Allegro's search box, e.g. "powerbank 20000mah". Polish works best — Allegro is a Polish marketplace.

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

PRODUCT mode: allegro.pl/oferta/… links. CATEGORY mode: allegro.pl/kategoria/… links. SEARCH mode may also take allegro.pl/listing?string=… links. Only allegro.pl is accepted.

## `maxProducts` (type: `integer`):

Stop after this many products. One product is one billable event. Runs are capped at 10,000.

## `sort` (type: `string`):

Allegro's own sort orders. popularity is Allegro's "most popular" (by 30-day buyers).

## `condition` (type: `string`):

Allegro's condition filter (stan).

## `priceMin` (type: `integer`):

Lowest price to include, PLN.

## `priceMax` (type: `integer`):

Highest price to include, PLN.

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

SEARCH / CATEGORY: also open each offer to add category path, GTIN/EAN, stock, units sold, written reviews count and this seller's own 30-day buyer counter. One extra page per product, so runs take longer.

## `includeSponsored` (type: `boolean`):

Keep Allegro's paid ad slots in the results (flagged sponsored: true). Off by default: ads repeat on every page and usually duplicate organic results.

## `includeParameters` (type: `boolean`):

Keep the product parameters (name/value pairs) on every record. Off = null: parameters and images are over half of a record's size and rarely needed for a decision - the same default the Marzi MCP uses for AI clients.

## `includeImages` (type: `boolean`):

Keep the image URLs on every record (imageUrl, the first picture, stays either way). Off = null.

## `concurrency` (type: `integer`):

Browser sessions used at once. More is faster but not unbounded: Allegro's anti-bot regime is per identity, and the Actor paces every session.

## Actor input object example

```json
{
  "mode": "SEARCH",
  "searchQuery": "powerbank 20000mah",
  "startUrls": [],
  "maxProducts": 100,
  "sort": "relevance",
  "condition": "all",
  "fetchDetails": false,
  "includeSponsored": false,
  "includeParameters": true,
  "includeImages": true,
  "concurrency": 2
}
```

# Actor output Schema

## `products` (type: `string`):

The scraped products as JSON: one record per Allegro offer (offerId, url, title, price, rating, seller, 30-day buyer counter, ...). Append ?format=csv or ?format=xlsx for a spreadsheet.

## `runSummary` (type: `string`):

Pages read, products stored, duplicates, failed URLs with reasons, provider usage and duration - the run's own account, written when it ends.

# 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 = {
    "searchQuery": "powerbank 20000mah"
};

// Run the Actor and wait for it to finish
const run = await client.actor("marzi.ai/allegro-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 = { "searchQuery": "powerbank 20000mah" }

# Run the Actor and wait for it to finish
run = client.actor("marzi.ai/allegro-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 '{
  "searchQuery": "powerbank 20000mah"
}' |
apify call marzi.ai/allegro-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,marzi.ai/allegro-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/M0lAI1I6aEx8ztzFT/builds/ppEcSCT1wOLudkQUW/openapi.json
