{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper - Products, Prices & Sales (Cheap)",
    "description": "Scrape TikTok Shop US products by keyword: prices, discounts, units sold, ratings, reviews, shops and creator videos. Optional product pages add stock levels, variants, specs and reviews.",
    "version": "1.0",
    "x-build-id": "rab9MNeiNtmwmWCeL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codetr~tiktok-shop-product-scraper-cheap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codetr-tiktok-shop-product-scraper-cheap",
        "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/codetr~tiktok-shop-product-scraper-cheap/runs": {
      "post": {
        "operationId": "runs-sync-codetr-tiktok-shop-product-scraper-cheap",
        "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/codetr~tiktok-shop-product-scraper-cheap/run-sync": {
      "post": {
        "operationId": "run-sync-codetr-tiktok-shop-product-scraper-cheap",
        "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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Product keywords to search on TikTok Shop, one per line. Common product terms work best (for example <code>lip gloss</code>, <code>phone case</code>, <code>air fryer</code>). If TikTok has no page for an exact phrase, the closest matching TikTok suggestion is used automatically.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "TikTok Shop URLs",
            "type": "array",
            "description": "Optional. Keyword pages (<code>https://shop.tiktok.com/us/k/phone-case</code>) are scraped like a search. Product pages (<code>https://shop.tiktok.com/us/pdp/.../1729407202568147235</code>) return full product details for that single product.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResultsPerQuery": {
            "title": "Max products per keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of products to return for each keyword or keyword URL. TikTok exposes roughly 100-250 products per keyword; use related keywords below to go wider.",
            "default": 100
          },
          "maxItems": {
            "title": "Max products in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard limit on the total number of products across all keywords. The run stops cleanly once it is reached.",
            "default": 1000
          },
          "expandRelatedKeywords": {
            "title": "Also scrape related keywords",
            "type": "boolean",
            "description": "Follow TikTok's own 'related searches' for each keyword to reach more products (for example <code>lip gloss</code> also covers <code>lip oil</code> and <code>lip glaze</code>). Duplicate products are removed.",
            "default": false
          },
          "maxRelatedKeywords": {
            "title": "Related keywords per keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many related keywords to add for each of your keywords when related keywords are enabled. The total is still limited by <b>Max products in total</b>.",
            "default": 5
          },
          "scrapeProductDetails": {
            "title": "Scrape full product details",
            "type": "boolean",
            "description": "Adds description, category path, all images, specifications, variants, per-variant price and <b>stock</b>, shipping, shop statistics (followers, rating, sales) and top reviews. Billed as an extra event per enriched product.",
            "default": false
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "soldDesc",
              "priceAsc",
              "priceDesc",
              "ratingDesc",
              "reviewsDesc"
            ],
            "type": "string",
            "description": "Order of the results per keyword. Sorting is applied to everything reachable for the keyword (up to about 300 products), so <code>Best selling first</code> returns the real top sellers rather than only the first page.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Skip products cheaper than this price."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Skip products more expensive than this price."
          },
          "minSoldCount": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Only return products that have sold at least this many units."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only return products rated at least this value (0-5). Products without a rating are skipped when this is set."
          },
          "deduplicate": {
            "title": "Remove duplicate products",
            "type": "boolean",
            "description": "Return each product only once even when several keywords find it.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}