# eMAG Scraper (`mina_safwat/emag-scraper`) Actor

Scrapes eMAG product listings — price, rating, reviews and category — across Romania, Bulgaria and Hungary.

- **URL**: https://apify.com/mina\_safwat/emag-scraper.md
- **Developed by:** [Mina](https://apify.com/mina_safwat) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/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 Scraper

Collect product listings from eMAG — the largest online retailer in Romania,
Bulgaria and Hungary — with prices, ratings, reviews and categories.

### How to use it

1. Go to eMAG and search, or open a category you care about.
2. Narrow it down with the filters on the page — brand, price range, rating,
   availability, delivery.
3. Copy the address from your browser's address bar.
4. Paste it into **eMAG links** and run the Actor.

Every filter you set is respected, because the Actor follows the link you give
it. Paste several links at once, one per line — Romanian, Bulgarian and
Hungarian searches can run in the same job and land in the same table.

### What you get

For every product:

- Full product name
- Price in local currency, and the price before the discount where there is one
- Star rating and number of reviews
- Category and the full category path
- Whether it qualifies for eMAG Genius delivery
- Product photo and a direct link to the product page
- The country it was listed in

### What you can do with it

- Track competitor prices and how often they change
- Watch a category for new arrivals or price drops
- Compare what the same product costs in Romania, Bulgaria and Hungary
- Find the best-rated products in a category and what they charge
- Build a price history by running the same search on a schedule

### Good to know

eMAG shows up to 60 products per page. Set **Max results per link** to control
how far each link is followed.

Ratings only appear for products that have been reviewed, so newer items come
through without one.

Product names come in the language of the site you scraped.

# Actor input Schema

## `search_urls` (type: `array`):

Search or category links, one per line. Search on eMAG with whatever filters you want — brand, price range, rating, availability — then copy the address bar. Every filter in the link is honoured, and the country is taken from the link too, so you can mix Romania, Bulgaria and Hungary in one run.

## `max_results_per_search` (type: `integer`):

Stops after this many products for each link. eMAG shows up to 60 per page.

## `proxy_country` (type: `string`):

A 2-letter country code. Leave empty and each link runs from an address in its own country.

## Actor input object example

```json
{
  "search_urls": [
    "https://www.emag.ro/search/laptop",
    "https://www.emag.bg/search/telefon"
  ],
  "max_results_per_search": 200
}
```

# Actor output Schema

## `dataset` (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 = {
    "search_urls": [
        "https://www.emag.ro/search/laptop",
        "https://www.emag.bg/search/telefon"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mina_safwat/emag-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 = { "search_urls": [
        "https://www.emag.ro/search/laptop",
        "https://www.emag.bg/search/telefon",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/emag-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 '{
  "search_urls": [
    "https://www.emag.ro/search/laptop",
    "https://www.emag.bg/search/telefon"
  ]
}' |
apify call mina_safwat/emag-scraper --silent --output-dataset

```

## MCP server setup

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