# eMAG Search API Documentation

<p><strong>eMAG Search API Documentation</strong> Search the Romanian (RON) and Bulgarian (EUR) eMAG storefronts. Filter by category, price range, brand, seller and stock, and sort by price or reviews. Each product has a numeric id, a part number key and an offer id, with numeric prices, original price, discount, full-size images, rating, review count and availability. Filters are always honoured: no returned product breaks a requested filter. Page 2 and later use the public /pN path. A page that repeats page 1 ids or reports another page returns an empty list. Cost: 1 credit on the mobile pool, 28 credits on the residential fallback, only for successful requests with results. Failed and empty requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/emag-api/emag_search](https://scrappa.co/docs/emag-api/emag_search)
- **API group:** eMAG API
- **Endpoint:** `GET https://scrappa.co/api/emag/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Search text, for example phone. Required with category or filter_url. |
| `site` | string | No | ro or bg, default ro. Hungary returns 422. |
| `category` | string | No | Public category path or slug from the categories route. |
| `price_from` | number | No | Lowest price in the site currency. No returned product is cheaper. |
| `price_to` | number | No | Highest price in the site currency. No returned product is more expensive. |
| `brand` | string | No | Only products of this brand are returned. |
| `sort` | string | No | relevance, price_asc, price_desc or reviews_desc. |
| `page` | integer | No | Page number, default 1. |

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Error | The site is not ro or bg. |
| 502 | Error | eMAG answered with a wall after fallback. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
