# Emag — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access product data from eMAG.ro, Romania's largest online retailer. Search by keyword, browse categories, retrieve product details and reviews, and look up seller information.

**Category:** E-commerce | **Website:** [emag.ro/](https://emag.ro/) | **Docs:** [parse.bot/marketplace/2924100d-98cf-4aef-90d4-abf643a730ff/emag-ro-api](https://parse.bot/marketplace/2924100d-98cf-4aef-90d4-abf643a730ff/emag-ro-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_category_products

Browse products in a specific eMAG category by slug. Returns paginated product listings sorted by the specified criteria. Supports filtering by vendor/seller ID or excluding a specific vendor. Common category slugs include laptopuri, televizoare, telefoane-mobile, seturi-mobila-bucatarie. The slug is the URL path segment used on emag.ro for that category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug as used in the eMAG URL path (e.g. laptopuri, televizoare, telefoane-mobile, seturi-mobila-bucatarie) |
| `direction` | string | No | Sort direction |
| `exclude_vendor_id` | string | No | Numeric vendor/seller ID to exclude from results (e.g. 1 to exclude eMAG). Products delivered by this vendor are filtered out client-side. Mutually exclusive with vendor_id in practice. |
| `limit` | integer | No | Max results per page |
| `page` | integer | No | Page number (starts at 1) |
| `sort` | string | No | Sort field |
| `vendor_id` | string | No | Numeric vendor/seller ID to filter results to products delivered by that vendor (e.g. 1 for eMAG, 18752 for vidaXL). Available vendor IDs appear in the vendor filter on eMAG category pages. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","direction":"<string>","exclude_vendor_id":"<string>","limit":"<integer>","page":"<integer>","sort":"<string>","vendor_id":"<string>"}'
```

### get_product_details

Retrieve full details for a single product including specifications, pricing, images, and ratings. Accepts either a full eMAG product URL or a PNK (part number key) code. The PNK is available from search_products and get_category_products results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url_or_id` | string | Yes | Full product URL (e.g. https://www.emag.ro/product-name/pd/DGZPVY3BM/) or PNK code (e.g. DGZPVY3BM) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url_or_id":"<string>"}'
```

### get_product_reviews

Retrieve customer reviews for a product. Returns review items with ratings, content, user info, rating distribution, and positive rating percentage. Accepts either a full product URL or a PNK code.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Reviews per page |
| `page` | integer | No | Page number (starts at 1) |
| `product_url_or_id` | string | Yes | Full product URL or PNK code (e.g. DMFHRPYBM) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","product_url_or_id":"<string>"}'
```

### get_seller_info

Retrieve seller/vendor information including display name, rating score, positive review share percentage, and registered company name. The seller_id and seller_sef_name are available from product listing vendor data on the eMAG website.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `seller_id` | string | Yes | Seller numeric ID (e.g. 1 for eMAG) |
| `seller_sef_name` | string | Yes | Seller SEF name/slug (e.g. emag) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/get_seller_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"seller_id":"<string>","seller_sef_name":"<string>"}'
```

### search_products

Full-text search over eMAG product catalog. Returns paginated product listings with pricing, availability, vendor, and ratings. Supports sorting by popularity, review count, or price. Supports filtering by vendor/seller ID or excluding a specific vendor. Each item includes a PNK code usable with get_product_details and get_product_reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `direction` | string | No | Sort direction |
| `exclude_vendor_id` | string | No | Numeric vendor/seller ID to exclude from results (e.g. 1 to exclude eMAG). Products delivered by this vendor are filtered out client-side. Mutually exclusive with vendor_id in practice. |
| `limit` | integer | No | Max results per page |
| `page` | integer | No | Page number (starts at 1) |
| `query` | string | Yes | Search keyword |
| `sort` | string | No | Sort field |
| `vendor_id` | string | No | Numeric vendor/seller ID to filter results to products delivered by that vendor (e.g. 1 for eMAG, 18752 for vidaXL). Available vendor IDs and names are returned in product listing items as the vendor_id field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-emag-ro-api-2924100d/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"direction":"<string>","exclude_vendor_id":"<string>","limit":"<integer>","page":"<integer>","query":"<string>","sort":"<string>","vendor_id":"<string>"}'
```
