# Pazarama API scraper — Turkish marketplace (pazarama.com): search listings by keyword, category or brand with price range and sort, and read the full listing — price and in-basket price in TRY, stock, barcode, attributes, seller and seller score, star rating with 1-5 breakdown, newest reviews and description. No account, no browser.

> Search pazarama.com by keyword, or browse any Pazarama category or brand listing, with price range, brand and the site's seven sort orders. Each row is ONE seller's listing: product id and code, barcode (when the code is a valid GTIN), title, URL pointing at that seller, image, brand, seller, the price the site shows, the in-basket price when a basket campaign lowers it, the site's discount badge, star rating and Pazarama's search-index rating (the listing's own rating is in product/detail), availability and stock count, category and variant group.
> ReefAPI engine `pazarama` · 2 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/pazarama/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 /pazarama/v1/search — 1 credit
Search pazarama.com by keyword, or browse any Pazarama category or brand listing, with price range, brand and the site's seven sort orders. Each row is ONE seller's listing: product id and code, barcode (when the code is a valid GTIN), title, URL pointing at that seller, image, brand, seller, the price the site shows, the in-basket price when a basket campaign lowers it, the site's discount badge, star rating and Pazarama's search-index rating (the listing's own rating is in product/detail), availability and stock count, category and variant group.

**Parameters:**
- `query` (string, optional) — Keyword to search on pazarama.com, Turkish or brand/model words ('airfryer', 'çay makinesi', 'iphone 15 128'). Optional when `url` is given; with `url` it narrows that listing.
- `url` (string, optional) — A pazarama.com LISTING URL to browse instead of (or together with) a keyword: a category (…-k-K03043), a brand (/apple), a brand inside a category (/apple/cep-telefonu-k-K03043) or a search page. Every breadcrumb item this engine returns is such a URL.
- `page` (integer, optional, default 1) — Result page, 1-based. Pazarama serves 20 listings per page; `total_pages` says how many exist. A page past the end returns an empty page (the site itself would silently show page 1).
- `sort` (enum, optional, default "relevance") — Order of the results — the seven orderings the site itself offers. The price orderings follow the IN-BASKET price (`lowest_price` on each row), not the shown `price`, so rows can look out of order by `price`. [one of: relevance, price_asc, price_desc, newest, most_favorited, most_reviewed, best_selling]
- `price_min` (number, optional) — Lowest sale price in Turkish lira (inclusive).
- `price_max` (number, optional) — Highest sale price in Turkish lira (inclusive).
- `brand` (string, optional) — Pazarama's brand slug, as in its brand URLs (pazarama.com/philips → 'philips').
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** results[]{position, product_id, listing_id, product_code, barcode (null unless the code is a valid GTIN), title, url (with ?magaza=<seller>), image, images[], brand, brand_id, seller{id, name, slug, url}, price (number, TRY — the price the page shows), price_display, basket_price (the lower 'Sepette İndirimli Fiyatı' when a basket campaign applies, else null), basket_price_display, basket_price_label, lowest_price (the lower of price and basket_price — what the price sorts follow), plus_member_price (Pazarama Plus members only, null when not lower), price_before_discount (always null — the site renders no struck price), discount_percent (the site's own badge, null when none), currency=TRY, lowest_price_in_30_days, search_index_rating, search_index_rating_count (Pazarama's search-index figures — NOT this listing's page figures: they differed from the product page on 9 of 19 measured listings; use product/detail for rating and rating_count), rating_scale (5), availability ('in_stock'|'out_of_stock'), in_stock, stock_count (seller-declared), category{id, name}, has_variants, variant_group_code, pazarama_plus}, count, total_results, total_pages, page, page_size, sort, applied_filters[{field, value}], breadcrumb[{name, url, category_id}], no_match_notice (set when Pazarama did not find the keyword — results are then empty instead of its unrelated suggestions), page_notice

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

### POST /pazarama/v1/product/detail — 1 credit
The full Pazarama listing by product URL (or product_code + seller): title, brand, barcode, seller SKU, the price the page shows and the in-basket price, VAT rate, stock count and availability, image gallery, every attribute (with the variant axes flagged), seller with its Pazarama seller score, star rating with the 1-5 breakdown and total counts, the newest reviews, breadcrumb and the description text.

**Parameters:**
- `url` (string, optional) — A pazarama.com product URL (…-p-<code>, optionally with ?magaza=<seller>). Every search row returns one as `url`, already pointing at that seller.
- `product_code` (string, optional) — Alternative to `url`: the part after -p- in a product URL. Every search row returns it as `product_code`.
- `seller` (string, optional) — Seller slug (the ?magaza= value) to read THAT seller's listing of the product. Without it Pazarama shows its default seller, which can be a different seller at a different price.
- `max_rotations` (integer, optional, default 4) — Advanced: how many times to retry a difficult request (1-8, default 4).

**Returns:** product{product_id, listing_id, product_code, barcode (null unless a valid GTIN), seller_sku, title, short_name, url, brand, brand_id, brand_url, price, price_display, basket_price, basket_price_display, basket_price_label, lowest_price, plus_member_price, price_before_discount (null), discount_percent, currency=TRY, vat_rate_percent, lowest_price_in_30_days, availability, in_stock, stock_count (seller-declared), stock_text, images[], rating, rating_count (the page's 'N Değerlendirme' — all star ratings), written_review_count (the subset of those ratings with written text), rating_scale (5), rating_breakdown{'1'..'5': count}, top_reviews[{id, rating, text, date, city, like_count, seller_name, variant, has_images}], seller{id, name, slug, url, rating (Pazarama seller score), rating_scale (null — the site prints no maximum), logo}, category{id, name, url}, breadcrumb[], attributes[{name, value, variant_axis}], variant_attributes, has_variants, variants (null — the sibling list is not published without a signed-in session), other_offers (null — same reason), origin, description}, requested_seller, requested_seller_served

**Example request body:**
```json
{
  "product_code": "195949036040",
  "seller": "mediamarkt"
}
```

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