# Trendyol API scraper — search, filters, product detail, reviews, sellers & category browse on Turkey's largest e-commerce marketplace (trendyol.com), prices in TRY

> full product by `url` OR `content_id`: title/brand/price(current+list+discount%/coupon/ty+)/campaign(+campaigns[])/rating+comment_count/in_stock/seller(+score)/other_offers/category/images/attributes(specs)/variants. The dual-use influencer module.
> ReefAPI engine `trendyol` · 9 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/trendyol/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 /trendyol/v1/product/detail — 1 credit
full product by `url` OR `content_id`: title/brand/price(current+list+discount%/coupon/ty+)/campaign(+campaigns[])/rating+comment_count/in_stock/seller(+score)/other_offers/category/images/attributes(specs)/variants. The dual-use influencer module.

**Parameters:**
- `content_id` (string, optional) — Trendyol product ID — the digits after '-p-' in the product URL (…-p-<id>). Take it from search results. Provide content_id OR url.
- `url` (string, optional) — Full Trendyol product URL — alternative to content_id.

**Returns:** product{content_id, title, brand, price{current, list, currency=TRY, discount_pct, coupon, ty_plus}, campaign (str|null — the 'Ürünün Kampanyaları' headline, e.g. 'Sepette %1 İndirim · 350 TL ve Üzeri Kargo Bedava'), campaigns[]{text, short, type, applied, end_date}, rating{average, comment_count}, in_stock, seller{name, score}, other_offers[]{seller_name, price, seller_score, campaign}, category, images[], attributes{}, variants[]}

**Example request body:**
```json
{
  "content_id": 762254881
}
```

### POST /trendyol/v1/product/reviews — 2 credits
paginated reviews by `content_id` OR `url`: {ai_summary (AI review digest), summary(avg/total_rating_count/total_comment_count/total_pages), reviews[]{user,rating,comment,date,seller,trusted,is_influencer,images}}. page/page_size params.

**Parameters:**
- `content_id` (string, optional) — Trendyol product ID — the digits after '-p-' in the product URL (…-p-<id>). Take it from search results. Provide content_id OR url.
- `url` (string, optional) — Full Trendyol product URL — alternative to content_id.
- `page` (integer, optional, default 0) — Review page — 0-BASED (first page = 0, then 1, 2…); summary.total_pages tells you how many exist.
- `page_size` (integer, optional, default 30) — Reviews per page (1–50; larger values are capped at 50).

**Returns:** ai_summary + summary{average_rating, total_rating_count, total_comment_count, total_pages} + reviews[]{user, rating, comment, date, seller, trusted, is_influencer, images} (meta.pagination for paging)

**Example request body:**
```json
{
  "content_id": 762254881
}
```

### POST /trendyol/v1/product/similar — 1 credit
similar/cross-sell products by `content_id` OR `url` → results[]{content_id,title,brand,url,price,list_price,rating,comment_count,image,category}. page/size params.

**Parameters:**
- `content_id` (string, optional) — Trendyol product ID — the digits after '-p-' in the product URL (…-p-<id>). Take it from search results. Provide content_id OR url.
- `url` (string, optional) — Full Trendyol product URL — alternative to content_id.
- `page` (integer, optional, default 0) — Result page — 0-BASED (first page = 0).
- `size` (integer, optional, default 20) — How many similar products (1–40; larger values are capped at 40).

**Returns:** results[]{content_id, title, brand, url, price, list_price, rating, comment_count, image, category}

**Example request body:**
```json
{
  "content_id": 762254881
}
```

### POST /trendyol/v1/search — 2 credits
Search Trendyol products by keyword with optional sort & price/brand filters → results[]{content_id,title,brand,url,price,list_price,rating,comment_count,category,image,free_cargo}. Resolves content_ids for product/detail. Paginated+deduped (page 1-based, max_pages ≤10). meta.total_count = full result-set size.

**Parameters:**
- `query` (string, required) — What to search for (Turkish keywords work best).
- `page` (integer, optional, default 1) — Result page to start from — 1-BASED (1, 2, 3…), ~24 products/page.
- `max_pages` (integer, optional, default 1) — How many consecutive pages to fetch + dedup in one call (1–10, ~24 products/page; larger values are capped at 10).
- `sort` (enum, optional) — Result ordering: best_seller · most_favorite · price_asc · price_desc · newest · most_rated. Default = Trendyol relevance. [one of: best_seller, most_favorite, price_asc, price_desc, newest, most_rated]
- `price` (string, optional) — Price range filter in TRY as 'min-max' (e.g. '5000-15000'). Open-ended like '5000-' also works.
- `brand` (string, optional) — Brand-id filter — get valid brand ids from the search/filters action (the 'Marka' facet). Numeric id, not the brand name.

**Returns:** results[]{content_id, title, brand, url, price, price_value, list_price, rating, comment_count, category, image, free_cargo, fast_delivery}; meta{total_count, pagination}

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

### POST /trendyol/v1/search/filters — 1 credit
Discover the available filter facets for a `query` OR `category_id` before filtering — brands (with ids for the `brand` param), price ranges, product ratings, and category-specific attributes (RAM, screen size, color, …) each with live result counts.

**Parameters:**
- `query` (string, optional) — Search keyword to get facets for (provide query OR category_id).
- `category_id` (integer, optional) — Category id (digits after '-c' in a category URL) — alternative to query.

**Returns:** filters[]{title, type, param_hint, values[]{id, text, count}} — feed a values[].id into search/category brand/price filters

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

### POST /trendyol/v1/category/products — 1 credit
Browse a Trendyol category by id — best-sellers, newest, or price/brand-filtered product lists. Same card shape as search. Get a category_id from a product's category.id (product/detail) or the '-c<id>' in a category URL.

**Parameters:**
- `category_id` (integer, optional) — Category id — the digits after '-c' in a category URL (…-x-c<id>), or a product's category.id. Provide category_id OR url.
- `url` (string, optional) — Full Trendyol category URL — alternative to category_id.
- `page` (integer, optional, default 1) — Result page to start from — 1-BASED (1, 2, 3…), ~24 products/page.
- `max_pages` (integer, optional, default 1) — How many consecutive pages to fetch + dedup in one call (1–10, ~24 products/page; larger values are capped at 10).
- `sort` (enum, optional) — Result ordering: best_seller · most_favorite · price_asc · price_desc · newest · most_rated. Default = Trendyol relevance. [one of: best_seller, most_favorite, price_asc, price_desc, newest, most_rated]
- `price` (string, optional) — Price range filter in TRY as 'min-max' (e.g. '5000-15000'). Open-ended like '5000-' also works.
- `brand` (string, optional) — Brand-id filter — get valid brand ids from the search/filters action (the 'Marka' facet). Numeric id, not the brand name.

**Returns:** results[]{content_id, title, brand, url, price, list_price, rating, comment_count, category, image, free_cargo, fast_delivery}; meta{total_count, pagination}

**Example request body:**
```json
{
  "category_id": 103498
}
```

### POST /trendyol/v1/seller/products — 1 credit
All products of a Trendyol seller/store (paginated, sortable, filterable) by seller_id. Same card shape as search. meta.total_count = the seller's full catalog size.

**Parameters:**
- `seller_id` (integer, optional) — Seller/merchant id — the digits after '-m-' in a store URL (/magaza/…-m-<id>). Get it from seller/info or a product's seller. Provide seller_id OR url.
- `url` (string, optional) — Full Trendyol store URL — alternative to seller_id.
- `page` (integer, optional, default 1) — Result page to start from — 1-BASED (1, 2, 3…), ~24 products/page.
- `max_pages` (integer, optional, default 1) — How many consecutive pages to fetch + dedup in one call (1–10, ~24 products/page; larger values are capped at 10).
- `sort` (enum, optional) — Result ordering: best_seller · most_favorite · price_asc · price_desc · newest · most_rated. Default = Trendyol relevance. [one of: best_seller, most_favorite, price_asc, price_desc, newest, most_rated]
- `price` (string, optional) — Price range filter in TRY as 'min-max' (e.g. '5000-15000'). Open-ended like '5000-' also works.
- `brand` (string, optional) — Brand-id filter — get valid brand ids from the search/filters action (the 'Marka' facet). Numeric id, not the brand name.

**Returns:** results[]{content_id, title, brand, url, price, list_price, rating, comment_count, category, image, free_cargo}; meta{total_count, pagination}

**Example request body:**
```json
{
  "seller_id": 968
}
```

### POST /trendyol/v1/seller/info — 1 credit
Trendyol seller/store profile by seller_id: store name, legal entity (official_name), total product_count, seller score, and trust badges.

**Parameters:**
- `seller_id` (integer, optional) — Seller/merchant id — the digits after '-m-' in a store URL (/magaza/…-m-<id>). Provide seller_id OR url.
- `url` (string, optional) — Full Trendyol store URL — alternative to seller_id.

**Returns:** seller{seller_id, name, official_name, product_count, score, badges[], url}

**Example request body:**
```json
{
  "seller_id": 968
}
```

### POST /trendyol/v1/suggest — 1 credit
keyword suggestions for a query (ops; search-fallback if suggest API blocked)

**Parameters:**
- `query` (string, required) — Partial search text to complete.

**Returns:** suggestions[] (plain strings)

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

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