{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper (Exact Sold Counts, No Login)",
    "description": "Scrape TikTok Shop products with a category filter, by keyword, category, store or product link: price, discount, exact sold count, units sold since your last run, rating, reviews and variants with stock. US and UK shops. Filtered-out products are never charged. No login. $1 per 1,000 products.",
    "version": "0.1",
    "x-build-id": "ue8uR5Q5gAzjoftML"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~tiktok-shop/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-tiktok-shop",
        "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/locaihost~tiktok-shop/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-tiktok-shop",
        "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/locaihost~tiktok-shop/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-tiktok-shop",
        "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": "Products for a search phrase, as TikTok Shop's own keyword page shows them (usually 25 to 30 per keyword). US shop only: the UK shop has no keyword pages for logged-out visitors, so use category or store links there.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "TikTok Shop links",
            "type": "array",
            "description": "Product, store, category or keyword links from shop.tiktok.com or www.tiktok.com/shop, or bare product ids. A store or category gives the products TikTok shows on that page (usually 10 to 20); a product link gives that product with full details. Repeats are read and charged once.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (optional)",
            "type": "array",
            "description": "Only products in these TikTok Shop categories. On its own, it reads each category's own TikTok Shop page (10 to 20 products each). With keywords or links, it keeps only their products in these categories: products from a category link are checked against that link's category, and products from keyword or store pages on their own product page (so they come with full details). Products outside the categories, or whose category TikTok won't show, are left out and not charged.",
            "items": {
              "type": "string",
              "enum": [
                "automotive-motorcycle",
                "baby-maternity",
                "beauty-personal-care",
                "books-magazines-audio",
                "collectibles",
                "computers-office-equipment",
                "fashion-accessories",
                "food-beverages",
                "furniture",
                "health",
                "home-improvement",
                "home-supplies",
                "household-appliances",
                "jewelry-accessories-derivatives",
                "kids-fashion",
                "kitchenware",
                "luggage-bags",
                "menswear-underwear",
                "modest-fashion",
                "pet-supplies",
                "phones-electronics",
                "pre-owned",
                "shoes",
                "sports-outdoor",
                "textiles-soft-furnishings",
                "tools-hardware",
                "toys-hobbies",
                "womenswear-underwear"
              ],
              "enumTitles": [
                "Automotive & Motorcycle",
                "Baby & Maternity",
                "Beauty & Personal Care",
                "Books, Magazines & Audio",
                "Collectibles",
                "Computers & Office Equipment",
                "Fashion Accessories",
                "Food & Beverages",
                "Furniture",
                "Health",
                "Home Improvement",
                "Home Supplies",
                "Household Appliances",
                "Jewelry Accessories & Derivatives",
                "Kids' Fashion",
                "Kitchenware",
                "Luggage & Bags",
                "Menswear & Underwear",
                "Modest Fashion",
                "Pet Supplies",
                "Phones & Electronics",
                "Pre-Owned",
                "Shoes",
                "Sports & Outdoor",
                "Textiles & Soft Furnishings",
                "Tools & Hardware",
                "Toys & Hobbies",
                "Womenswear & Underwear"
              ]
            }
          },
          "country": {
            "title": "Shop country",
            "enum": [
              "US",
              "GB",
              "SG",
              "MY",
              "TH",
              "VN",
              "ID",
              "PH",
              "JP",
              "MX",
              "BR"
            ],
            "type": "string",
            "description": "Which TikTok Shop to read keywords and bare product ids from. Links keep their own country (/us/, /gb/). The US and UK shops are open to logged-out visitors. The others show a puzzle check instead of their pages; we try once and say so, and never solve it.",
            "default": "US"
          },
          "maxProductsPerSource": {
            "title": "Products per keyword, store or category",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Most products to take from one keyword, store or category page. TikTok shows logged-out visitors 5 to 30 per page, so higher values return what the page has.",
            "default": 30
          },
          "maxProducts": {
            "title": "Most products in this run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The run stops after this many products. Each product is charged once per run, however many of your keywords or links show it.",
            "default": 500
          },
          "includeDetails": {
            "title": "Full product details",
            "type": "boolean",
            "description": "Also open each product's own page for variants with stock, the category path, brand, specifications, the rating breakdown, delivery days and the shop's rating, followers and total sold. Same price per product; slower. Product links always get full details.",
            "default": false
          },
          "onlyNew": {
            "title": "Only products not returned before",
            "type": "boolean",
            "description": "Skip products this saved task (or, without a task, your account) already received in an earlier run. Good for spotting new listings in a niche every day.",
            "default": false
          },
          "onlySold": {
            "title": "Only products that sold since the last run",
            "type": "boolean",
            "description": "Skip products whose sold count hasn't moved since you last received them, so a daily run returns (and charges for) only the movers. Products seen for the first time are always returned.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price (optional)",
            "minimum": 0,
            "type": "number",
            "description": "Leave out products priced below this, in the shop's own currency (US dollars in the US shop, pounds in the UK shop). Products left out by any filter are not charged."
          },
          "maxPrice": {
            "title": "Maximum price (optional)",
            "minimum": 0,
            "type": "number",
            "description": "Leave out products priced above this, in the shop's own currency."
          },
          "minRating": {
            "title": "Minimum rating (optional)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Leave out products rated below this many stars, e.g. 4.5. Products with no rating yet are left out too."
          },
          "minSoldCount": {
            "title": "Minimum units sold (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out products with fewer units sold than this, e.g. 1000. Compared with the exact soldCount column, all-time sales across the shop."
          },
          "sortBy": {
            "title": "Sort products (optional)",
            "enum": [
              "soldCount",
              "soldPerDay",
              "price",
              "rating"
            ],
            "type": "string",
            "description": "Order the products from each keyword, category, store or link: most units sold, most sold per day (needs an earlier run of the same task), lowest price first, or highest rating first. With a limit per source it keeps the top ones on the page. Leave empty for TikTok's own page order. Every row also gets a rank within its source."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy by default. US pages start on datacenter proxies and switch to US residential only if TikTok pushes back. UK pages need a UK address, so they go through UK residential proxies. Residential exits are always pinned to the shop's country. Proxy costs are included in the price.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}