{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Product Scraper | Prices Sold Global",
    "description": "Scrape TikTok Shop products — keyword, category, home discover & PDP across US/UK/Asia regions. Extract productId, prices, ratings, sold counts & shop info. Export Excel/CSV/JSON for research & price monitoring.",
    "version": "0.1",
    "x-build-id": "V4Vk4yI8Z3JBSX52w"
  },
  "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": "Mode",
            "enum": [
              "homeDiscover",
              "keywordSearch",
              "categorySearch",
              "categoryDiscover",
              "productDetail",
              "regions"
            ],
            "type": "string",
            "description": "homeDiscover / keywordSearch / categorySearch / categoryDiscover / productDetail / regions.",
            "default": "regions"
          },
          "region": {
            "title": "Region path code",
            "type": "string",
            "description": "shop.tiktok.com/{region} path prefix: ph, us, gb, id, my, th, vn, sg, …",
            "default": "ph"
          },
          "browseCountry": {
            "title": "Browse country (alias)",
            "type": "string",
            "description": "Optional ISO-2 alias (US→us, GB→gb, PH→ph)."
          },
          "currency": {
            "title": "Currency hint",
            "type": "string",
            "description": "Optional currency override (e.g. USD, PHP, EUR)."
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword for keywordSearch (submitted via mall search box)."
          },
          "keyword": {
            "title": "Keyword (alias)",
            "type": "string",
            "description": "Alias of query."
          },
          "keywords": {
            "title": "Keywords (batch)",
            "type": "array",
            "description": "Optional list of keywords.",
            "items": {
              "type": "string"
            }
          },
          "categorySlug": {
            "title": "Category slug",
            "type": "string",
            "description": "URL slug, e.g. beauty-personal-care or makeup.",
            "default": "beauty-personal-care"
          },
          "categoryId": {
            "title": "Category id",
            "type": "string",
            "description": "Numeric category id from /c/{slug}/{categoryId} (e.g. 601450).",
            "default": "601450"
          },
          "catId": {
            "title": "Category id (alias)",
            "type": "string",
            "description": "Alias of categoryId."
          },
          "categoryUrl": {
            "title": "Category URL",
            "type": "string",
            "description": "Full category URL https://shop.tiktok.com/{region}/c/{slug}/{id}."
          },
          "bucket": {
            "title": "Taxonomy bucket",
            "type": "string",
            "description": "Optional seed taxonomy bucket (beauty, fashion, electronics, …)."
          },
          "productUrl": {
            "title": "Product URL",
            "type": "string",
            "description": "Full PDP URL containing /pdp/{slug}/{productId}."
          },
          "productId": {
            "title": "Product id",
            "type": "string",
            "description": "Numeric product id for productDetail."
          },
          "goodsId": {
            "title": "Goods id (alias)",
            "type": "string",
            "description": "Alias of productId."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum dataset rows. Empty {} uses 1 (Store Console Test). Free plan capped at 200.",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages / load-more rounds",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Category load-more clicks (hasMore). Not ?page=N.",
            "default": 1
          },
          "enrichDetails": {
            "title": "Enrich with PDP",
            "type": "boolean",
            "description": "Fetch PDP details for the first enrichLimit listing rows.",
            "default": false
          },
          "enrichLimit": {
            "title": "Enrich limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Max listing rows to enrich via PDP when enrichDetails is true.",
            "default": 3
          },
          "pageRetry": {
            "title": "Page retry",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Retries per page/request on transient failures.",
            "default": 2
          },
          "workerBaseUrl": {
            "title": "Worker base URL override",
            "type": "string",
            "description": "Optional HTTPS Cloud Run override (allowlisted hosts only)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}