# eMAG Multi-Market Product & Price Scraper (`vexaloom-labs/emag-multi-market-product-and-price-scraper`) Actor

Search, browse or fetch product details across eMAG's Romania, Bulgaria, Hungary and Poland storefronts: prices in local currency, discount percentage, ratings, stock status, seller and specifications.

- **URL**: https://apify.com/vexaloom-labs/emag-multi-market-product-and-price-scraper.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## eMAG Multi-Market Product & Price Scraper

Monitor eMAG across Romania, Bulgaria and Hungary without a login, cookie or API key. Search a keyword, walk a category, open one product, or compare every seller on a product page. The output is one clean dataset with local prices in RON, EUR or HUF, the 30-day lowest price, discount depth, rating, review count, stock wording, seller, offer counts, category, image and product URL.

### Modes

| Mode | What it returns | Required field |
|---|---|---|
| `searchProducts` | Paginated keyword results | `query` |
| `browseCategory` | Paginated category or filtered listing | `categoryUrl` |
| `getProductDetails` | One product with description, brand, specs and optional seller offers | `productUrl` |
| `getProductOffers` | One row per seller offer: buybox and every competing marketplace seller | `productUrl` |

`productUrl` accepts a full URL or a path containing `/pd/` for product details. Offers mode also accepts a bare product code such as `DR3HHTYBM`. A full eMAG URL also selects its own market, so a `emag.bg` link is read from Bulgaria even when `market` says `ro`.

### Markets

| Code | Storefront | Currency |
|---|---|---|
| `ro` | emag.ro | RON |
| `bg` | emag.bg | EUR |
| `hu` | emag.hu | HUF |

Prices and price filters always use the storefront's live currency. Bulgaria switched to EUR in 2026, so the actor reads the currency from each response instead of assuming BGN.

### Filters and sorting

- `minPrice` / `maxPrice` in the local currency. An inverted range returns zero records with a clear status message instead of crashing.
- `minRating` keeps products rated at least 1-5 stars; products without a rating are excluded when this is set.
- `inStockOnly` keeps only records that can be ordered now. Filtering is applied on top of the source response, so the actor keeps paginating until it reaches `maxItems` or the source runs out.
- `sortBy` supports relevance, price ascending, price descending, review count and discount percentage. eMAG has no server-side "highest rating" sort; the old `rating` value is accepted for saved tasks and mapped to review count in code.

### Output fields

- `productId`, `partNumberKey`, `mpn` - eMAG numeric ID and product codes
- `name`, `brand`, `description`, `specifications`, `category`, `categoryPath`
- `price`, `originalPrice`, `lowestPrice30Days`, `discountPercent`, `currency` - eMAG's published discount when no original price is visible
- `rating`, `reviewCount`
- `availability`, `availabilityCode`, `inStock`
- `seller`, `sellerId`, `offerId`, `isBuybox`, `returnPeriodDays`
- `offersCount`, `otherOffersCount`, `otherOffersMinPrice`, `offers`
- `campaigns`, `imageUrl`, `url`, `market`, `scrapedAt`

Empty values are omitted. A field the source does not publish for a given product is absent, never `null` or a placeholder.

### Examples

Search laptops and keep only 4-star products under 3,000 RON:

```json
{
  "mode": "searchProducts",
  "query": "laptop",
  "market": "ro",
  "maxPrice": 3000,
  "minRating": 4,
  "sortBy": "price_asc",
  "maxItems": 100
}
```

Browse a Bulgarian category with a price band:

```json
{
  "mode": "browseCategory",
  "categoryUrl": "/laptopi/c",
  "market": "bg",
  "minPrice": 500,
  "maxPrice": 1500,
  "sortBy": "reviews",
  "maxItems": 200
}
```

Compare every seller on one product:

```json
{
  "mode": "getProductOffers",
  "productUrl": "https://www.emag.ro/laptop-lenovo-v15/pd/DR3HHTYBM/",
  "market": "ro"
}
```

### Pagination and limits

eMAG serves 60 products per listing page and caps a listing at 100 pages. The actor follows those pages, deduplicates by product code and stops at `maxItems` (1-1000) or when the source is exhausted. The default prefill is one small search with 20 products.

### Data source

The actor reads eMAG's own public storefront endpoints: the JSON listing endpoint behind the search and category pages, the product page's structured data, and the multi-offer block shown on product pages. No account, cookie, credential or user proxy is required. A translation mirror is used only when a storefront blocks the direct request; the actor never needs a proxy configuration from the user.

### Compatibility with saved tasks

Existing tasks keep working. The old `searchQuery`, `categoryPath`, `productCode`, `maxResults`, `priceMin` / `priceMax`, `ratingMin`, `inStock` and `sort: "rating"` keys are read from the raw input and mapped in code even though they no longer appear in the input form. No output field was removed or renamed.

### FAQ

**Do I need an eMAG account?** No. Only public product, price and seller data is read.

**Which currency will I get?** The currency eMAG shows for that storefront at run time: RON, EUR or HUF.

**Why are some fields missing on a search row?** Listing pages expose card-level data. Brand, description, specifications and the full offer table live on the product page, so use `getProductDetails` or `getProductOffers` for those.

**What does the 30-day low mean?** It is eMAG's own lowest-price-in-the-last-30-days figure, published under EU pricing rules. It is omitted when eMAG does not show it.

**How fresh is the data?** Every run reads the live storefront; prices, stock and seller offers reflect the moment of the run.

**Are reviews included?** The actor returns rating and review count, not review text.

**What happened to eMAG Poland?** eMAG closed its Polish storefront: `emag.pl` now redirects to `emag.ro` and has no product catalogue. A saved task that still sends `market: "pl"` gets a clear status message instead of wrong-currency data; choose `ro`, `bg` or `hu`.

# Actor input Schema

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

What to scrape: a keyword search, a category page, one product, or the seller offers for one product.

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

Keyword or phrase to search for (mode=searchProducts). Use the market's language for the best results.

## `categoryUrl` (type: `string`):

eMAG category URL or path, e.g. /laptopuri/c or https://www.emag.ro/laptopuri/c (mode=browseCategory). Use a path from the selected market.

## `productUrl` (type: `string`):

Full eMAG product URL, a path containing /pd/, or a product code such as DR3HHTYBM (mode=getProductDetails or getProductOffers).

## `market` (type: `string`):

Which eMAG storefront to use. A full product or category URL overrides this value.

## `sortBy` (type: `string`):

Result order for searchProducts and browseCategory. Reviews and discount are eMAG's own server-side sorts.

## `minPrice` (type: `number`):

Keep products at or above this price in the market's currency (RON, EUR or HUF).

## `maxPrice` (type: `number`):

Keep products at or below this price in the market's currency.

## `minRating` (type: `string`):

Keep products rated at least this many stars. Products with no rating are excluded when a minimum is set.

## `inStockOnly` (type: `boolean`):

Keep only products that can be ordered right now.

## `includeOffers` (type: `boolean`):

For mode=getProductDetails, add the buybox and competing seller offers to each product record. Ignored by the other modes.

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

Maximum products to return for searchProducts and browseCategory (1-1000). Detail and offers modes return one product or all of its offers.

## Actor input object example

```json
{
  "mode": "searchProducts",
  "query": "laptop",
  "categoryUrl": "/laptopuri/c",
  "market": "ro",
  "sortBy": "relevance",
  "minRating": "0",
  "inStockOnly": false,
  "includeOffers": true,
  "maxItems": 20
}
```

# Actor output Schema

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

Default dataset with every scraped product, detail row or seller offer.

# 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": "searchProducts",
    "query": "laptop",
    "categoryUrl": "/laptopuri/c",
    "market": "ro",
    "sortBy": "relevance",
    "minRating": "0",
    "inStockOnly": false,
    "includeOffers": true,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/emag-multi-market-product-and-price-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 = {
    "mode": "searchProducts",
    "query": "laptop",
    "categoryUrl": "/laptopuri/c",
    "market": "ro",
    "sortBy": "relevance",
    "minRating": "0",
    "inStockOnly": False,
    "includeOffers": True,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/emag-multi-market-product-and-price-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 '{
  "mode": "searchProducts",
  "query": "laptop",
  "categoryUrl": "/laptopuri/c",
  "market": "ro",
  "sortBy": "relevance",
  "minRating": "0",
  "inStockOnly": false,
  "includeOffers": true,
  "maxItems": 20
}' |
apify call vexaloom-labs/emag-multi-market-product-and-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/emag-multi-market-product-and-price-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/NvOnD7WXAJJki6UFA/builds/XNYqy1kEmkdb2w3aL/openapi.json
