# Hepsiburada API scraper — product detail, search, reviews, offers, categories & sellers on Turkey's leading marketplace (hepsiburada.com), prices in TRY

> Full Hepsiburada product details by `url` or HB code (`sku`): title, brand, price, discount, images, rating, stock, seller (merchant), category, specifications, variants, top reviews, coupon/campaign badges, and all other_offers (every merchant selling the same product).
> ReefAPI engine `hepsiburada` · 6 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/hepsiburada/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /hepsiburada/v1/product/detail — 1 credit
Full Hepsiburada product details by `url` or HB code (`sku`): title, brand, price, discount, images, rating, stock, seller (merchant), category, specifications, variants, top reviews, coupon/campaign badges, and all other_offers (every merchant selling the same product).

**Parameters:**
- `sku` (string, optional) — Hepsiburada product code (HB code) — the HBCV… token in the product URL (…-p-<code>). Take it from search results. Provide sku OR url.
- `url` (string, optional) — Full Hepsiburada product URL — alternative to sku.
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** product{title, brand, price, currency=TRY, original_price, discount_rate, images[], rating, rating_count, in_stock, seller_name (merchant), merchant{}, category, specs[], variants[], top_reviews[], coupon (str|null — public coupon COUNT for this listing, e.g. '3 kupon fırsatı mevcut'; exact amounts are gated behind a logged-in wallet and not exposed), campaign (str|null — real Hepsiburada campaign badge text, e.g. 'Lufian satıcılı ürünlerde %20 indirim'), other_offers[]{merchant_name, price, merchant_rating, free_shipping, coupon_count, campaign}, offer_count}

**Example request body:**
```json
{
  "url": "https://www.hepsiburada.com/-p-HBCV00004X9ZCK"
}
```

### POST /hepsiburada/v1/product/reviews — 1 credit
Paginated customer reviews for a product by `sku` or `url`. Walk every page with `page` to retrieve ALL reviews. Review authors are pre-masked by Hepsiburada (e.g. 'Ahmet K***') — no PII. ~10 reviews per page.

**Parameters:**
- `sku` (string, optional) — Hepsiburada product code (HB code) — the HBCV… token in the product URL (…-p-<code>). Take it from search results. Provide sku OR url.
- `url` (string, optional) — Full Hepsiburada product URL — alternative to sku.
- `page` (integer, optional, default 1) — Review page — 1-BASED (1, 2, 3…); empty page = past the last.
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** summary{rating, rating_count, review_count} + reviews[]{author (masked), rating, date, body} (meta.pagination for paging)

**Example request body:**
```json
{
  "sku": "HBCV00004X9ZCK"
}
```

### POST /hepsiburada/v1/product/offers — 1 credit
Every merchant listing (buybox + other sellers) for a product by `sku` or `url`: compare price, seller rating, shipping and stock across all sellers of the same item.

**Parameters:**
- `sku` (string, optional) — Hepsiburada product code (HB code) — the HBCV… token in the product URL (…-p-<code>). Take it from search results. Provide sku OR url.
- `url` (string, optional) — Full Hepsiburada product URL — alternative to sku.
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** offers[]{merchant_name, merchant_url, price, original_price, discount_rate, currency=TRY, in_stock, quantity, free_shipping, fast_shipping, buybox_order, merchant_rating, merchant_rating_count, merchant_city, merchant_labels[]} (sorted by buybox order then price)

**Example request body:**
```json
{
  "sku": "HBCV00004X9ZCK"
}
```

### POST /hepsiburada/v1/search — 2 credits
Search Hepsiburada products by keyword with optional sort and price/brand filters — returns results with SKU, title, brand, price, list price, rating, image and merchant. Results may be empty for very niche queries; try a broader keyword.

**Parameters:**
- `query` (string, required) — What to search for (Turkish keywords work best).
- `page` (integer, optional, default 1) — Page number (1-BASED: 1, 2, 3…).
- `sort` (string, optional, default "default") — Result ordering. One of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest. [one of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest]
- `price_min` (integer, optional) — Minimum price filter in TRY (optional).
- `price_max` (integer, optional) — Maximum price filter in TRY (optional).
- `brand` (string, optional) — Brand filter — the brand slug, lowercase (e.g. 'asus', 'apple'). Optional.
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** results[]{sku, title, brand, url, price, original_price, discount_rate, rating, rating_count, image, merchant, installment_count}; render flag ('ssr' = full results; 'skeleton' = try a broader keyword); meta.pagination for paging

**Example request body:**
```json
{
  "query": "laptop"
}
```

### POST /hepsiburada/v1/category — 1 credit
Browse a Hepsiburada category page by its path (`category` = '<slug>-c-<id>', e.g. 'laptop-notebook-dizustu-bilgisayarlar-c-98') with optional sort/price filters and pagination. Use it to list everything in a category, not just a keyword match.

**Parameters:**
- `category` (string, required) — Category path '<slug>-c-<id>' or a full category URL. Take the …-c-<id> path from a product's breadcrumb / category link.
- `page` (integer, optional, default 1) — Page number (1-BASED).
- `sort` (string, optional, default "default") — Result ordering. One of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest. [one of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest]
- `price_min` (integer, optional) — Minimum price filter in TRY (optional).
- `price_max` (integer, optional) — Maximum price filter in TRY (optional).
- `brand` (string, optional) — Brand filter — the brand slug, lowercase (e.g. 'asus', 'apple'). Optional.
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** results[]{sku, title, brand, url, price, original_price, discount_rate, rating, image, merchant} + category_id (meta.pagination for paging)

### POST /hepsiburada/v1/seller — 1 credit
Hepsiburada merchant (mağaza) profile + its product catalogue by store slug (`seller`, e.g. 'jollyshop') or full /magaza/<slug> URL. Returns seller info (name, rating, total product count) and a paginated list of the seller's products.

**Parameters:**
- `seller` (string, required) — Store slug (the part after /magaza/, e.g. 'jollyshop') or a full https://www.hepsiburada.com/magaza/<slug> URL.
- `page` (integer, optional, default 1) — Product page within the store (1-BASED).
- `sort` (string, optional, default "default") — Result ordering. One of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest. [one of: default, price_asc, price_desc, best_seller, most_reviewed, highest_rated, discount, newest]
- `price_min` (integer, optional) — Minimum price filter in TRY (optional).
- `price_max` (integer, optional) — Maximum price filter in TRY (optional).
- `max_rotations` (integer, optional, default 8) — Advanced: IP-rotation attempts for difficult requests (1–14, default 8 — leave unchanged for typical use).

**Returns:** seller{merchant_id, name, url, rating, rating_count, total_product_count, official, city} + products[]{sku, title, price, image, ...} (meta.pagination for paging)

## More
- Try it live, no code: https://reefapi.com/playground?engine=hepsiburada
- Human docs page: https://reefapi.com/docs/hepsiburada
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
