# Trendyol Scraper (`solidcode/trendyol-scraper`) Actor

\[💰 $1.0 / 1K] Extract products and customer reviews from Trendyol — Turkey's largest marketplace. Search by keyword, paste category or seller pages, or supply direct product URLs. Reviews are opt-in and emitted as separate dataset rows.

- **URL**: https://apify.com/solidcode/trendyol-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 product scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Trendyol Scraper

Pull products and customer reviews from Trendyol — Turkey's largest e-commerce marketplace — at scale, with brand, seller, pricing, discount, rating, favorite count, breadcrumb category path, variants, badges, customer images, reviewer level, verified-purchase flag, and seller responses on every row. Built for Turkish e-commerce sellers, cross-border dropshippers, brand managers, and market researchers who need a clean Trendyol catalog and review feed without wrestling with Turkish SPA pagination one tab at a time.

### Why This Scraper?

- **Products and reviews in one run** — opt into reviews per product (cap or unlimited) without spawning a second actor. One run, one dataset, two `recordType` rows: `product` and `review`.
- **Three Trendyol storefronts in one input** — Turkey (TL), Azerbaijan (AZN), and the International store (USD/EUR). Flip a single dropdown to switch — currency, language, and `/en/` path prefixes are handled for you.
- **Seven sort orders that match Trendyol's own UI** — Best match, Newest, Price low-to-high, Price high-to-low, Best sellers, Most favorited, Most rated.
- **Six purpose-built filters** — minimum star rating (3 / 4 / 4.5+), min and max price in the storefront's currency, free shipping, fast delivery, and discounted-only.
- **Mix any URL type in one list** — search result pages (`/sr?q=...`), category pages (`/<slug>-x-c<id>`), seller / merchant pages (`/magaza/...-m-<id>`), and direct product URLs (`/<brand>/<slug>-p-<id>`). The actor auto-detects the URL shape.
- **Full Turkish UTF-8 preserved** — `ı`, `ş`, `ğ`, `ç`, `ö`, `ü` in product names, category breadcrumbs, and review text are never ASCII-folded.
- **Split per-result pricing — $1.00 per 1,000 products plus $0.80 per 1,000 reviews.** Reviews are off by default; turn them on only when you need them. No compute or platform-bandwidth surprises.
- **Per-source caps, not a single global limit** — `maxProductsPerSource` defaults to 100, so a 10-URL run is bounded at 1,000 rows, never 50,000.
- **Variant roll-ups and full category breadcrumbs** — every direct-product-URL row carries a `variants[]` array (attribute name, attribute value, price, in-stock, SKU) plus a `categoryPath` resolved all the way up to the storefront root.

### Use Cases

**Price & Discount Monitoring**
- Track competitor prices, strike-through `originalPrice`, and `discountPercent` across a category
- Watch a seller's full catalog (`/magaza/...`) for repricing events
- Compare the same product across Turkey, Azerbaijan, and the International storefront

**Market & Trend Research**
- Map Turkish consumer demand by category — phones, beauty, fashion, home goods
- Rank top brands and top sellers in any category using `rating`, `reviewCount`, and `favoriteCount`
- Detect emerging best-sellers via the Best sellers / Most favorited / Most rated sort orders

**Cross-Border Sourcing & Dropshipping**
- Build a product feed for resale on Etsy, eBay, Amazon, or Shopify
- Pull product images, full category breadcrumbs, and brand names ready for catalog import
- Filter for `freeShippingOnly` or `fastDeliveryOnly` to find sellers ready to ship internationally

**Review Sentiment & Product Quality Tracking**
- Pull every review for a flagship product (including unlimited mode) with rating, text, reviewer level, verified-purchase flag, helpful count, customer images, and seller responses
- Spot quality issues by mining 1-star reviews across a brand's catalog
- Quantify trust signals — `Trendyol Elite` reviewers and verified-purchase ratios

**Brand & Seller Outreach**
- Build seller contact lists from `/magaza/` pages
- Identify high-volume Trendyol-only brands for direct partnership
- Audit how sellers respond to negative reviews via the `sellerResponse` field

### Getting Started

#### Simple keyword search

The cheapest path — products only, no reviews:

```json
{
    "searchQueries": ["erkek spor ayakkabı"],
    "maxProductsPerSource": 100
}
````

#### Products plus reviews with a cap

Enrich each product with up to 50 reviews:

```json
{
    "searchQueries": ["kahve makinesi", "iPhone 15"],
    "maxProductsPerSource": 50,
    "includeReviews": true,
    "maxReviewsPerProduct": 50
}
```

#### Direct product URLs with a tight rating filter

Paste any Trendyol product URL and add minimum rating and a price band:

```json
{
    "startUrls": [
        "https://www.trendyol.com/apple/iphone-15-128-gb-p-755253562",
        "https://www.trendyol.com/samsung/galaxy-s24-256-gb-p-829145673"
    ],
    "minRating": "4.5",
    "minPrice": 30000,
    "maxPrice": 80000,
    "includeReviews": true,
    "maxReviewsPerProduct": 100
}
```

#### Category sweep on the International storefront

Sort by best sellers, switch to the International store, capture EUR prices:

```json
{
    "startUrls": [
        "https://www.trendyol.com/en/sr?q=coffee+maker"
    ],
    "sort": "best_seller",
    "country": "international",
    "discountedOnly": true,
    "maxProductsPerSource": 200
}
```

### Input Reference

#### Sources

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | string\[] | `["erkek spor ayakkabı"]` | Turkish or English search terms. Each keyword runs as its own search. Leave empty if you only use URLs below. |
| `startUrls` | string\[] | `[]` | Trendyol URLs to scrape. Mix search pages, category pages, seller pages, and direct product URLs in one list — the URL shape is auto-detected. |

#### Limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxProductsPerSource` | integer | `100` | Maximum product rows per search keyword, category URL, or seller URL. Direct product URLs always return exactly one product and ignore this cap. Set to `0` for unlimited (Trendyol caps deep pagination around ~50 pages per search). |
| `includeReviews` | boolean | `false` | When on, fetch customer reviews for every product returned and emit them as separate `recordType: "review"` rows. Off by default — reviews are billed at a separate per-row rate. |
| `maxReviewsPerProduct` | integer | `50` | Maximum review rows per product. Ignored when `includeReviews` is off. Set to `0` to fetch every review Trendyol exposes (can be thousands on flagship items). |

#### Sort & filter

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sort` | select | `Best match (default)` | `Best match (default)`, `Newest first`, `Price: low to high`, `Price: high to low`, `Best sellers`, `Most favorited`, or `Most rated`. Ignored on direct product URLs. |
| `minPrice` | integer | (none) | Only include products priced at or above this value, in the storefront's currency. |
| `maxPrice` | integer | (none) | Only include products priced at or below this value, in the storefront's currency. |
| `minRating` | select | `Any rating` | `Any rating`, `3 stars and up`, `4 stars and up`, or `4.5 stars and up`. |
| `freeShippingOnly` | boolean | `false` | Only include products eligible for free shipping. |
| `fastDeliveryOnly` | boolean | `false` | Only include products tagged with Trendyol's fast-delivery / same-day badge. |
| `discountedOnly` | boolean | `false` | Only include products currently on sale (showing a strike-through original price). |

#### Localization

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `country` | select | `Turkey (trendyol.com — TL)` | Storefront to target. `Turkey (trendyol.com — TL)`, `Azerbaijan (trendyol.az — AZN)`, or `International (trendyol.com/en — USD/EUR)`. Determines currency, language, and which catalog is searched. |

### Output

Every row carries a `recordType` field — `product` or `review` — so you can filter or split the dataset cleanly downstream.

#### Product (`recordType: "product"`)

```json
{
    "recordType": "product",
    "productId": "755253562",
    "productUrl": "https://www.trendyol.com/apple/iphone-15-128-gb-p-755253562",
    "productName": "Apple iPhone 15 128 GB (Apple Türkiye Garantili)",
    "brandName": "Apple",
    "brandId": 110197,
    "sellerName": "Apple Authorized Reseller",
    "sellerId": "968413",
    "price": 49999.0,
    "originalPrice": 59999.0,
    "discountPercent": 17,
    "currency": "TRY",
    "rating": 4.7,
    "reviewCount": 3113,
    "favoriteCount": 57000,
    "inStock": true,
    "imageUrl": "https://cdn.dsmcdn.com/ty1234/product/media/images/iphone-15.jpg",
    "images": ["https://cdn.dsmcdn.com/ty1234/product/media/images/iphone-15.jpg"],
    "categoryPath": ["Elektronik", "Telefon", "Cep Telefonu"],
    "variants": [
        { "attributeName": "Renk", "attributeValue": "Siyah", "price": 49999.0, "inStock": true, "sku": "IPH15-128-BLK" }
    ],
    "productCode": "MTP63TU/A",
    "badges": ["FastDelivery", "FreeShipping"],
    "sourceUrl": "https://www.trendyol.com/sr?q=iPhone+15",
    "scrapedAt": "2026-05-16T10:30:00Z"
}
```

##### Core fields

| Field | Type | Description |
|-------|------|-------------|
| `recordType` | string | Always `"product"` |
| `productId` | string | Trendyol's internal product id (extracted from URL `-p-<id>`) |
| `productUrl` | string | Canonical product detail URL |
| `productName` | string | Full product title |
| `productCode` | string | Merchant SKU or model code when shown (direct-product-URL rows only) |
| `inStock` | boolean | At least one variant is buyable |
| `imageUrl` | string | Primary product image (CDN URL) |
| `images` | string\[] | All product image URLs |
| `categoryPath` | string\[] | Breadcrumb e.g. `["Erkek", "Ayakkabı", "Spor Ayakkabı"]` |
| `badges` | string\[] | Visible badges (e.g., `["FastDelivery", "FreeShipping", "Discounted"]`) |
| `variants` | object\[] | Per-variant breakdown — `[{ attributeName, attributeValue, price, inStock, sku }]`. Populated only for direct-product-URL rows. |
| `sourceUrl` | string | The search / category / seller URL this row was discovered from |
| `scrapedAt` | string | ISO 8601 timestamp of extraction |

##### Brand & seller

| Field | Type | Description |
|-------|------|-------------|
| `brandName` | string | Brand name (e.g. "Nike", "Apple") |
| `brandId` | integer | Trendyol brand id when available |
| `sellerName` | string | Merchant / store name (direct-product-URL rows only) |
| `sellerId` | string | Merchant id |

##### Price & popularity

| Field | Type | Description |
|-------|------|-------------|
| `price` | number | Current sale price |
| `originalPrice` | number | Strike-through price when discounted |
| `discountPercent` | integer | 0–100 percent off |
| `currency` | string | `TRY`, `AZN`, `USD`, or `EUR` depending on storefront |
| `rating` | number | Average customer rating 0.0–5.0 |
| `reviewCount` | integer | Total reviews on the product |
| `favoriteCount` | integer | How many shoppers have favorited the product (from Trendyol's social-proof bar; populated for listing-sourced rows) |

##### Direct product URL extras

These fields are only present on rows extracted from a direct product URL (`startUrls` containing `...-p-<id>`):

| Field | Type | Description |
|-------|------|-------------|
| `slugDrift` | boolean | `true` when Trendyol returned a different product id than the one in the input URL (the original may have been delisted). Use this to filter unexpected rows. |
| `requestedProductId` | string | The product id that was in your input URL — for joining against `productId` when slug drift occurs. |

#### Review (`recordType: "review"`)

Emitted only when `includeReviews: true`. Capped at `maxReviewsPerProduct` per product.

```json
{
    "recordType": "review",
    "reviewId": "412598834",
    "productId": "755253562",
    "productUrl": "https://www.trendyol.com/apple/iphone-15-128-gb-p-755253562",
    "productName": "Apple iPhone 15 128 GB (Apple Türkiye Garantili)",
    "rating": 5,
    "reviewText": "Ürün hızlı geldi, kutusu sağlamdı. Renk fotoğraftaki gibi.",
    "reviewDate": "2026-04-22",
    "reviewerName": "M*** S.",
    "reviewerLevel": "Trendyol Elite",
    "isVerifiedPurchase": true,
    "helpfulCount": 14,
    "sellerResponse": "Memnuniyetiniz bizim için çok değerli, teşekkür ederiz.",
    "images": ["https://cdn.dsmcdn.com/ty1234/review/images/iphone-15-buyer-1.jpg"],
    "variantInfo": "Beden: 128 GB, Renk: Siyah",
    "scrapedAt": "2026-05-16T10:30:05Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `recordType` | string | Always `"review"` |
| `reviewId` | string | Trendyol's review id |
| `productId` | string | Parent product id (denormalized for joins) |
| `productUrl` | string | Parent product URL |
| `productName` | string | Parent product name (denormalized) |
| `rating` | integer | 1–5 stars for this review |
| `reviewText` | string | Customer comment (may be empty for star-only reviews) |
| `reviewDate` | string | ISO date the review was posted |
| `reviewerName` | string | Display name (often initials, e.g. "M\*\*\* S.") |
| `reviewerLevel` | string | Trendyol's reviewer tier label (e.g. `Trendyol Elite`) |
| `isVerifiedPurchase` | boolean | True when Trendyol marks the reviewer as a verified buyer |
| `helpfulCount` | integer | Helpful / like count on the review |
| `sellerResponse` | string | Merchant's reply to the review when present |
| `images` | string\[] | Customer-uploaded image URLs (common on apparel and electronics) |
| `variantInfo` | string | Which variant the reviewer bought (e.g. `"Beden: 42, Renk: Siyah"`) |
| `scrapedAt` | string | ISO 8601 timestamp of extraction |

### Tips for Best Results

- **Start small.** Set `maxProductsPerSource` to 20–50 on your first run to confirm the data matches your needs, then scale up.
- **Use the most specific URL you have.** Paste the exact Trendyol category URL from the site breadcrumb (`/<slug>-x-c<id>`) instead of a broad keyword — you'll get a tighter, more consistent catalog sweep.
- **Reviews are the cost driver.** Leave `includeReviews` off when you're only price-tracking. Turn it on with a tight `maxReviewsPerProduct` (e.g. 20) when you need sentiment data without paying for every comment on a 3,000-review flagship.
- **Storefront determines currency.** The Turkey store returns TRY, Azerbaijan returns AZN, and the International store returns USD or EUR depending on geo — pick the storefront that matches your analytics. The `currency` field is always populated so you never have to guess.
- **Sort matters for limited runs.** With `maxProductsPerSource: 50`, `sort: "best_seller"` gives you the 50 most-bought items, while `sort: "most_rated"` gives you the 50 with the most review activity — very different lists.
- **Tight filters need a higher cap.** Filters like `minRating: "4.5"` plus `discountedOnly: true` are applied to each result page after fetch — Trendyol may need to scan several pages before your cap fills. Raise `maxProductsPerSource` by 2–3× when stacking strict filters.
- **Mix every source type in one run.** Two search keywords, three category URLs, and ten direct product URLs can all live in the same input — one billed start, one combined dataset.
- **Direct product URLs can drift.** Trendyol occasionally reassigns an old product id to a different SKU. When that happens you'll see `slugDrift: true` and `requestedProductId` on the row plus a one-line note in the final status message — filter on `slugDrift` to quarantine those rows.

### Pricing

**$1.00 per 1,000 products plus $0.80 per 1,000 reviews.** Reviews are opt-in via `includeReviews` and capped via `maxReviewsPerProduct` — you control review cost.

| Workload | Products | Reviews | Cost |
|----------|----------|---------|------|
| Quick lookup | 100 | 0 | $0.10 |
| Small market scan | 1,000 | 5,000 (avg 5/product) | $5.00 |
| Full category sweep | 10,000 | 100,000 (avg 10/product) | $90.00 |
| Enterprise pull | 100,000 | 2,500,000 (avg 25/product) | $2,100.00 |

A "product" is any row with `recordType: "product"`; a "review" is any row with `recordType: "review"`. Leave `includeReviews` off and you only pay the product rate — the small market scan above becomes `1,000 × $0.001 = $1.00`. Platform fees (compute, storage) are billed by Apify, not by this actor, and have a small fixed startup cost per run — they amortize away at scale (50+ rows per run) but dominate on tiny runs.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor is designed for legitimate market research, competitive intelligence, lead generation, and catalog enrichment. Users are responsible for complying with applicable laws and Trendyol's terms of service, including making reasonable-rate requests and respecting any content usage rules for product images, descriptions, and customer reviews. Do not use extracted data for spam, harassment, defamation, or any illegal purpose. Be especially mindful when handling customer review content — treat reviewer names and uploaded images as personal data.

# Actor input Schema

## `searchQueries` (type: `array`):

Trendyol product search terms (e.g., 'erkek spor ayakkabı', 'kahve makinesi', 'iPhone 15'). Each keyword runs as a separate search. Leave empty if you only want to use URLs below.

## `startUrls` (type: `array`):

Paste Trendyol URLs directly. Accepts search result pages (trendyol.com/sr?q=...), category pages (trendyol.com/<category>-x-c<id>), seller / merchant pages (trendyol.com/magaza/...), and direct product URLs (trendyol.com/<brand>/<product>-p-<id>). Mix any types in one list.

## `maxProductsPerSource` (type: `integer`):

Cap on the number of product rows returned per search keyword, category URL, or seller URL. Direct product URLs always return exactly one product and are unaffected by this cap. Set to 0 for unlimited — we cap each source at 50 result pages as a runaway safety net (about 5,000 products per source at Trendyol's max page size). When client-side filters are active (rating, price, badges) we scan up to 5x your cap before giving up — tighten or loosen filters accordingly.

## `includeReviews` (type: `boolean`):

When on, the actor fetches customer reviews for every product it returns and emits them as separate rows (recordType="review"). Off by default to keep runs lean — reviews are billed at a separate per-row rate.

## `maxReviewsPerProduct` (type: `integer`):

Cap on review rows extracted from each product. Ignored when 'Also extract customer reviews' is off. Set to 0 to fetch every review Trendyol exposes for a product (can be thousands for popular items). When set to 0 we still stop after 1,000 pages of reviews (~50,000 reviews per product) as a safety cap.

## `sort` (type: `string`):

Result ordering for search keywords and category URLs. 'Best match' is Trendyol's default ranking. Ignored when scraping direct product URLs.

## `minPrice` (type: `integer`):

Only include products priced at or above this value in Turkish Lira. Leave empty for no minimum.

## `maxPrice` (type: `integer`):

Only include products priced at or below this value in Turkish Lira. Leave empty for no maximum.

## `minRating` (type: `string`):

Only include products whose average customer rating is at least this many stars. Leave empty for no minimum.

## `freeShippingOnly` (type: `boolean`):

Only include products eligible for free shipping.

## `fastDeliveryOnly` (type: `boolean`):

Only include products tagged with Trendyol's fast-delivery / same-day badge.

## `discountedOnly` (type: `boolean`):

Only include products currently on sale (showing a strike-through original price).

## `country` (type: `string`):

Which Trendyol storefront to target. The default Turkey marketplace (trendyol.com) is the broadest catalog with all reviews available. Other storefronts have smaller catalogs and different currencies.

## Actor input object example

```json
{
  "searchQueries": [
    "erkek spor ayakkabı"
  ],
  "startUrls": [],
  "maxProductsPerSource": 100,
  "includeReviews": false,
  "maxReviewsPerProduct": 50,
  "sort": "best_match",
  "minRating": "any",
  "freeShippingOnly": false,
  "fastDeliveryOnly": false,
  "discountedOnly": false,
  "country": "tr"
}
```

# Actor output Schema

## `overview` (type: `string`):

Every scraped row in one table — filterable by recordType.

## `products` (type: `string`):

Just the product rows (price, brand, seller, rating).

## `reviews` (type: `string`):

Just the customer review rows.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "erkek spor ayakkabı"
    ],
    "startUrls": [],
    "maxProductsPerSource": 100,
    "includeReviews": false,
    "maxReviewsPerProduct": 50,
    "sort": "best_match",
    "minRating": "any",
    "freeShippingOnly": false,
    "fastDeliveryOnly": false,
    "discountedOnly": false,
    "country": "tr"
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/trendyol-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["erkek spor ayakkabı"],
    "startUrls": [],
    "maxProductsPerSource": 100,
    "includeReviews": False,
    "maxReviewsPerProduct": 50,
    "sort": "best_match",
    "minRating": "any",
    "freeShippingOnly": False,
    "fastDeliveryOnly": False,
    "discountedOnly": False,
    "country": "tr",
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/trendyol-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "erkek spor ayakkabı"
  ],
  "startUrls": [],
  "maxProductsPerSource": 100,
  "includeReviews": false,
  "maxReviewsPerProduct": 50,
  "sort": "best_match",
  "minRating": "any",
  "freeShippingOnly": false,
  "fastDeliveryOnly": false,
  "discountedOnly": false,
  "country": "tr"
}' |
apify call solidcode/trendyol-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=solidcode/trendyol-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Trendyol Scraper",
        "description": "[💰 $1.0 / 1K] Extract products and customer reviews from Trendyol — Turkey's largest marketplace. Search by keyword, paste category or seller pages, or supply direct product URLs. Reviews are opt-in and emitted as separate dataset rows.",
        "version": "1.0",
        "x-build-id": "VXuTPFUtkHaWw7Nkx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/solidcode~trendyol-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-solidcode-trendyol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/solidcode~trendyol-scraper/runs": {
            "post": {
                "operationId": "runs-sync-solidcode-trendyol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/solidcode~trendyol-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-solidcode-trendyol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQueries": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Trendyol product search terms (e.g., 'erkek spor ayakkabı', 'kahve makinesi', 'iPhone 15'). Each keyword runs as a separate search. Leave empty if you only want to use URLs below.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Trendyol URLs",
                        "type": "array",
                        "description": "Paste Trendyol URLs directly. Accepts search result pages (trendyol.com/sr?q=...), category pages (trendyol.com/<category>-x-c<id>), seller / merchant pages (trendyol.com/magaza/...), and direct product URLs (trendyol.com/<brand>/<product>-p-<id>). Mix any types in one list.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxProductsPerSource": {
                        "title": "Maximum products per source",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap on the number of product rows returned per search keyword, category URL, or seller URL. Direct product URLs always return exactly one product and are unaffected by this cap. Set to 0 for unlimited — we cap each source at 50 result pages as a runaway safety net (about 5,000 products per source at Trendyol's max page size). When client-side filters are active (rating, price, badges) we scan up to 5x your cap before giving up — tighten or loosen filters accordingly.",
                        "default": 100
                    },
                    "includeReviews": {
                        "title": "Also extract customer reviews",
                        "type": "boolean",
                        "description": "When on, the actor fetches customer reviews for every product it returns and emits them as separate rows (recordType=\"review\"). Off by default to keep runs lean — reviews are billed at a separate per-row rate.",
                        "default": false
                    },
                    "maxReviewsPerProduct": {
                        "title": "Maximum reviews per product",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap on review rows extracted from each product. Ignored when 'Also extract customer reviews' is off. Set to 0 to fetch every review Trendyol exposes for a product (can be thousands for popular items). When set to 0 we still stop after 1,000 pages of reviews (~50,000 reviews per product) as a safety cap.",
                        "default": 50
                    },
                    "sort": {
                        "title": "Sort order",
                        "enum": [
                            "best_match",
                            "newest",
                            "price_asc",
                            "price_desc",
                            "best_seller",
                            "most_favorited",
                            "most_rated"
                        ],
                        "type": "string",
                        "description": "Result ordering for search keywords and category URLs. 'Best match' is Trendyol's default ranking. Ignored when scraping direct product URLs.",
                        "default": "best_match"
                    },
                    "minPrice": {
                        "title": "Minimum price (TL)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include products priced at or above this value in Turkish Lira. Leave empty for no minimum."
                    },
                    "maxPrice": {
                        "title": "Maximum price (TL)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include products priced at or below this value in Turkish Lira. Leave empty for no maximum."
                    },
                    "minRating": {
                        "title": "Minimum star rating",
                        "enum": [
                            "any",
                            "3",
                            "4",
                            "4.5"
                        ],
                        "type": "string",
                        "description": "Only include products whose average customer rating is at least this many stars. Leave empty for no minimum.",
                        "default": "any"
                    },
                    "freeShippingOnly": {
                        "title": "Free shipping only",
                        "type": "boolean",
                        "description": "Only include products eligible for free shipping.",
                        "default": false
                    },
                    "fastDeliveryOnly": {
                        "title": "Fast delivery only",
                        "type": "boolean",
                        "description": "Only include products tagged with Trendyol's fast-delivery / same-day badge.",
                        "default": false
                    },
                    "discountedOnly": {
                        "title": "Discounted products only",
                        "type": "boolean",
                        "description": "Only include products currently on sale (showing a strike-through original price).",
                        "default": false
                    },
                    "country": {
                        "title": "Storefront",
                        "enum": [
                            "tr",
                            "az",
                            "international"
                        ],
                        "type": "string",
                        "description": "Which Trendyol storefront to target. The default Turkey marketplace (trendyol.com) is the broadest catalog with all reviews available. Other storefronts have smaller catalogs and different currencies.",
                        "default": "tr"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
