{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper: Products, Sales & Sold Counts",
    "description": "Get units sold for TikTok Shop products and track sales over time. Give it keywords, a US or UK best-seller list, product links or store links; get one row per product with price, discount, rating, reviews, seller and units sold. Schedule it to see sales since the last run. From $1 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "EjZX5BhSQIeJlk18R"
  },
  "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), up to 3 runs a day.",
            "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"
            }
          },
          "alerts": {
            "title": "Sales alerts",
            "type": "boolean",
            "description": "Off by default; when off, the actor works exactly as without this add-on. When on, each run compares every keyword, bestseller list, product or store with its previous run and lists products selling fast (see the next field). Alerts go to this run's Alerts tab and, if set below, to Slack and Notion. The first run of each input only saves a baseline. Turns on \"Track units sold since last run\". Costs USD 0.01 per run that finds alerts; runs without alerts cost nothing extra. Schedule the actor (daily works well) to get alerts.",
            "default": false
          },
          "alertMinSoldPerDay": {
            "title": "Alert when sold per day reaches",
            "minimum": 1,
            "type": "integer",
            "description": "A product alerts when its units sold since the last run, per day, reach this number. Needs at least one hour between runs. A steady best seller above it alerts on every run, so raise it if you get too many.",
            "default": 100
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (optional)",
            "type": "string",
            "description": "A Slack incoming-webhook link (starts with https://hooks.slack.com/services/). The alerts are posted to its channel. Kept secret: it never shows in logs or results. The README shows how to make one in two minutes."
          },
          "notionConnector": {
            "title": "Notion connector (optional)",
            "type": "string",
            "description": "Your Notion account, connected once in Apify Console (Settings > API & Integrations > MCP connectors > Add connector > Notion). The actor can only read pages and create pages and its alerts database; it can't edit or delete anything."
          },
          "notionPageUrl": {
            "title": "Notion page link (optional)",
            "type": "string",
            "description": "A Notion page for the alerts. The first run creates a \"TikTok Shop alerts\" database on it and later runs add one row per product. A link to a database with the same columns also works."
          },
          "proxyConfiguration": {
            "title": "Proxy (not used)",
            "type": "object",
            "description": "Not needed: the actor manages its own connection and ignores this field. Accepted so inputs copied from other scrapers still run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}