{
  "openapi": "3.0.1",
  "info": {
    "title": "Trendyol Scraper",
    "description": "Trendyol scraper for trendyol.com search and category pages: price, original price and discount, rating, seller store name, free shipping and fast delivery flags, brand, category. Sort and filter by rating, discount and shipping. Monitor mode alerts on new products and price drops.",
    "version": "0.1",
    "x-build-id": "VcU4nJT7g3FSMpGz6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~trendyol-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-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/datahamster~trendyol-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-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/datahamster~trendyol-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per line, e.g. \"kulaklık\" or \"airpods pro\". Each keyword is one Trendyol search on trendyol.com (Turkey).",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Trendyol search or category URLs",
            "type": "array",
            "description": "Optional. Paste search or category pages from your browser (trendyol.com/sr?q=… or trendyol.com/kulaklik-x-c92?…) to keep every filter and sort you clicked there. Product and store pages are not accepted.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "newest",
              "best-seller",
              "most-favourite",
              "most-rated"
            ],
            "type": "string",
            "description": "Trendyol's own sort order for keyword searches. Pasted URLs keep their own sort.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price (TRY)",
            "minimum": 0,
            "type": "number",
            "description": "Optional lower price bound in Turkish lira, passed to Trendyol's price filter and checked on every row."
          },
          "maxPrice": {
            "title": "Max price (TRY)",
            "minimum": 0,
            "type": "number",
            "description": "Optional upper price bound in Turkish lira, passed to Trendyol's price filter and checked on every row."
          },
          "maxPages": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many result pages to read per search. Trendyol shows 36 products per page and no more than 100 pages.",
            "default": 1
          },
          "includeSellerNames": {
            "title": "Add seller store names",
            "type": "boolean",
            "description": "On: each row gets the seller's store name and Trendyol seller score (one extra request per seller, cached for the run). Off: only the merchant id, a little faster and cheaper.",
            "default": true
          },
          "minRating": {
            "title": "Min product rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Optional. Keep only products rated at least this (0-5). Products without a rating are dropped when set."
          },
          "minRatingCount": {
            "title": "Min number of ratings",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only products with at least this many ratings."
          },
          "minDiscountPercent": {
            "title": "Min discount %",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Optional. Keep only products whose card shows a struck-through price at least this many percent above the current price."
          },
          "freeCargoOnly": {
            "title": "Free shipping only (Kargo Bedava)",
            "type": "boolean",
            "description": "Keep only products with free shipping.",
            "default": false
          },
          "fastDeliveryOnly": {
            "title": "Fast delivery only",
            "type": "boolean",
            "description": "Keep only products Trendyol flags for fast (rush) delivery.",
            "default": false
          },
          "includeSponsored": {
            "title": "Include sponsored products",
            "type": "boolean",
            "description": "On: sponsored products Trendyol mixes into the results are kept, flagged isSponsored. Off: they are dropped (their slots still count toward position).",
            "default": true
          },
          "strictQueryMatch": {
            "title": "No filler for unmatched keywords",
            "type": "boolean",
            "description": "On: when Trendyol cannot match a keyword and shows other products instead (a did-you-mean or translated guess), the search returns nothing. Off: you get whatever Trendyol shows.",
            "default": true
          },
          "dedupeAcrossSearches": {
            "title": "One row per product across searches",
            "type": "boolean",
            "description": "On: a product found by two keywords or URLs of the same run is returned once, under the first one. Ignored in monitor mode.",
            "default": true
          },
          "priceAlert": {
            "title": "Price alert (monitor)",
            "enum": [
              "any",
              "drops"
            ],
            "type": "string",
            "description": "Monitor mode: report every price change, or only drops below the last reported price.",
            "default": "any"
          },
          "minPriceChangePercent": {
            "title": "Min price change % (monitor)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Monitor mode: report a price change only when it is at least this many percent away from the last reported price. 0 = any change.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (you are charged only for pushed items)",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}