{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Shop Product Scraper",
    "description": "Extract TikTok Shop products, prices, discounts, sold counts, ratings, variants, seller info, shipping, and review signals from product URLs, keywords, categories, and seller pages.",
    "version": "1.0",
    "x-build-id": "aVoSPsqhPadD5qu9U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~tiktok-shop-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-tiktok-shop-product-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/coregent~tiktok-shop-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-tiktok-shop-product-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/coregent~tiktok-shop-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-tiktok-shop-product-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": {
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct TikTok Shop product URLs to scrape. Example: https://www.tiktok.com/view/product/1234567890",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords to search TikTok Shop. Example: wireless earbuds, portable blender",
            "items": {
              "type": "string"
            },
            "default": [
              "wireless earbuds"
            ]
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "TikTok Shop category names to browse. Example: Electronics, Home & Kitchen",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sellerUrls": {
            "title": "Seller URLs",
            "type": "array",
            "description": "TikTok seller/store page URLs to scrape products from.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Country codes for regional discovery. Example: US, AU, GB",
            "items": {
              "type": "string"
            },
            "default": [
              "US"
            ]
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of product results to collect per keyword, category, or seller.",
            "default": 50
          },
          "minPrice": {
            "title": "Minimum Price",
            "type": "number",
            "description": "Only include products with sale price at or above this value."
          },
          "maxPrice": {
            "title": "Maximum Price",
            "type": "number",
            "description": "Only include products with sale price at or below this value."
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only include products with rating at or above this value (0-5)."
          },
          "minSoldCount": {
            "title": "Minimum Sold Count",
            "minimum": 0,
            "type": "integer",
            "description": "Only include products with sold count at or above this value."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "default",
              "relevance",
              "popular",
              "newest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Sort order for search results where supported.",
            "default": "default"
          },
          "includeSellerFields": {
            "title": "Include Seller Fields",
            "type": "boolean",
            "description": "Include seller/store fields in the output (name, rating, follower count, product count).",
            "default": true
          },
          "includeVariantFields": {
            "title": "Include Variant Fields",
            "type": "boolean",
            "description": "Include product variant details (count, summary, options).",
            "default": true
          },
          "includeShippingFields": {
            "title": "Include Shipping Fields",
            "type": "boolean",
            "description": "Include shipping information (fee, type, delivery estimate, origin).",
            "default": true
          },
          "includeReviewSummary": {
            "title": "Include Review Summary",
            "type": "boolean",
            "description": "Include review summary signals (count, rating, keywords).",
            "default": true
          },
          "deduplicateProducts": {
            "title": "Deduplicate Products",
            "type": "boolean",
            "description": "Remove duplicate product records that appear through multiple discovery routes.",
            "default": true
          },
          "includeSummary": {
            "title": "Include Summary",
            "type": "boolean",
            "description": "Generate a run-level summary record with aggregated statistics.",
            "default": true
          },
          "stopOnError": {
            "title": "Stop on Error",
            "type": "boolean",
            "description": "Emit error records for failed extractions. If false, silently skip failures.",
            "default": false
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging including SSR data structure keys and page content snippets.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}