{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Sales Tracker: Units Sold per Day & Top Products",
    "description": "Know what's selling on TikTok Shop and how fast: exact units sold, units and revenue per day, rising products and GMV for every product, keyword, shop and category you track. Whole shop catalogues, deep keyword lists, stock per variant, filters, changes only. US, from $3 per 1,000 products.",
    "version": "0.2",
    "x-build-id": "HWiNLrVFeg2zbkEUf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleanpull~tiktok-shop-sales-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleanpull-tiktok-shop-sales-tracker",
        "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/cleanpull~tiktok-shop-sales-tracker/runs": {
      "post": {
        "operationId": "runs-sync-cleanpull-tiktok-shop-sales-tracker",
        "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/cleanpull~tiktok-shop-sales-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-cleanpull-tiktok-shop-sales-tracker",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One per line. Products TikTok Shop lists for each term, in TikTok's order, with exact units sold. Use real shopping terms (\"lip gloss\", \"protein powder\"); a term TikTok has no page for is skipped with a note.",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerKeyword": {
            "title": "Products per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many products to read for each keyword (about 30 per page; the actor follows TikTok's \"View more\" pages until the end of the list).",
            "default": 100
          },
          "shops": {
            "title": "Shops",
            "type": "array",
            "description": "Optional. TikTok Shop store URLs (shop.tiktok.com/us/store/name/ID) or seller IDs. Each shop's totals and its catalogue, with units sold per day for the whole shop.",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerShop": {
            "title": "Products per shop",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many of each shop's products to read (20 per page). Set it above the shop's product count to cover the whole shop.",
            "default": 200
          },
          "products": {
            "title": "Products",
            "type": "array",
            "description": "Optional. TikTok Shop product URLs (…/pdp/name/ID or …/view/product/ID) or product IDs, to track exactly these. Each is read from its product page (variants with stock included).",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs",
            "type": "array",
            "description": "Optional. TikTok Shop category pages (shop.tiktok.com/us/c/name/ID). Category lists change from visit to visit, so use them to discover products; track what you find through keywords, shops or products.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPagesPerCategory": {
            "title": "Pages per category",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Category pages to read (15 products each).",
            "default": 3
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. Any mix of TikTok Shop product, store, category and keyword URLs; each is read as its kind.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Dataset of products or shops",
            "type": "string",
            "description": "Optional. Another dataset (for example a previous run) whose rows hold TikTok Shop product or store URLs or IDs."
          },
          "datasetField": {
            "title": "Dataset field",
            "type": "string",
            "description": "The field holding the URL or ID in that dataset. Bare IDs are read as products, or as shops when the field name mentions seller, shop or store.",
            "default": "url"
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Units sold per day are measured against the last run with the same monitor name. Use one name per list you track; the first run under a name is the baseline.",
            "default": "default"
          },
          "changesOnly": {
            "title": "Changes only",
            "type": "boolean",
            "description": "Deliver only products that sold, changed price or are new since the last run (and stock changes for products listed directly, which are read from their pages). Unchanged products are billed at the lower checked rate. The first run delivers everything.",
            "default": false
          },
          "minUnitsPerDay": {
            "title": "Minimum units per day",
            "minimum": 0,
            "type": "number",
            "description": "Leave out products selling fewer units per day than this. Products without a velocity yet (first seen this run) are kept. Filtered products are still read and remembered, and are not billed.",
            "default": 0
          },
          "includeProductDetails": {
            "title": "Product details",
            "type": "boolean",
            "description": "Also read each delivered product's page: stock and price per variant, specifications, all images, categories, star breakdown, featured reviews and the shop's totals. Billed per product page.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Leave out products cheaper than this (USD). Filters apply to products found through keywords, shops and categories; products you list directly are always delivered."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Leave out products dearer than this (USD)."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Optional. Leave out products rated below this (0–5)."
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Leave out products with fewer reviews."
          },
          "minUnitsSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Leave out products that have sold fewer units in total."
          },
          "onlyDiscounted": {
            "title": "Discounted only",
            "type": "boolean",
            "description": "Only products on sale (TikTok shows a discount on the card).",
            "default": false
          },
          "onlyFreeShipping": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Only products with free shipping.",
            "default": false
          },
          "titleIncludes": {
            "title": "Title must include",
            "type": "array",
            "description": "Optional. Words every product title must contain (case does not matter).",
            "items": {
              "type": "string"
            }
          },
          "titleExcludes": {
            "title": "Title must not include",
            "type": "array",
            "description": "Optional. Leave out products whose title contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "sellers": {
            "title": "Only these sellers",
            "type": "array",
            "description": "Optional. Seller IDs, shop names or store URLs; only their products are delivered.",
            "items": {
              "type": "string"
            }
          },
          "excludeSellers": {
            "title": "Leave out these sellers",
            "type": "array",
            "description": "Optional. Seller IDs, shop names or store URLs whose products are left out.",
            "items": {
              "type": "string"
            }
          },
          "lowStockThreshold": {
            "title": "Low stock at",
            "minimum": 0,
            "type": "integer",
            "description": "With product details, a product with this many units or fewer in stock is marked lowStock.",
            "default": 10
          },
          "includeSummaries": {
            "title": "Summary per keyword, shop, category and product list",
            "type": "boolean",
            "description": "One summary row per keyword, category and shop, and one for the products you list directly: units sold per day in total, the top 10 sellers, rising and new products.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop after this many product rows. When it cuts the list, the fastest sellers are kept."
          },
          "fields": {
            "title": "Fields",
            "type": "array",
            "description": "Optional. Only these fields in each row (dot paths like details.stock). recordType is always kept.",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keywords, shops and product pages read at the same time.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. By default the actor picks its own route (direct, then US proxies, as needed)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}