# Hepsiburada — 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.

> Search and browse products on Hepsiburada with access to detailed product information, pricing, customer reviews, categories, and active campaigns. Retrieve comprehensive product data to power shopping, research, or price-comparison applications.

**Category:** E-commerce | **Website:** [hepsiburada.com/](https://hepsiburada.com/) | **Docs:** [parse.bot/marketplace/99357ed2-eb2a-40dd-b097-f133b12fab0b/hepsiburada-com-api](https://parse.bot/marketplace/99357ed2-eb2a-40dd-b097-f133b12fab0b/hepsiburada-com-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-hepsiburada-com-api-99357ed2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_campaigns

Retrieve active promotional campaigns from Hepsiburada. Returns campaign page layout with campaign cards containing titles, images, discount details, and URLs. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hepsiburada-com-api-99357ed2/get_campaigns \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_tree

Retrieve the full navigation category hierarchy from Hepsiburada. Returns a tree of category objects with IDs, titles, URLs, and nested children. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hepsiburada-com-api-99357ed2/get_category_tree \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Retrieve full product details including name, brand, price, category hierarchy, description HTML, specifications, and review summary. Accepts a product ID (HBC format), SKU (HBCV format), full product URL, or slug path.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Product identifier. Accepts a bare product ID (e.g. 'HBC0000DLDY3M'), a full Hepsiburada product URL, or a product slug path. |

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

### get_product_reviews

Retrieve customer reviews for a product with ratings, comments, and review metadata. Supports pagination (server returns ~5 reviews per page). Accepts a product ID, SKU, full URL, or slug path.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for review pagination (1-based). |
| `url` | string | Yes | Product identifier. Accepts a bare product ID (e.g. 'HBC0000DLDY3M'), a full Hepsiburada product URL, or a product slug path. |

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

### search_products

Full-text search over Hepsiburada's product catalog. Returns paginated product listings with name, brand, price, rating, and review count. Supports price-range filters via the `filters` param. Each page returns ~36 products; totalCount reflects the server-side result count (capped at 10000).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `filters` | string | No | Advanced filter string in the format used by Hepsiburada (e.g. 'fiyat:0-1000' for price range 0–1000 TL). |
| `page` | integer | No | Page number for pagination (1-based). |
| `query` | string | Yes | Search keyword (e.g. 'laptop', 'headphones', 'SSD'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hepsiburada-com-api-99357ed2/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filters":"<string>","page":"<integer>","query":"<string>"}'
```
