# Çiçeksepeti API scraper — Turkish marketplace (ciceksepeti.com): search flowers, gifts, electronics, fashion and home by keyword or category with price range, free shipping, same-day and sort; read the full product — price, struck price and in-basket price in TRY, stock, variants with their own prices, seller and seller score, rating, specifications, delivery badges; page through reviews; autocomplete. No account, no browser.

> Search ciceksepeti.com by keyword, or browse a Çiçeksepeti category, with price range, free shipping, same-day delivery and the site's seven sort orders, 30 products a page. Each row: product id and code, title, URL, image, the price, the struck price or the in-basket price label (kept apart), discount, the site's delivery text and badge, category path, marketplace flag and the search index's rating.
> ReefAPI engine `ciceksepeti` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/ciceksepeti/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 calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **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 /ciceksepeti/v1/search — 1 credit
Search ciceksepeti.com by keyword, or browse a Çiçeksepeti category, with price range, free shipping, same-day delivery and the site's seven sort orders, 30 products a page. Each row: product id and code, title, URL, image, the price, the struck price or the in-basket price label (kept apart), discount, the site's delivery text and badge, category path, marketplace flag and the search index's rating.

**Parameters:**
- `query` (string, optional) — Keyword to search on ciceksepeti.com, in Turkish or brand/model words ('kırmızı gül', 'orkide', 'airpods', 'kupa'). Optional when `category` is given; with `category` it narrows that category.
- `category` (string, optional) — A Çiçeksepeti category to browse: its slug ('kirmizi-gul', 'cep-telefonu', 'kozmetik') or its URL (https://www.ciceksepeti.com/d/kirmizi-gul). search/suggest returns category slugs.
- `page` (integer, optional, default 1) — Result page, 1-based. Çiçeksepeti serves 30 products per page; `total_pages` says how many exist. A page past the end returns an empty page.
- `sort` (enum, optional, default "relevance") — Order of the results — the seven orderings the site itself offers. [one of: relevance, price_asc, price_desc, newest, most_favorited, most_reviewed, best_selling]
- `price_min` (number, optional) — Lowest price in Turkish lira (inclusive, whole lira).
- `price_max` (number, optional) — Highest price in Turkish lira (inclusive, whole lira).
- `free_shipping` (boolean, optional, default false) — Only products with free shipping (the site's 'Kargo Bedava' filter).
- `same_day` (boolean, optional, default false) — Only products the site offers for same-day delivery ('Aynı Gün Teslimat').
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** results[]{position, product_id, product_code, variant_code, title, url, image, price (number, TRY — the price the card shows; for price_type 'basket' this is the in-basket price), price_display, price_type ('discounted' | 'basket' | 'regular'), price_before_discount (struck was-price, price_type 'discounted' only), price_outside_basket (the price before the basket discount, price_type 'basket' only, null when the card shows none), basket_price_label ('Sepet Fiyatı', 'Sepette %6 İndirim'), discount_percent, currency=TRY, search_index_rating, search_index_rating_count (the search index's figures — NOT the product page's; use product/detail for rating and rating_count), rating_scale (5), delivery_text, badge, category_id, category_path[{id, name}], is_marketplace, is_personalized, is_bundle, has_image_reviews}, count, total_results, total_pages, page, page_size (30), has_next_page, delivery_type, page_notice, listing_url

**Example request body:**
```json
{
  "query": "kırmızı gül"
}
```

### POST /ciceksepeti/v1/product/detail — 1 credit
The full Çiçeksepeti product page by URL or product code: title, brand, price, VAT-free price, struck price and discount when shown, in-basket price label, availability and stock of the selected variant, every variant with its own price and availability, images, star rating and count, seller and seller score for marketplace items, category path, breadcrumb, specification table, bouquet contents, description, and the site's delivery / sales badges.

**Parameters:**
- `url` (string, optional) — A ciceksepeti.com product URL (…-<code>). Every search row returns one as `url`.
- `product_code` (string, optional) — Alternative to `url`: the product code at the end of the product URL ('kcm74954793', 'at5418'). Every search row returns it as `product_code`.
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** product{product_id, product_code, variant_id, variant_code, title, url, brand, price, price_excluding_vat, price_before_discount (null unless the page shows a struck price), discount_percent, basket_price_label (set when the shown price is the in-basket price), currency=TRY, availability ('in_stock'|'out_of_stock'), in_stock, stock_count (the selected variant's stock; null when the page publishes none, e.g. flowers), stock_variant_code, images[], rating, rating_count, rating_scale (5), seller{id, name, url, rating (Çiçeksepeti seller score), rating_scale (null — no maximum printed)} (null when Çiçeksepeti sells it), sold_by_ciceksepeti, is_marketplace, category_path[], breadcrumb[{name, url}], specifications[{name, value}], contents[] (bouquet contents, e.g. 'Tekli Kırmızı Gül: 20 Adet'), description, variants[{variant_code, variant_id, product_code, is_this_product (false = a sibling product shown as a colour swatch), options{axis: value}, price, price_before_discount, discount_percent, available, is_default, url}] (null when the product has none), has_variants, sales_badges[] (the site's delivery / payment badges, e.g. 'Aynı Gün Ücretsiz Teslimat', '350 TL Üzeri Kargo Bedava'), installment_count}

**Example request body:**
```json
{
  "product_code": "at5418"
}
```

### POST /ciceksepeti/v1/product/reviews — 1 credit
Written reviews of a Çiçeksepeti product, 20 per call, with the site's six review orders, a star filter and cursor paging: star rating, text, date, reviewer's city and 'helpful' votes. Reviewer names are not returned.

**Parameters:**
- `product_id` (integer, optional) — Alternative to `url`/`product_code`: the numeric product_id a search row or product/detail returns.
- `product_code` (string, optional) — Alternative to `url`: the product code at the end of the product URL ('kcm74954793', 'at5418'). Every search row returns it as `product_code`.
- `url` (string, optional) — A ciceksepeti.com product URL (…-<code>). Every search row returns one as `url`.
- `sort` (enum, optional, default "recommended") — Order of the reviews — the six orderings the site's review page offers. [one of: recommended, newest, oldest, rating_desc, rating_asc, most_liked]
- `rating` (integer, optional) — Only reviews with this many stars (1-5).
- `cursor` (string, optional) — Paging token: pass the `next_cursor` of the previous response to get the next 20 reviews. Omit for the first page.
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** reviews[{id, rating (1-5), text, date (YYYY-MM-DD), city, like_count}], count, has_more, next_cursor, product_id, sort, rating_filter

### POST /ciceksepeti/v1/search/suggest — 1 credit
Çiçeksepeti's own search autocomplete for a partial keyword: suggested categories with their slug (usable as `category` in search) and the query the site would run.

**Parameters:**
- `query` (string, required) — What the user has typed so far (2+ characters).
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** suggestions[{text, type ('Kategori', …), url, category_slug, query}], count

**Example request body:**
```json
{
  "query": "kırmızı gül"
}
```

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