{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper",
    "description": "Scrape TikTok Shop products by keyword, category, best-seller ranking, store or URL: price, units sold, revenue, rating, variants with stock, shipping, shop stats, the creators promoting each product and full buyer reviews. 7- and 30-day sales. No login.",
    "version": "0.1",
    "x-build-id": "2FPZqWZCBmdtQ4QMq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-tiktok-shop-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/lergassy~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-tiktok-shop-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/lergassy~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-tiktok-shop-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": "Give this, <b>Start URLs</b> or <b>Best sellers</b>. Product keywords as a shopper would type them — <b>air fryer</b>, <b>phone case</b>, <b>protein powder</b>. Each keyword is one source; up to <b>Max products per source</b> rows each. Keyword search works on TikTok Shop US. When a keyword runs out before the limit, the run widens to TikTok's related searches and category (see foundVia).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Give this, <b>Search keywords</b> or <b>Best sellers</b>. TikTok Shop links: product (<code>/pdp/…</code>), store (<code>/store/…</code>), category (<code>/c/…</code>), search (<code>/s?q=…</code>) or best sellers (<code>/events/ranking-list</code>). Both <code>shop.tiktok.com/us/…</code> and <code>www.tiktok.com/shop/…</code> work. The country is taken from the link: US, UK, Thailand, Malaysia, Singapore, Philippines and Vietnam shops are supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "bestSellers": {
            "title": "🏆 Best sellers",
            "type": "boolean",
            "description": "Add TikTok Shop's own best-seller ranking (\"Trending Now: Top Best Sellers\") for the chosen country — the most sold products right now, up to Max products per source.",
            "default": false
          },
          "country": {
            "title": "🌍 Country",
            "enum": [
              "US",
              "GB",
              "TH",
              "MY",
              "SG",
              "PH",
              "VN"
            ],
            "type": "string",
            "description": "TikTok Shop market for keywords and best sellers. Keyword search and best sellers exist on the US shop; for the UK and Southeast Asia (Thailand, Malaysia, Singapore, Philippines, Vietnam) use category, store or product URLs. Links carry their own country.",
            "default": "US"
          },
          "maxProductsPerSource": {
            "title": "💯 Max products per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of product rows from each keyword, category, store or ranking. Products dropped by filters and duplicates are not charged.",
            "default": 30
          },
          "sortBy": {
            "title": "↕️ Sort products by",
            "enum": [
              "relevance",
              "soldCount",
              "revenue",
              "sold7d",
              "sold30d",
              "rating",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Any order other than TikTok's reads deeper into the list (up to 5× your limit) and returns the top products by this measure. Last 7 / 30 days come from our daily sales history; products we have not tracked yet go last.",
            "default": "relevance"
          },
          "productDetails": {
            "title": "📦 Product page details",
            "type": "boolean",
            "description": "Open every product page: variants with stock, total stock, min/max price, rating breakdown 1–5, description, specifications, all images, shipping fee and delivery days, category path, latest reviews and shop stats (shop units sold, followers, rating). Included in the product price.",
            "default": true
          },
          "includeCreators": {
            "title": "🎬 Creators promoting each product ($)",
            "type": "boolean",
            "description": "Adds one creator row per TikTok creator whose videos sell the products: username, promo videos with views and likes, \"earns commission\" flag, promoted products. Product rows get creatorCount and creatorVideoViews. Each creator row is charged as a creator.",
            "default": false
          },
          "creatorProfiles": {
            "title": "👤 Creator profile stats",
            "type": "boolean",
            "description": "With creators on: add followers, total likes, video count, bio, bio link, e-mail in bio and verified flag from each creator's TikTok profile. No extra charge.",
            "default": true
          },
          "maxCreatorsPerProduct": {
            "title": "Max creators per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many creators to take from each product's video block (TikTok shows up to ~20 videos per product).",
            "default": 10
          },
          "maxReviewsPerProduct": {
            "title": "💬 Full reviews per product ($)",
            "minimum": 0,
            "maximum": 25000,
            "type": "integer",
            "description": "0 = off. Adds one row per buyer review of each product: star rating, text, date, photos, variant bought, verified-purchase flag and reviewer. Up to 25,000 per product (TikTok shows about 5,000 per order and filter; above that the run walks every star rating, both orders, photo and verified filters and drops duplicates). TikTok Shop US and UK products. Each review row is charged as a review.",
            "default": 0
          },
          "reviewsSort": {
            "title": "Review order",
            "enum": [
              "newest",
              "recommended"
            ],
            "type": "string",
            "description": "Newest first is the one to schedule for tracking new reviews.",
            "default": "newest"
          },
          "reviewsFilter": {
            "title": "Which reviews",
            "enum": [
              "all",
              "5",
              "4",
              "3",
              "2",
              "1",
              "media",
              "verified"
            ],
            "type": "string",
            "description": "Pick one star rating to read complaints (1–2 stars) or praise (5 stars) in depth.",
            "default": "all"
          },
          "trackSales": {
            "title": "📈 Track sales between runs",
            "type": "boolean",
            "description": "Also remembers each product's units sold in your own account (key-value store <code>tiktok-shop-sales-history</code>) and adds soldSinceLastCheck and dailySalesEstimate from your second run on. Daily sales for the last 7 / 30 days (sold7d, sold30d) come from our shared history and do not need this.",
            "default": true
          },
          "minSoldCount": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Skip products with fewer units sold. Skipped products are free.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Skip products cheaper than this, in the market's currency (USD, GBP, THB, MYR, SGD, PHP, VND). 0 = no floor.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Skip products more expensive than this, in the market's currency. 0 = no ceiling.",
            "default": 0
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Skip products rated below this (1–5). 0 = keep all, including products without reviews.",
            "default": 0
          },
          "concurrency": {
            "title": "Parallel product pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many product pages to open at the same time.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}