{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper with Sold Counts",
    "description": "Scrape TikTok Shop products with real sold counts: keyword search, bestseller lists, full product details with SKUs and stock, and store catalogues. Flat rows with price, discount, rating, reviews, seller and units sold. Pay per row, no start fee; failed inputs are free.",
    "version": "0.1",
    "x-build-id": "MmgMo0oSZe5ElZ4vR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wheaten_steelpan~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wheaten_steelpan-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/wheaten_steelpan~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-wheaten_steelpan-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/wheaten_steelpan~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-wheaten_steelpan-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "bestsellers",
              "product",
              "store"
            ],
            "type": "string",
            "description": "Search: products matching keywords. Bestsellers: a market's best-selling products, ranked by units sold. Product details: full pages for product links or ids, with SKUs, stock, categories and shop stats. Store: a store's stats and product catalogue. Fill in the section for the mode you pick; the others are ignored. On Apify's free plan, a run stops after 100 products (10 in product details mode).",
            "default": "search"
          },
          "maxResults": {
            "title": "Max products per keyword, list or store (limited for free users)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each keyword, bestseller list or store after this many products. Search pages hold 30 products and store pages 50. Bestseller lists hold at most 100. Not used for product details. On Apify's free plan, a whole run stops after 100 products.",
            "default": 30
          },
          "trackSoldSinceLastRun": {
            "title": "Track units sold since last run",
            "type": "boolean",
            "description": "Adds \"Sold since last run\" and \"Hours since last run\" to each row: the change in units sold since an earlier run of this actor saw the same product. Turn it on for scheduled runs. The counts are kept in a key-value store named tiktok-shop-sold-history in your account, shared by all your runs. Empty on a product's first run. Free.",
            "default": false
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "One search per keyword in the US TikTok Shop, e.g. led strip lights. Each product found is one row.",
            "items": {
              "type": "string"
            }
          },
          "bestsellersRegion": {
            "title": "Bestsellers market",
            "enum": [
              "US",
              "GB"
            ],
            "type": "string",
            "description": "The market whose best-selling products you want.",
            "default": "US"
          },
          "bestsellersCategories": {
            "title": "Categories (optional)",
            "type": "array",
            "description": "Category links or ids to rank within, one list each, e.g. https://www.tiktok.com/shop/c/beauty-personal-care/601450 or 601450. Leave empty for the whole market.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "Products (limited for free users)",
            "type": "array",
            "description": "Product links or ids, e.g. https://www.tiktok.com/shop/pdp/…/1732714053565124892 or 1732714053565124892. One row each. Short vm.tiktok.com links aren't supported; open them and copy the full link.",
            "items": {
              "type": "string"
            }
          },
          "productRegion": {
            "title": "Product market",
            "enum": [
              "US",
              "GB"
            ],
            "type": "string",
            "description": "The market the products are sold in.",
            "default": "US"
          },
          "stores": {
            "title": "Stores",
            "type": "array",
            "description": "US store links or seller ids, e.g. https://www.tiktok.com/shop/store/glowwinner-us/7496322034243111196. Any product row's seller id works. Each store gives one summary row (free) and one row per product.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}