# Labirint.ru Book Catalog Scraper (`bovi/labirint-scraper`) Actor

Collect Labirint.ru book records from public pages. Get titles, prices, URLs, and availability. Run with keywords and maxResults; no login or buyer API key is required. Pricing: $0.0075 per dataset item plus $0.00005 per Actor Start on Free.

- **URL**: https://apify.com/bovi/labirint-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.50 / 1,000 labirint.ru book catalog scrapers

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

## Labirint.ru Book Catalog Scraper

Open the Actor in Apify and start a run to extract public book search and catalog cards from Labirint.ru; no login or buyer API key is required. On the Free plan, pricing is $0.0075 per scraped dataset result and $0.00005 per Actor Start event.

- Monitor book prices in RUB, including the original price when the card shows one
- Search catalog cards by phrase for book discovery and catalog research
- Build product lists with IDs, titles, URLs, publishers, series, and categories
- Use raw availability statuses and cover image URLs in downstream catalog workflows

### What you get

Each dataset item represents a book card parsed from Labirint.ru page HTML. A card must contain a product ID, title, product URL, and price to be written to the dataset. Optional values are included when the page exposes them.

| Field | Type | Description | Output behavior |
|---|---|---|---|
| `product_id` | string | Labirint.ru product identifier | Always present |
| `title` | string | Book title | Always present |
| `url` | string | Product URL | Always present |
| `price` | number | Current price in RUB | Always a number in an emitted record; not `null` or empty |
| `currency` | string | Currency for `price` | Set to `RUB`; not `null` or empty |
| `original_price` | number | Original price in RUB | Included when shown and different from the current price; otherwise omitted |
| `author` | string | Author name | Included when present on the card; otherwise omitted |
| `publisher` | string | Publisher | Included when present on the card; otherwise omitted |
| `series` | string | Book series | Included when present on the card; otherwise omitted |
| `category` | string | Main category name | Included when present on the card; otherwise omitted |
| `parent_category` | string | Parent category name | Included when present on the card; otherwise omitted |
| `availability_status` | string | Labirint.ru's raw availability status | Included when exposed by the card; otherwise omitted |
| `image_url` | string | Cover image URL | Included when a non-empty cover image is available; otherwise omitted |

The Actor deduplicates records by `product_id`. It requests the first search page and requests later `?page=N` pages only when more records are needed.

### Sample output

```json
{
  "product_id": "672786",
  "title": "Детская книга",
  "url": "https://www.labirint.ru/books/672786/",
  "price": 1166,
  "currency": "RUB",
  "publisher": "Livebook",
  "series": "Поэзия",
  "category": "Отечественная поэзия для детей",
  "parent_category": "Книги для детей",
  "availability_status": "3",
  "image_url": "https://imo10.labirint.ru/books/672786/cover.jpg/363-0"
}
```

### Pricing

The Actor uses pay-per-event billing. The primary event is one `apify-default-dataset-item` event for each scraped result with all fields. You pay only for the events listed below. This Actor does not use the Pay per event + usage option, so the platform usage of your runs (compute, proxy traffic and storage) is not billed to you separately.

| Event | Unit | Free-plan price |
|---|---|---:|
| `apify-default-dataset-item` | One scraped dataset result | $0.0075 (Free plan) |
| `apify-actor-start` | One Actor Start event per GB of run memory, minimum one event | $0.00005 (Free plan) |

On the Free plan, 1,000 results cost 1,000 × $0.0075 = $7.50; 10,000 results cost 10,000 × $0.0075 = $75.00. Example: **30 results = $0.22505 on Free** when one Actor Start event applies: (30 × $0.0075 + $0.00005).

The Apify Free plan includes $5 of monthly platform usage credit. The $5 credit covers 666 results when one Actor Start event applies.

### How to use

1. Open the Actor in Apify and create a run.
2. Enter a search phrase in `keywords`, such as `детская книга`, to query Labirint.ru's public catalog.
3. Set `maxResults` to the maximum number of unique product records you want returned.
4. Leave `proxyConfiguration` as is: the schema default is Apify Proxy on with the RESIDENTIAL group. To run without a proxy, set `useApifyProxy` to false inside `proxyConfiguration`.
5. Start the run and review the dataset as the Actor parses the first page and follows later pages when additional unique records are needed.
6. Repeat the run through Apify Schedules, using daily runs as a starting point for listing or price-monitoring work.

Example input:

```json
{
  "keywords": "детская книга",
  "maxResults": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
|---|---|---|
| `keywords` | Required search text used for the public Labirint.ru catalog query. An empty search phrase makes the Actor read the public home page. | – |
| `maxResults` | Maximum number of unique book records to write. | `50` |
| `proxyConfiguration` | Apify Proxy configuration. Set `useApifyProxy` to false to run without a proxy. | Apify Proxy on, RESIDENTIAL group |

### Limits and edge cases

| Condition | Behavior | What to do |
|---|---|---|
| A product card lacks a product ID, title, or price | The card is skipped and is not written to the dataset | Check the search phrase in a browser on Labirint.ru; other cards are unaffected |
| The same product ID appears more than once | Only one record per product ID is returned | No action; deduplication is automatic |
| `maxResults` is reached | The Actor stops adding records, even if more pages exist | Increase `maxResults` in a new run |
| The catalog has fewer parseable cards than requested, or a page yields no new unique records | Paging stops. With nothing written, the run ends as Succeeded with an empty dataset and logs a warning; otherwise the dataset is partial | Try a different search phrase |
| A request raises an error | Retried up to three attempts. A final fetch failure fails the run; records already pushed stay in the dataset and later pages are not processed | Retry the run; keep the default Apify Proxy on |
| A response returns a 4xx status other than 429 | Treated as permanent and not retried; the run fails | Retry later |
| `maxResults` is zero or negative | The Actor returns without writing results | Provide a positive integer |
| `maxResults` cannot be converted to an integer | Falls back to `50` | Provide a positive integer |
| A run is aborted or times out | Rows already pushed remain; later rows are not added | Start a new run |

### FAQ

#### How much does it cost to scrape Labirint.ru books?

You pay per scraped dataset result and per Actor Start event; see Pricing for the Free plan prices and the 30-result example.

#### What should I do if a run is empty or fails?

See Limits and edge cases for each condition and the action to take.

#### Is it legal or allowed to extract public Labirint.ru data?

This Actor reads public book-card data from Labirint.ru pages. Whether a particular use is legal or allowed under the source's ToS depends on the buyer's use case, applicable law, and the source terms that apply to that use.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

## `keywords` (type: `string`):

Russian or other text to search in Labirint.ru's public book catalog.

## `maxResults` (type: `integer`):

Maximum number of unique book records to collect.

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

Optional Apify Proxy settings. Turn on the proxy only when you want to route requests through it.

## Actor input object example

```json
{
  "keywords": "детская книга",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with one record per collected book.

# 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 = {
    "keywords": "детская книга",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/labirint-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 = {
    "keywords": "детская книга",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/labirint-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 '{
  "keywords": "детская книга",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/labirint-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/labirint-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/arXfT69NXQIkN6zbm/builds/qwwX75oCg7G34fVkT/openapi.json
