{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper | Fast Search & Full Product Data",
    "description": "Scrape TikTok Shop US in two reliable modes: fast keyword search or full product extraction. Get prices, sales, sellers, descriptions, SKUs, stock, shipping, videos, reviews and change tracking. Includes bulk keywords, pagination, filters, sorting, deduplication and retries.",
    "version": "0.2",
    "x-build-id": "B2STHfchF7OuOWLvR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~tiktok-shop-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-tiktok-shop-search-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/trakk~tiktok-shop-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-tiktok-shop-search-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/trakk~tiktok-shop-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-tiktok-shop-search-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": {
          "mode": {
            "title": "🎯 Mode",
            "enum": [
              "fast",
              "full"
            ],
            "type": "string",
            "description": "Fast Search collects product cards and paginates quickly. Full Product Data adds descriptions, SKUs, stock, shipping, videos, seller details and reviews.",
            "default": "fast"
          },
          "keywords": {
            "title": "🔍 Search keyword(s)",
            "type": "array",
            "description": "Add one or many phrases such as water bottle, mini printer, or makeup organizer. Each keyword is collected and paginated independently.",
            "items": {
              "type": "string"
            },
            "default": [
              "water bottle"
            ]
          },
          "maxItems": {
            "title": "💯 Maximum products",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum products to save per keyword. Set 0 for no explicit cap.",
            "default": 10
          },
          "maxPages": {
            "title": "📄 Pages per keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum TikTok Shop search pages to fetch for each keyword.",
            "default": 1
          },
          "sortBy": {
            "title": "↕️ Sort products by",
            "enum": [
              "relevance",
              "best_sellers",
              "price_asc",
              "price_desc",
              "rating_desc"
            ],
            "type": "string",
            "description": "Local post-processing sort of collected products.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "number",
            "description": "Optional local filter on normalized currentPrice."
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "number",
            "description": "Optional local filter on normalized currentPrice."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products at or above this rating when rating is available.",
            "default": 0
          },
          "minSoldCount": {
            "title": "Minimum sold count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products at or above this sold count when soldCount is available.",
            "default": 0
          },
          "freeShippingOnly": {
            "title": "🚚 Free shipping only",
            "type": "boolean",
            "description": "Keep only products where TikTok includes a free-shipping tag or shipping field.",
            "default": false
          },
          "dedupe": {
            "title": "Deduplicate products globally",
            "type": "boolean",
            "description": "Avoid pushing the same product multiple times when it appears for multiple keywords or pages.",
            "default": true
          },
          "compactOutput": {
            "title": "🧹 Compact output",
            "type": "boolean",
            "description": "Remove null, empty array, and empty object values from output items.",
            "default": true
          },
          "includeRawProduct": {
            "title": "Include raw product card",
            "type": "boolean",
            "description": "Attach the original TikTok product card as a JSON string in rawProductJson. Usually only needed for debugging.",
            "default": false
          },
          "htmlReport": {
            "title": "🖼️ Visual HTML report",
            "type": "boolean",
            "description": "Build a shareable product-grid report and save it to the key-value store (open the 'report' record after the run). Turn off to skip it.",
            "default": true
          },
          "includeReviews": {
            "title": "⭐ Include customer reviews",
            "type": "boolean",
            "description": "Full mode only. Attach complete public review objects. The first 5 reviews are included in the Full result price; higher limits can use a separate review event once active.",
            "default": true
          },
          "maxReviews": {
            "title": "Reviews per product",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Full mode only. Maximum reviews to attach per product. Use 0 to request all reviews exposed by TikTok.",
            "default": 5
          },
          "reviewSort": {
            "title": "Review order",
            "enum": [
              "recommended",
              "recent"
            ],
            "type": "string",
            "description": "Full mode only. Use TikTok's recommended order or newest reviews first.",
            "default": "recommended"
          },
          "trackChanges": {
            "title": "📈 Track price, sales, and stock changes",
            "type": "boolean",
            "description": "Full mode only. Save a private product snapshot and calculate sold velocity, price changes, and stock movement from the second run onward.",
            "default": false
          },
          "includeRawDetail": {
            "title": "Include raw full-detail payload",
            "type": "boolean",
            "description": "Full mode only. Store the complete product-detail API response in rawDetailJson. Enable for debugging because rows become much larger.",
            "default": false
          },
          "fullConcurrency": {
            "title": "Full-detail concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Full mode only. Number of products enriched in parallel. Higher is faster; lower it if you hit blocks.",
            "default": 8
          },
          "detailTimeoutSec": {
            "title": "Full-detail timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Full mode only. Timeout for each product-detail or review request.",
            "default": 18
          },
          "detailMaxRetries": {
            "title": "Full-detail retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Full mode only. Additional attempts with a fresh proxy when a product detail request is blocked or temporarily unavailable.",
            "default": 2
          },
          "page": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "First search results page to fetch.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many keywords to process in parallel.",
            "default": 1
          },
          "requestTimeoutSec": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "HTTP request timeout.",
            "default": 20
          },
          "maxRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Retries on 429/5xx, captcha/security pages, and parse failures.",
            "default": 2
          },
          "maxProxyRetries": {
            "title": "Max proxy retries per page",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Dedicated retry budget for proxy / transport failures.",
            "default": 2
          },
          "requestDelayMs": {
            "title": "Delay between pages",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional pause between pages for the same keyword.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is strongly recommended for reliable TikTok Shop US search and product-detail requests.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "country_code": {
            "title": "Legacy API country code",
            "type": "string",
            "description": "Hidden compatibility field for existing API clients. Unsupported legacy markets finish safely with INPUT_NEEDS_ATTENTION and never return relabeled US data.",
            "default": ""
          },
          "countryCode": {
            "title": "Legacy camelCase country code",
            "type": "string",
            "description": "Hidden compatibility field for existing API clients.",
            "default": ""
          },
          "keyword": {
            "title": "Legacy single keyword",
            "type": "string",
            "description": "Hidden compatibility field for users of the original simple keyword input.",
            "default": ""
          },
          "limit": {
            "title": "Legacy limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hidden compatibility field. maxItems is used by the current UI.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}