# Vita Pharmacy Price & Availability Monitor (`sashaebashu/vita-monitor`) Actor

Track prices and stock across the Vita pharmacy chain (vitaexpress.ru) — price, availability, out-of-stock (дефектура) detection, and what changed since the last run.

- **URL**: https://apify.com/sashaebashu/vita-monitor.md
- **Developed by:** [Sasha Ebashu](https://apify.com/sashaebashu) (community)
- **Categories:** E-commerce, Integrations, Other
- **Stats:** 2 total users, 1 monthly users, 62.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 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/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Vita Pharmacy Price & Availability Monitor

Track prices, stock and **drug shortages (дефектура)** across **Vita** (vitaexpress.ru) — one of Russia's largest pharmacy chains (~1,200 stores, ~24,700 products).

Most RU pharmacy chains hide their catalogue behind anti-bot walls. Vita's own product pages expose a rich data record — this Actor reads it directly and, in **Monitor mode**, tells you *what changed since the last run*.

### What you get

One row per product, with the fields a pharmacy analyst actually needs:

| Field | Meaning |
|---|---|
| `name`, `fullName`, `productId`, `url` | Product identity |
| `price`, `maxPrice`, `priceCurrency` | Price in ₽ (out-of-stock rows keep the **last known** price) |
| `city`, `cityId` | The city the site rendered (default St. Petersburg / 251). Reported for transparency — Vita's prices and stock are **chain-wide**, not per-city (verified across Самара / СПб / Саратов / Смоленск) |
| `available`, `canSell`, `canDeliver` | Stock & sellability |
| **`defectureProduce`**, **`defectureRus`** | **Vita's own shortage flags** — producer shortage / national shortage. Tells you *why* something is unavailable, not just *that* it is |
| **`mnn`**, `mnnIds` | **Active ingredient(s) (МНН)** — group products across brands |
| `recipe`, `noRecipe`, `pku`, `isTermo`, `isAlcohol`, `isAdult` | Rx & handling flags |
| `maker`, `land`, `form`, `packaging`, `shelfLifeMonths`, `storage` | Manufacturer, country, dosage form, packaging, shelf life, storage conditions |
| `brand`, `category`, `categoryPath`, `image`, `analogsCount` | Merchandising data |

In **Monitor mode**, every row also gets: `changeType` (`new` / `price_up` / `price_down` / `stock_change` / **`delisted`** / **`relisted`** / `unchanged`), `previousPrice`, `previousAvailable`, `firstSeenAt`, `lastConfirmedAt`, and a 30-day price band (`priceLow30` / `priceHigh30`).

**Delisted products are reported, not dropped.** If Vita removes a product (its page starts returning 404), you still get a row — `delisted: true`, `available: false`, `changeType: "delisted"` — carrying the last known name and price from the previous run. A product leaving the catalogue is a signal, not missing data. The delisting is reported **once** — after that it stays `unchanged` until the product returns, which is reported as `relisted`.

### Use it for

- **Price monitoring** — track a competitor's or your own prices; get only what moved (`onlyChanges`).
- **Shortage (дефектура) tracking** — catch products going out of stock, and whether it's a producer/national shortage.
- **Assortment research** — by active ingredient (МНН), manufacturer, country, or dosage form.

### Input

| Option | Description |
|---|---|
| **Product URLs** | Specific `vitaexpress.ru/product/…` pages. Any Vita product URL is normalised. |
| **Crawl the catalogue** | Pull products from Vita's product sitemap (~24.7k). |
| **Catalogue filter** | Narrow the crawl by slug substring — slugs are latin-transliterated (`troksevazin`, `vitamin`, `omega`). |
| **Max products from catalogue** / **Max products** | Keep a run bounded. |
| **Monitor mode** / **Only output changes** | Compare against the previous run; optionally emit only what changed. |
| **Max concurrency** | Parallel page fetches (default 24, max 30). Residential latency (~5 s/request) is the bottleneck, so this scales throughput almost linearly — the default is verified at scale: **1000 products in 3.5 min, zero skips, 4× faster** than concurrency 6. |
| **Proxy** | **Residential Russia is required** (see below) and is the default. |

#### Example

```json
{
  "crawlSitemap": true,
  "productFilter": "vitamin",
  "maxProductsFromSitemap": 200,
  "monitorMode": true,
  "onlyChanges": true
}
````

Run it on a schedule and each run's dataset is a clean list of every vitamin whose price or stock moved.

### Notes & limits

- **Residential RU proxy is required.** Vita rate-limits datacenter IPs (HTTP 503). The Actor defaults to Apify Residential + Russia; keep it that way. If every request fails, the run fails loudly with an explanation rather than returning an empty dataset.
- **Prices are chain-wide, not city-specific.** Verified by switching the site's city (Самара / СПб / Саратов / Смоленск): price, stock and shortage flags come back identical. The `city` field just records which city the site rendered (St. Petersburg by default) — you do not need to run the Actor per city.
- **Out-of-stock products** keep their last known price and are marked `available: false`, with the shortage flags explaining why.
- Vita intermittently 503s even residential IPs; the Actor retries on a rotated session, which clears it — a **1,000-product run completed 1000/1000 with zero skips**.
- **Active ingredient (`mnn`) is only present for medicines and supplements** (~1/3 of the catalogue) — cosmetics, hygiene and food products legitimately have none. Every prescription product carries one.
- One request per product — a full 24.7k catalogue sweep is large (~$20 of residential traffic). Use the filter and the caps, or crawl in batches.

# Actor input Schema

## `productUrls` (type: `array`):

Specific vitaexpress.ru product pages to scrape, e.g. https://vitaexpress.ru/product/troksevazin\_neo\_gel\_dnaruzh\_\_prim\_\_40g/ . Any vitaexpress product URL is normalised to its canonical form.

## `crawlSitemap` (type: `boolean`):

Instead of listing URLs, pull products from Vita's product sitemap (~24.7k products). Narrow with the filter below and cap with 'Max products'. Off by default.

## `productFilter` (type: `string`):

Only crawl product URLs whose slug contains this text (slugs are latin-transliterated, e.g. "troksevazin", "vitamin\_d", "omega"). Leave empty to take the catalogue in order.

## `maxProductsFromSitemap` (type: `integer`):

Cap on how many product pages the sitemap crawl fetches. Keeps a catalogue-wide run bounded (each page is a residential request).

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

Stop after this many products. 0 = no limit.

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

How many product pages to fetch in parallel. Residential latency (~5s/request) is the bottleneck, so this scales throughput almost linearly. The default 24 is verified at scale (1000 products in 3.5 min, zero skips); lower it only if you hit rate limits.

## `monitorMode` (type: `boolean`):

Compare this run against the previous one and label every product: new / price\_up / price\_down / stock\_change / unchanged. 'stock\_change' fires when a product goes out of stock (дефектура) or comes back. Also adds previousPrice, previousAvailable, first-seen/last-confirmed stamps and a 30-day price band. Off by default.

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

With Monitor mode on, skip products whose price and stock did not change — the dataset then contains only what actually moved.

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

vitaexpress.ru blocks datacenter IPs, so this Actor defaults to Apify RESIDENTIAL proxy in Russia. Keep it residential RU.

## Actor input object example

```json
{
  "productUrls": [
    "https://vitaexpress.ru/product/troksevazin_neo_gel_dnaruzh__prim__40g/"
  ],
  "crawlSitemap": false,
  "productFilter": "vitamin",
  "maxProductsFromSitemap": 200,
  "maxItems": 0,
  "maxConcurrency": 24,
  "monitorMode": false,
  "onlyChanges": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "RU"
  }
}
```

# Actor output Schema

## `catalogue` (type: `string`):

Every product with its price and stock.

## `pharma` (type: `string`):

Active ingredient (МНН), producer/national shortage (дефектура) and Rx flags.

## `changes` (type: `string`):

What moved since the previous run (monitor mode).

# 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 = {
    "productUrls": [
        "https://vitaexpress.ru/product/troksevazin_neo_gel_dnaruzh__prim__40g/",
        "https://vitaexpress.ru/product/otrivin_sprey_0_1_10ml/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sashaebashu/vita-monitor").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 = { "productUrls": [
        "https://vitaexpress.ru/product/troksevazin_neo_gel_dnaruzh__prim__40g/",
        "https://vitaexpress.ru/product/otrivin_sprey_0_1_10ml/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sashaebashu/vita-monitor").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 '{
  "productUrls": [
    "https://vitaexpress.ru/product/troksevazin_neo_gel_dnaruzh__prim__40g/",
    "https://vitaexpress.ru/product/otrivin_sprey_0_1_10ml/"
  ]
}' |
apify call sashaebashu/vita-monitor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Vita Pharmacy Price & Availability Monitor",
        "description": "Track prices and stock across the Vita pharmacy chain (vitaexpress.ru) — price, availability, out-of-stock (дефектура) detection, and what changed since the last run.",
        "version": "0.1",
        "x-build-id": "neHd0rbBKnBaijLJA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sashaebashu~vita-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sashaebashu-vita-monitor",
                "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/sashaebashu~vita-monitor/runs": {
            "post": {
                "operationId": "runs-sync-sashaebashu-vita-monitor",
                "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/sashaebashu~vita-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-sashaebashu-vita-monitor",
                "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": {
                    "productUrls": {
                        "title": "Product URLs",
                        "type": "array",
                        "description": "Specific vitaexpress.ru product pages to scrape, e.g. https://vitaexpress.ru/product/troksevazin_neo_gel_dnaruzh__prim__40g/ . Any vitaexpress product URL is normalised to its canonical form.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "crawlSitemap": {
                        "title": "Crawl the catalogue (sitemap)",
                        "type": "boolean",
                        "description": "Instead of listing URLs, pull products from Vita's product sitemap (~24.7k products). Narrow with the filter below and cap with 'Max products'. Off by default.",
                        "default": false
                    },
                    "productFilter": {
                        "title": "Catalogue filter",
                        "type": "string",
                        "description": "Only crawl product URLs whose slug contains this text (slugs are latin-transliterated, e.g. \"troksevazin\", \"vitamin_d\", \"omega\"). Leave empty to take the catalogue in order."
                    },
                    "maxProductsFromSitemap": {
                        "title": "Max products from catalogue",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on how many product pages the sitemap crawl fetches. Keeps a catalogue-wide run bounded (each page is a residential request).",
                        "default": 200
                    },
                    "maxItems": {
                        "title": "Max products",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Stop after this many products. 0 = no limit.",
                        "default": 0
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "How many product pages to fetch in parallel. Residential latency (~5s/request) is the bottleneck, so this scales throughput almost linearly. The default 24 is verified at scale (1000 products in 3.5 min, zero skips); lower it only if you hit rate limits.",
                        "default": 24
                    },
                    "monitorMode": {
                        "title": "Monitor mode (track changes)",
                        "type": "boolean",
                        "description": "Compare this run against the previous one and label every product: new / price_up / price_down / stock_change / unchanged. 'stock_change' fires when a product goes out of stock (дефектура) or comes back. Also adds previousPrice, previousAvailable, first-seen/last-confirmed stamps and a 30-day price band. Off by default.",
                        "default": false
                    },
                    "onlyChanges": {
                        "title": "Only output changes",
                        "type": "boolean",
                        "description": "With Monitor mode on, skip products whose price and stock did not change — the dataset then contains only what actually moved.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "vitaexpress.ru blocks datacenter IPs, so this Actor defaults to Apify RESIDENTIAL proxy in Russia. Keep it residential RU.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "RU"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
