{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper & API: Products, Sales & Stock",
    "description": "Scrape TikTok Shop US products by keyword, product link or store: price, discount, items sold, rating, reviews, stock per variant, SKUs, GTIN/UPC, shop, shipping. Top-selling products per keyword. Sales tracker: items sold since the last run. No login.",
    "version": "0.1",
    "x-build-id": "JF8gAzrRhaGcaE80r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": "Search TikTok Shop US like the shop's own search: one keyword or short phrase per line (e.g. portable blender, lip gloss, phone case). TikTok gives up to ~250 products per keyword; long exact phrases often return nothing, so keep them short.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "🛍️ Product links or IDs",
            "type": "array",
            "description": "TikTok Shop product pages, one per line: shop.tiktok.com/us/pdp/<name>/<id>, www.tiktok.com/shop/pdp/<id>, shop.tiktok.com/view/product/<id>, or the 19-digit product ID. Always returned with full details (stock per variant, GTIN, shipping).",
            "items": {
              "type": "string"
            }
          },
          "storeUrls": {
            "title": "🏪 Store links or seller IDs",
            "type": "array",
            "description": "TikTok Shop stores, one per line: shop.tiktok.com/us/store/<name>/<seller id>, www.tiktok.com/shop/store/<name>/<seller id>, or the seller ID. Returns the store's catalogue, best sellers first.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max products per keyword",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Products to return for each search keyword (TikTok Shop gives at most ~250 per keyword). With a sort or a filter, the Actor reads all products TikTok gives for the keyword and returns the best ones.",
            "default": 50
          },
          "maxItemsPerStore": {
            "title": "🔢 Max products per store",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Products to return for each store, best sellers first. 0 = the whole catalogue (up to 2,000).",
            "default": 100
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "relevance",
              "best_selling",
              "price_low",
              "price_high",
              "rating",
              "reviews",
              "discount"
            ],
            "type": "string",
            "description": "Order of products for each keyword and store. Best selling = the top-selling TikTok Shop products for your keyword: the Actor reads everything TikTok gives (~250) and returns the Max products per keyword with the most items sold.",
            "default": "relevance"
          },
          "includeDetails": {
            "title": "📦 Include stock, variants and GTIN",
            "type": "boolean",
            "description": "Open each product's page for stock (units available per variant and in total), every variant (SKU) with its price and stock, GTIN / UPC barcode, description, specifications, shipping fee and delivery time, and the seller's business name and address. Same price per product; turn off only for faster runs with list data (price, sold count, rating, shop).",
            "default": true
          },
          "minPrice": {
            "title": "💲 Min price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only products priced at least this much."
          },
          "maxPrice": {
            "title": "💲 Max price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only products priced at most this much."
          },
          "minSoldCount": {
            "title": "🔥 Min items sold",
            "minimum": 0,
            "type": "integer",
            "description": "Only products that have sold at least this many items (TikTok's sold count since the product was listed): find proven winners."
          },
          "minRating": {
            "title": "⭐ Min rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only products rated at least this (0-5)."
          },
          "onlyDiscounted": {
            "title": "🏷️ Only discounted products",
            "type": "boolean",
            "description": "Only products with an original (crossed-out) price above the current price.",
            "default": false
          },
          "trackChanges": {
            "title": "📈 Track sales, price and stock between runs",
            "type": "boolean",
            "description": "For scheduled runs (save the input as a task and add a schedule, e.g. daily). Each product gets soldSinceLastRun (items sold since the previous run = sales velocity), priceChange, stockChange, previous values and isNew. The first run remembers the numbers; changes appear from the second run.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Tracker name",
            "type": "string",
            "description": "Name of the memory used by the sales tracker. Use a different name for each task, otherwise two tasks share the same previous values.",
            "default": "default"
          },
          "debugLog": {
            "title": "🐞 Debug log",
            "type": "boolean",
            "description": "Log every request and retry.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}