{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper",
    "description": "Scrape TikTok Shop products by keyword, product, store or category link: prices, discounts, units sold, ratings, sellers, stock, SKUs, specs, shipping and reviews. US plus Vietnam, Malaysia, Philippines, Thailand and Singapore. No login.",
    "version": "0.0",
    "x-build-id": "zFeXEvKyxWGhpmAcx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/calm_builder~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-calm_builder-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/calm_builder~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-calm_builder-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/calm_builder~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-calm_builder-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "What to search TikTok Shop for, one per row, as you would type it into the Shop search bar.\n\nExamples: `led face mask`, `phone case`, `lip gloss`",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "TikTok Shop links",
            "type": "array",
            "description": "Product, store, category or Shop search links (United States).\n\n- Product: `https://shop.tiktok.com/us/pdp/.../1729527313880355335`\n- Store: `https://shop.tiktok.com/us/store/goli-nutrition/7495794203056835079` (the whole catalogue)\n- Category: `https://shop.tiktok.com/us/c/phone-cases/909576` (subcategories included)\n- Search: `https://shop.tiktok.com/us/s?q=led+mask`",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "vn",
              "my",
              "ph",
              "th",
              "sg"
            ],
            "type": "string",
            "description": "Which TikTok Shop to search. Prices come in that country's currency. Product, store and category links, full details and reviews are available for the United States; the other countries support keyword search.",
            "default": "us"
          },
          "maxProductsPerInput": {
            "title": "Maximum products per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many products to collect for each keyword, store or category. A keyword returns up to a few hundred products (TikTok Shop's own limit per search); stores return their whole catalogue; categories include their subcategories, so large categories go into the thousands.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include full product details ($)",
            "type": "boolean",
            "description": "Add everything from the product page to each product: stock, every variant (SKU) with its own price and stock, specifications, description, categories, shipping fee and delivery time, rating breakdown (1-5 stars) and seller details (rating, followers, products, units sold, official shop label, business name).\n\nProduct links always include full details.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews ($)",
            "type": "boolean",
            "description": "Also collect each product's reviews: rating, text, date, variant, verified purchase, reviewer and photos. Reviews go to their own **Reviews** table.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Maximum reviews per product",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many reviews to collect for each product (newest and most relevant first).",
            "default": 20
          },
          "sortBy": {
            "title": "Sort products by",
            "enum": [
              "relevance",
              "best_selling",
              "price_low",
              "price_high",
              "rating",
              "most_reviewed"
            ],
            "type": "string",
            "description": "Order of the products for each input. Anything other than TikTok Shop order looks at a wider set of products first, then keeps your maximum.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price (in the country's currency)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price (in the country's currency)."
          },
          "minSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Only products that have sold at least this many units."
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "3",
              "3.5",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Only products with at least this average rating."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}