{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper",
    "description": "TikTok Shop scraper for product research. Search products by keyword, optionally inside a category, or paste product links. Export price, discount, units sold, estimated 7- and 28-day sales and revenue (GMV), commission rate, rating and shop. 15 markets. No login. $0.15 per 100 products.",
    "version": "0.12",
    "x-build-id": "iPOgP514hOyro1yup"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-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/deepmine~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-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/deepmine~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-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": {
          "queries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "What you'd type in TikTok Shop's search, one per line, e.g. \"led face mask\" or \"phone case\". One row per product. Leave empty when you only paste product or shop links below.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "🔗 Or product links or IDs",
            "type": "array",
            "description": "TikTok Shop product links (shop.tiktok.com/.../pdp/...) or product IDs. One row per product with its product page (US store): images, video, variants with stock, shipping and seller stats, plus sales analytics.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "💯 Max products per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "The maximum number of unique products to save per keyword. The Console starts at 100. You pay per saved product.",
            "default": 300
          },
          "includeDetails": {
            "title": "🧾 Add product page details",
            "type": "boolean",
            "description": "Also open each product's page and add every image, the video, category, specifications, description, variants with stock, shipping fee and delivery time, ships-from, the shop's rating, followers and product count, the 3 top reviews and the star counts. No extra charge, but runs take longer. US store only.",
            "default": false
          },
          "includeSalesAnalytics": {
            "title": "📊 Add sales analytics",
            "type": "boolean",
            "description": "Add units sold and revenue for yesterday and the last 7, 14 and 28 days, 7-day growth, commission rate, the share of orders that came through creators, and creator, video and live counts. These are FastMoss estimates. No extra charge.",
            "default": true
          },
          "region": {
            "title": "🌏 Market",
            "enum": [
              "US",
              "GB",
              "ID",
              "MY",
              "PH",
              "SG",
              "VN",
              "TH",
              "DE",
              "FR",
              "IT",
              "ES",
              "IE",
              "MX",
              "BR",
              "JP"
            ],
            "type": "string",
            "description": "TikTok Shop market to search. 15 markets with products (Ireland gives none yet); where TikTok's own search does not answer, rows come from FastMoss's product search for that market.",
            "default": "US"
          },
          "sortBy": {
            "title": "🧭 Sort keyword results",
            "enum": [
              "relevance",
              "bestsellers",
              "newest",
              "sales7d",
              "sales30d",
              "revenue"
            ],
            "type": "string",
            "description": "TikTok Shop's own order. Best sellers = TikTok Shop's best-seller ranking, not a strict order by units sold. TikTok Shop's search doesn't sort by price.",
            "default": "relevance"
          },
          "categoryIds": {
            "title": "🗂️ Categories (links or IDs)",
            "type": "array",
            "description": "TikTok Shop category links (tiktok.com/shop/c/...) or IDs, e.g. 849416 = Personal Care Appliances. Narrows every keyword search to these categories (US store; use second-level categories). Needs at least one keyword: categories alone are not listed yet. Empty = all categories.",
            "items": {
              "type": "string"
            }
          },
          "minSold": {
            "title": "📦 Min units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products with at least this many lifetime units sold. Empty = no limit."
          },
          "minSold7d": {
            "title": "Min units sold in the last 7 days",
            "minimum": 0,
            "type": "integer",
            "description": "Drop products that sold fewer units in the last 7 days."
          },
          "maxSold": {
            "title": "📦 Max units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products with at most this many lifetime units sold (find new or rising products). Products with no sales yet pass. Empty = no limit."
          },
          "minPrice": {
            "title": "💵 Min price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products priced at or above this. Empty = no limit."
          },
          "maxPrice": {
            "title": "💵 Max price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products priced at or below this. Empty = no limit."
          },
          "minRating": {
            "title": "⭐ Min rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products rated at least this (1-5); products with no rating yet are left out. Empty = no limit."
          },
          "minReviews": {
            "title": "💬 Min reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products with at least this many reviews. Empty = no limit."
          },
          "onlyDiscounted": {
            "title": "🏷️ Only discounted products",
            "type": "boolean",
            "description": "Keep only products that are on sale (they have an original price and a % off).",
            "default": false
          },
          "minDiscountPercent": {
            "title": "🏷️ Min discount %",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only products at least this much off their original price (20 = 20% off or more). Empty = no limit."
          },
          "onlyFreeShipping": {
            "title": "🚚 Only free shipping",
            "type": "boolean",
            "description": "Keep only products TikTok Shop marks with free shipping.",
            "default": false
          },
          "onlySellers": {
            "title": "✅ Only these shops",
            "type": "array",
            "description": "Keep only products from these shops: a shop link, a seller ID, or the shop name (whole words, any case). Empty = every shop.",
            "items": {
              "type": "string"
            }
          },
          "excludeSellers": {
            "title": "🚫 Exclude shops",
            "type": "array",
            "description": "Skip products from these shops: a shop link, a seller ID, or the shop name (whole words, any case: \"jisulife\" skips \"JisuLife US\").",
            "items": {
              "type": "string"
            }
          },
          "excludeTitleWords": {
            "title": "🚫 Exclude title words",
            "type": "array",
            "description": "Skip products whose title has one of these words or phrases (whole words, any case: \"case\" skips \"Phone Case\" but not \"Suitcase\").",
            "items": {
              "type": "string"
            }
          },
          "requireAllQueryTokens": {
            "title": "🎯 Title must contain every keyword word",
            "type": "boolean",
            "description": "Off: every product TikTok Shop shows for the keyword, in its order. On: only products whose title has every word of the keyword.",
            "default": false
          },
          "minimumQueryTokenMatches": {
            "title": "🔤 Title must contain at least … keyword words",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "A looser version of the option above, used only when it is off. Empty = keep every product."
          },
          "trackChanges": {
            "title": "📈 Track changes since the last run",
            "type": "boolean",
            "description": "Not read yet by this Actor; kept so inputs from TikTok Shop Search Pro still run (OUTPUT notes it).",
            "default": false
          },
          "historyStoreName": {
            "title": "🗄️ History store name",
            "type": "string",
            "description": "Not read yet by this Actor; kept so inputs from TikTok Shop Search Pro still run (OUTPUT notes it)."
          },
          "includeRawProduct": {
            "title": "🧾 Add TikTok's raw product object",
            "type": "boolean",
            "description": "Adds rawProduct, TikTok Shop's full product payload, to each row. Turn it off for smaller, cleaner rows. On for API calls that don't send it.",
            "default": false
          },
          "maxPagesPerQuery": {
            "title": "📄 Max pages per search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Most result pages per keyword or shop (25-30 products each). Stops early when TikTok Shop has no more.",
            "default": 10
          },
          "requestTimeoutSec": {
            "title": "⏱️ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-request HTTP timeout. Increase if you see frequent timeouts on slow proxy routes.",
            "default": 30
          },
          "maxFetchRetries": {
            "title": "🔁 Max fetch retries",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Attempts per page request, each from a new IP, before the page counts as refused.",
            "default": 5
          },
          "queryRetryAttempts": {
            "title": "🔁 Search retry attempts",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many other IPs to try per query when TikTok Shop gives a short or refused answer.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy is enough.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}