# 21vek.by Scraper: Belarus Shop Prices, Stock & Reviews (`discreet_watermelon/21vek-scraper`) Actor

Export products from 21vek.by: search or category results, prices in BYN, discounts, stock, specifications and customer reviews.

- **URL**: https://apify.com/discreet_watermelon/21vek-scraper.md
- **Developed by:** [Ekaterina Vlasova](https://apify.com/discreet_watermelon) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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

## 21vek.by Scraper: Belarus Shop Prices, Stock & Reviews

Export products from [21vek.by](https://www.21vek.by), a large Belarusian online hypermarket (electronics, appliances, furniture and more). Give the Actor a search query, a category link or a product link and get a table of titles, brands, current and original prices in BYN, discounts, stock status, ratings and (optionally) specifications or customer reviews.

Use it for price monitoring, assortment research or a scheduled snapshot of a niche. It reads the same public catalog endpoints a shopper's browser uses. It does not log in, and it does not collect private account data.

### What you get

- Search the store or walk a category (phones, appliances, furniture and the rest of the 21vek tree).
- Open a single product URL when you already know the item.
- Current and crossed-out prices in BYN, discount percent, stock status, rating and review count.
- Optional full details: specifications, warranty, country of origin.
- Optional customer reviews: stars, summary, pros, cons and date.

### How to use

1. Enter one or more search queries (`iphone`, `холодильник`) or paste 21vek.by URLs.
2. Set a maximum number of products (start with 50 while you test).
3. Turn on details or reviews only if you need them; they add extra requests.
4. Run the Actor and download JSON, CSV or Excel, or read the dataset through the Apify API.

#### Input example

```json
{
  "searchQueries": ["iphone"],
  "startUrls": [{ "url": "https://www.21vek.by/mobile/" }],
  "maxItems": 50,
  "includeDetails": false,
  "includeReviews": false,
  "requestDelayMs": 300
}
```

Supported URLs:

- Search: `https://www.21vek.by/search/?term=iphone`
- Category: `https://www.21vek.by/mobile/` or `https://www.21vek.by/mobile/page:2/`
- Product: `https://www.21vek.by/mobile/iphone15128gb_apple_8560469.html`

#### Output example

```json
{
  "id": 10019151,
  "alias": "iphone17pro256gb_apple_10019151",
  "title": "Смартфон Apple iPhone 17 Pro 256GB (серебристый)",
  "brand": "Apple",
  "category": "Смартфоны",
  "url": "https://www.21vek.by/mobile/iphone17pro256gb_apple_10019151.html",
  "price": 4899,
  "originalPrice": 5909,
  "discountPercent": 17,
  "currency": "BYN",
  "status": "in_stock",
  "inStock": true,
  "rating": 4.9,
  "reviewsCount": 107,
  "source": "search:iphone"
}
```

### Pricing

This Actor uses pay-per-event pricing. You pay only for the rows you receive. Apify platform usage is included in the event price. There is no start fee.

| Event | When it is charged | Price |
| --- | --- | --- |
| Product row (`product-scraped`) | Once per product written to the dataset | $2.50 per 1,000 ($0.0025 each) |
| Product details (`product-details`) | Once per product that was enriched with specifications | $2.00 per 1,000 products |
| Review (`review-scraped`) | Once per review attached to a product | $1.00 per 1,000 reviews |

Examples: 1,000 search or category rows cost $2.50. The same 1,000 rows with details cost $4.50. 200 products plus 10 reviews each cost $2.50. Empty searches, failed products and duplicates are not charged. Set a maximum number of products, or a max total charge on the run, to cap spending.

### Local development

```bash
npm install
echo '{"searchQueries":["iphone"],"maxItems":5,"includeDetails":true,"includeReviews":true,"maxReviewsPerProduct":2}' > storage/key_value_stores/default/INPUT.json
npm run test:local
```

Results are written to `storage/datasets/default`.

### Limits and fair use

- Only public catalog data is collected. Legal addresses, emails and phone numbers are not stored.
- Requests are spaced (`requestDelayMs`, 300 ms by default). Keep this on for scheduled jobs.
- A proxy is optional. The catalog API was reachable without one during development; enable Apify Proxy only if blocks appear.
- Search returns 60 products per page. Category listings use the same page size. 21vek.by may change endpoints or add protection at any time.

### Changelog

- 0.1.1 — Pay-per-event charging for products, specifications and reviews, with run spending limits honored.
- 0.1.0 — First version: search, category and product URLs, optional details and reviews.

# Actor input Schema

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

Words you would type in the 21vek.by search box, for example iphone or холодильник.

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

Category pages (https://www.21vek.by/mobile/), search pages (https://www.21vek.by/search/?term=iphone) or product pages (https://www.21vek.by/mobile/iphone15128gb_apple_8560469.html).

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

Stop after this many products across all queries and URLs. Use 0 for no limit.

## `includeDetails` (type: `boolean`):

For each product, fetch specifications, warranty, country of origin and variant links from the product page.

## `includeReviews` (type: `boolean`):

Fetch customer reviews (rating, text, pros, cons and date).

## `maxReviewsPerProduct` (type: `integer`):

Newest reviews to keep for each product.

## `requestDelayMs` (type: `integer`):

Pause between catalog requests to avoid overloading the site.

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

Optional. The public catalog API currently responds without a proxy from many networks. Enable a proxy only if you start seeing blocks.

## Actor input object example

```json
{
  "searchQueries": [
    "iphone"
  ],
  "startUrls": [],
  "maxItems": 50,
  "includeDetails": false,
  "includeReviews": false,
  "maxReviewsPerProduct": 10,
  "requestDelayMs": 300,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `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 = {
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("discreet_watermelon/21vek-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": [] }

# Run the Actor and wait for it to finish
run = client.actor("discreet_watermelon/21vek-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 '{
  "startUrls": []
}' |
apify call discreet_watermelon/21vek-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,discreet_watermelon/21vek-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/fKBAdaDQRaUEeuoEp/builds/H3YsmYcxaUc2P2uJ0/openapi.json
