{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper - Products, Prices & Categories",
    "description": "Extract TikTok Shop products, prices, ratings, seller details and categories from regional storefronts such as the Philippines, US and UK. Pay per delivered row plus a run start fee.",
    "version": "0.2",
    "x-build-id": "vOIdKe3aONQjoI0bA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-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/lentic_clockss~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-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/lentic_clockss~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-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": {
          "mode": {
            "title": "Collection mode",
            "enum": [
              "auto",
              "homeDiscover",
              "keywordSearch",
              "categorySearch",
              "categoryDiscover",
              "productDetail",
              "regions"
            ],
            "type": "string",
            "description": "Leave on Auto to select the mode from your product, category or keyword target. Choose home discovery, category discovery or region reference data explicitly when you do not have a target.",
            "default": "auto"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search phrase for keywordSearch. Use keywords for a list of search inputs."
          },
          "keywords": {
            "title": "Keywords (batch)",
            "type": "array",
            "description": "List of search phrases. Each keyword has its own maxResults allowance, subject to the whole run cost and Free-plan limits.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword (alias)",
            "type": "string",
            "description": "Alternative field name for query."
          },
          "categoryUrl": {
            "title": "Category URL",
            "pattern": "^https?://([A-Za-z0-9-]+\\.)*tiktok\\.com/.+",
            "type": "string",
            "description": "Full regional category link, such as https://shop.tiktok.com/ph/c/beauty-personal-care/601450. The region in the link takes priority over region and browseCountry."
          },
          "productUrl": {
            "title": "Product URL",
            "pattern": "^https?://([A-Za-z0-9-]+\\.)*tiktok\\.com/.+",
            "type": "string",
            "description": "Full regional product link containing /pdp/. The region in the link takes priority over region and browseCountry."
          },
          "categoryId": {
            "title": "Category ID",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Numeric category ID from its link, such as 601450. Supply the matching categorySlug when known."
          },
          "categorySlug": {
            "title": "Category slug",
            "type": "string",
            "description": "Category name as written in its URL, such as beauty-personal-care."
          },
          "productId": {
            "title": "Product ID",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Numeric TikTok Shop product ID for productDetail. Set region for the target storefront."
          },
          "region": {
            "title": "Storefront region",
            "pattern": "^[A-Za-z]{2,6}$",
            "type": "string",
            "description": "Accepted storefront code, such as ph, us, gb, id, my, th, vn or sg; defaults to ph when omitted. A product or category link takes priority, and accepted codes do not guarantee live availability."
          },
          "bucket": {
            "title": "Category group",
            "type": "string",
            "description": "Saved category group, such as beauty, fashion or electronics. Used to select a category or filter category reference data."
          },
          "catId": {
            "title": "Category ID alias",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Alternative field name for categoryId."
          },
          "goodsId": {
            "title": "Product ID alias",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Alternative field name for productId."
          },
          "browseCountry": {
            "title": "Alternative region",
            "type": "string",
            "description": "Alternative region setting; takes priority over region but not a product or category link. Accepted codes are normalized to lowercase."
          },
          "currency": {
            "title": "Currency compatibility setting",
            "type": "string",
            "description": "Compatibility field. The Actor uses the selected region currency and does not apply this value as a price conversion or override."
          },
          "maxResults": {
            "title": "Maximum rows per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum rows per keyword; other modes count as one input. Default 70, with larger requests collected in parts of 70; products and optional SKU rows share the allowance, and the run also stops at its maximum cost or Free-plan cap of 200 rows.",
            "default": 70
          },
          "maxPages": {
            "title": "Pagination limit",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pagination setting from 1 to 20 for listing collection. More pages do not guarantee more matching rows.",
            "default": 1
          },
          "enrichDetails": {
            "title": "Add product details",
            "type": "boolean",
            "description": "Add product-page details to selected listing rows. Off by default; unavailable fields remain empty.",
            "default": false
          },
          "enrichLimit": {
            "title": "Detail enrichment limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Number of listing rows selected for detail enrichment per collection part when enrichDetails is true.",
            "default": 3
          },
          "includeSkus": {
            "title": "Emit SKU rows",
            "type": "boolean",
            "description": "Add a separately billed row for each available SKU after its parent product. These rows share the same input allowance; off by default.",
            "default": false
          },
          "pageRetry": {
            "title": "Page retry",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Page retry setting for temporary collection failures, from 1 to 5.",
            "default": 2
          },
          "workerBaseUrl": {
            "title": "Developer testing URL",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}