# Bulgaria Grocery Prices: Supermarket Price Search (`yappman/bulgaria-grocery-prices`) Actor

Search Bulgarian supermarket prices by product name or category, or look up a barcode, in the daily price files that nine chains (Billa, Lidl, Metro and more) report to the consumer protection commission. One row per product per shop: euro price, promotion price, settlement code, date, source.

- **URL**: https://apify.com/yappman/bulgaria-grocery-prices.md
- **Developed by:** [Russell Yapp](https://apify.com/yappman) (community)
- **Categories:** E-commerce, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 rows

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/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

## Bulgaria Grocery Prices

Look up Bulgarian supermarket prices by words in the product name, by category number, or by barcode. The Actor reads the daily price file that the Commission for Consumer Protection (KZP) publishes on its price-collection portal (open data), a ZIP with one list per trader, and returns the rows of nine grocery chains. Each row is one product in one shop, with the retail price in euro (the files carry no currency label; rows are labelled `EUR`), any promotion price, the settlement code of the shop, the file date and the source. **A chain reports a price for each of its shops; the price is the one that shop reported, and another shop of the same chain may show another price.** Not affiliated with or endorsed by KZP, the Government of Bulgaria or any retailer. No warranty of rights or accuracy.

**Licence status.** No licence has been granted for these files. KZP's website terms say the content of its site may be used freely and requires only citation; they do not name commercial reuse or these files, and the open-data page carries an "all rights reserved" footer. KZP has been asked in writing and has not answered. Every row carries this note.

**На български:** Цени на хранителни стоки в България: търсене по ключови думи от името на продукта, по категория или по баркод. Данните са от ежедневните ценови файлове, които търговските вериги подават на Комисията за защита на потребителите (КЗП). Всеки ред представя продукт в конкретен магазин: цена в евро, промоционална цена, код по ЕКАТТЕ, дата на файла и източник. Таксуването е на събитие: пускане 0,005 USD, всеки прочетен ценови списък от търговска верига 0,003 USD и всеки ред 0,002 USD. За тези файлове не е предоставен лиценз; КЗП е запитана писмено и все още не е отговорила. Не сме свързани с КЗП, правителството на Република България или който и да е търговец, нито сме одобрени или подкрепяни от тях. Не гарантираме правата върху информацията или нейната точност.

### What it costs

You pay per event (pay per event pricing; prices in US dollars):

| Event | Price | When |
| --- | --- | --- |
| `run` | $0.005 | once per run, with the first chain list read |
| `chainFile` | $0.003 | for each chain's list read and checked, even if nothing in it matches |
| `row` | $0.002 | for each row in your dataset |

Example: one search over all 9 covered chains with up to 100 rows: $0.005 + 9 × $0.003 + 100 × $0.002 = **$0.232**. One barcode at two named chains, 2 rows: $0.005 + 2 × $0.003 + 2 × $0.002 = **$0.015**.

- The default `chains` (empty) reads every covered chain: up to 9 `chainFile` events, even for a barcode that matches nothing. Name the chains you need to pay for fewer.
- **`maxItems` caps the rows in every mode** (default 100, at most 10,000), counted across all chains read. A chain's list holds one price per shop, so one barcode can match several hundred rows at one chain; the cap and your spending limit stop the run. Reading stops once `maxItems` rows are stored, and chains not yet read are not charged.
- A list that cannot be read, is too large, or is missing from the day's file is **never charged**. If no selected chain can be read, the run fails and nothing is charged.
- Your spending limit stops the run cleanly when it is reached. The two charges for a run's first list (`run`, then `chainFile`) are separate calls to the platform; if the limit is lowered between them, `run` can be charged without its `chainFile`, at most $0.005 once per run.
- If the platform restarts a run part way, the run compares the platform's own count of charged rows with its progress record, so a row is normally stored and charged once. In the unlikely case that the platform also loses the run's own key-value store during a restart, you are not charged for more chain lists than were read, but a list already paid for may be charged again, and rows already stored may be stored and charged again.
- The daily file is about 17 MB (the 19 November 2026 file). It is downloaded once per run, whatever chains you choose.

### Example input

```json
{
  "mode": "barcode",
  "barcodes": ["3800009401894"],
  "chains": ["zhanet"],
  "maxItems": 50
}
```

```json
{
  "mode": "search",
  "query": "мляко 1л",
  "settlements": ["68134"],
  "maxItems": 100
}
```

```json
{
  "mode": "category",
  "category": "6",
  "chains": ["t-market"],
  "maxItems": 100
}
```

The input fields are `mode` (`barcode`, `search` or `category`), `barcodes`, `query`, `category`, `chains`, `settlements`, `listDate` and `maxItems`.

- **barcode** (default): up to 100 barcodes of 8, 12 or 13 digits; the GS1 check digit is verified and shorter codes are held as 13 digits with leading zeros. **Most rows in the files carry a retailer's own product code, not a barcode**, so many barcodes match nothing. In the file of 19 November 2026, of the nine covered chains only Metro and Zhanet published codes with the shape and check digit of a 12 or 13-digit barcode (about 740 distinct codes), and no such code appeared at two chains; the other seven chains published their own codes (Billa, for example, mostly 8-digit or letter-and-digit codes). **Search and category modes are the way to compare chains**; barcode mode suits a barcode you already know one of these chains publishes. A code a chain publishes with a valid check digit is reported as a barcode, and a retailer's own code can pass that check by chance (about one in ten), so a `valid` barcode is not proof that it is one.
- **search**: words in the product name, in Cyrillic or Latin letters (case ignored; a Latin query such as `mlyako` finds `мляко`, by the streamlined transliteration used in Bulgaria); every word must appear.
- **category**: the category number as the files give it (1 to 3 digits). KZP's category names are not in the files, so the Actor takes the number.
- `settlements`: up to 20 settlement codes. The files give each shop's settlement as a five-digit code (shorter codes are padded with zeros); only rows from those settlements are kept. The code is the national EKATTE code of the settlement (for example 68134 is Sofia). The Actor does not translate a code into a town name.
- `listDate`: `YYYY-MM-DD`, from 14 days ago up to today (Bulgarian time). Empty reads yesterday's file, or the day before if yesterday's is not published yet. The portal lists the last 14 days.

### Quick spec for AI agents

- **Purpose:** look up Bulgarian supermarket prices in the daily price file that retailers report to the Commission for Consumer Protection (KZP).
- **`mode`:** `search` needs `query` (Cyrillic or Latin); `category` needs `category` (a number); `barcode` needs `barcodes` (8, 12 or 13 digits with a valid GS1 check digit; few codes in the files are barcodes).
- **Other inputs:** `chains` (keys from the table below; empty means all nine), `settlements` (five-digit settlement codes), `listDate` (`YYYY-MM-DD`), `maxItems` (1 to 10,000, default 100, all modes).
- **Output:** one dataset row per product per shop, with `price` and `promoPrice` in euro, `settlementCode`, `storeId`, `listDate`, `absenceReason` and the source fields. A `RUN_SUMMARY` record names every chain skipped and why, and why a barcode gave no row.
- **Cost:** `run` $0.005 once, `chainFile` $0.003 for each chain list read, `row` $0.002 for each row. Empty `chains` reads all nine, so name the ones you need.
- **Reading the result:** the price is the one that shop reported for the file date. The Actor makes no claim about which shop is cheapest, only what each list shows.

Minimal inputs:

```json
{ "mode": "search", "query": "мляко", "maxItems": 10 }
```

```json
{ "mode": "category", "category": "6", "chains": ["t-market"], "maxItems": 10 }
```

### Chains covered

A chain is read when the day's file holds a list under its trade name from the chain's own company, and only the chains below, whose list shape was captured on 20 November 2026, are read. A list that carries a chain's name from another company is skipped and counted in `RUN_SUMMARY`, never published as the chain. Every other trader in the file (pharmacies, DIY shops, small and sole traders) is never opened.

| Key | Chain |
| --- | --- |
| `billa` | Billa |
| `lidl` | Lidl Bulgaria |
| `metro` | Metro Bulgaria |
| `fantastico` | Fantastico (the list of its operating company) |
| `t-market` | T Market |
| `patsoni` | Patsoni |
| `zhanet` | Zhanet |
| `hit-max` | HIT-MAX |
| `ebag` | eBag (online) |

The Actor makes two requests to one host (the portal's `robots.txt`, then the day's ZIP; three when yesterday's file is not yet published and the day before is read), follows no redirect, uses no proxy, and stops at once on a refusal. Each run's `RUN_SUMMARY` names every chain skipped and why, and says why a barcode or a chain gave no row (`absence`). The Actor does not read the portal's listing page.

### Output

One row per product per shop: `barcode`, `barcodeCheck` (`valid`, `invalid` or `not-a-barcode`), `barcodeScope` (`global`, `in-store` or `unknown`), `productCode`, `productName`, `categoryCode`, `chain`, `chainKey`, `storeId`, `settlementCode`, `price`, `promoPrice`, `currency`, `onPromotion`, `absenceReason`, `listDate`, and the source fields `source`, `listPage`, `downloadedAt`, `changes`, `licenceNote`, `disclaimer`.

- `price` and `promoPrice` are numbers in euro (`currency` is `EUR`: the files carry no currency label, and rows are labelled `EUR` because Bulgaria's currency is the euro since 1 January 2026) or empty. A promotion price of zero or blank in the file means no promotion and is returned as empty. A row with only a promotion price has an empty `price` and `absenceReason` `regular-price-not-published`; otherwise `absenceReason` is empty. A row with neither price is dropped.
- `storeId` is a 10-character id for one shop of one chain, the same on every day. It is a plain hash of the chain and the shop text in the file, so it does not show the shop's name, but anyone who holds a shop's name could compute it. The shop's name and address, the company's name and its registration number are never output.
- `productCode` is the retailer's own code as published; `barcode` is filled only when that code has the shape and check digit of a barcode. Codes starting 20 to 29, 02, 04, 98 or 99 are a retailer's own (`barcodeScope: in-store`); an 8-digit code has scope `unknown`.
- `onPromotion` is true when the promotion price is below the retail price.
- The Actor makes no claim about which shop is cheapest, only what each list shows.
- A text value (or a barcode) that looks like an email address or phone number is replaced by `[removed: contact-like text]` (the row and its prices are kept). A text starting with `=`, `+`, `-` or `@` gets a leading apostrophe so a spreadsheet never runs it.

### FAQ

**Is this the price in my local shop?** Only if it is that shop's row. The file lists every shop of a chain; use `settlements` to keep the shops of a town, and `storeId` to follow one shop over time.

**How fresh is it?** Each run reads the file for the date in `listDate`. The portal's file for a day appears just after midnight Bulgarian time, so the newest file is yesterday's.

**Why is a chain missing from my results?** The day's file may hold no list for it, the list may not have been readable, or your `maxItems` was reached first. `RUN_SUMMARY` names each chain skipped, with the reason.

**Why does my barcode match nothing?** Most product codes in the files are the retailer's own codes (see the barcode mode note above), so a barcode printed on a pack usually matches nothing at most chains. Try search mode with words from the product name. `RUN_SUMMARY` `absence` says whether the barcode was refused (wrong check digit or length) or was not in the lists read.

**What licence is on the data?** None has been granted; see the licence status above. We pass the data on as published, with the source on every row, and give no warranty of rights. This is not legal advice, so check your own use.

**Does it store data between runs?** No. Each run reads the file once and writes your rows to your own dataset, plus a run summary (`RUN_SUMMARY`) and a progress record (`PROGRESS`, used only if the platform restarts the run) in the run's own key-value store. Nothing is written to disk.

**Can I schedule it?** Yes, as an Apify schedule or task. A daily search or category run at named chains costs the least for tracking prices.

### Source

Source: the daily price file of the Commission for Consumer Protection (KZP) of Bulgaria, from its price-collection portal (open data), as each retailer reported it. The file date and the portal's page are on every row, and the changes are listed in `changes`. The data comes with no guarantee of accuracy or suitability. Not affiliated with or endorsed by KZP, the Government of Bulgaria or any retailer. We hold no agreement with, or permission from, KZP or any retailer.

# Actor input Schema

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

Barcode finds a product by its barcode; search matches words in the product name (Cyrillic or Latin letters); category matches a KZP category number.

## `barcodes` (type: `array`):

Up to 100 barcodes of 8, 12 or 13 digits; the GS1 check digit is verified. Most Bulgarian price-file rows carry a retailer's own product code instead of a barcode, so many barcodes match nothing.

## `query` (type: `string`):

Cyrillic or Latin letters (a Latin query such as mlyako finds мляко); case is ignored.

## `category` (type: `string`):

The category number as the price files give it (1 to 3 digits).

## `chains` (type: `array`):

Chain keys from the covered list; empty means every covered chain. Each chain read costs one chainFile event, even when nothing matches.

## `settlements` (type: `array`):

Keeps only rows from shops in these settlements, by the five-digit code the price files use (for example 68134 for Sofia). Empty keeps every settlement.

## `listDate` (type: `string`):

YYYY-MM-DD, from 14 days ago up to today (Bulgarian time). Empty reads yesterday's file, or the day before if yesterday's is not published yet.

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

The most rows returned across all chains (1 to 10,000), in every mode. A barcode can sit in several hundred shops of one chain, and each row is one row event.

## Actor input object example

```json
{
  "mode": "search",
  "query": "мляко",
  "chains": [
    "billa",
    "lidl",
    "metro"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

## `runSummary` (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 = {
    "mode": "search",
    "query": "мляко",
    "chains": [
        "billa",
        "lidl",
        "metro"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("yappman/bulgaria-grocery-prices").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 = {
    "mode": "search",
    "query": "мляко",
    "chains": [
        "billa",
        "lidl",
        "metro",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("yappman/bulgaria-grocery-prices").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 '{
  "mode": "search",
  "query": "мляко",
  "chains": [
    "billa",
    "lidl",
    "metro"
  ],
  "maxItems": 10
}' |
apify call yappman/bulgaria-grocery-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yappman/bulgaria-grocery-prices"
        }
    }
}
```

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/Cn0Ke1Am3YKVTjnnw/builds/ia7POcZKdtgnZaILp/openapi.json
