{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Shop Scraper v2 - DEPRECATED",
    "description": "Scrape TikTok Shop for product data, prices, reviews, seller information, and sales metrics. Perfect for e-commerce research, competitor analysis, and dropshipping product discovery.\nProduct Search\nProduct Details\nShop/Seller Scraping\nReview Collection\nMulti-Region Support\nDemo Mode",
    "version": "1.0",
    "x-build-id": "cpqZOnyAndardyle1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~tiktok-shop-scraper-v2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-tiktok-shop-scraper-v2",
        "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/alizarin_refrigerator-owner~tiktok-shop-scraper-v2/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-tiktok-shop-scraper-v2",
        "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/alizarin_refrigerator-owner~tiktok-shop-scraper-v2/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-tiktok-shop-scraper-v2",
        "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 Queries",
            "type": "array",
            "description": "Keywords to search for products on TikTok Shop (e.g., 'shampoo', 'wireless earbuds'). Leave empty if using clickCategories.",
            "items": {
              "type": "string"
            }
          },
          "clickCategories": {
            "title": "Browse Categories (Click-based)",
            "type": "array",
            "description": "🎯 RECOMMENDED: Browse TikTok Shop categories by clicking (avoids CAPTCHA). Examples: 'Beauty', 'Electronics', 'Fashion', 'Home'. This navigates to homepage and clicks the category link, which has much better success rate than direct category URLs.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct TikTok Shop product URLs to scrape",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "shopUrls": {
            "title": "Shop/Seller URLs",
            "type": "array",
            "description": "TikTok Shop seller profile URLs to scrape all products from",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Product Categories",
            "type": "array",
            "description": "Browse specific TikTok Shop categories. More reliable than search. Examples: 'Beauty & Personal Care', 'Electronics', 'Fashion', 'Home & Garden'",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxProducts": {
            "title": "Max Products",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of products to scrape",
            "default": 50
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Scrape product reviews (increases run time)",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max Reviews Per Product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum reviews to scrape per product",
            "default": 10
          },
          "includeComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Scrape TikTok video comments about the product",
            "default": false
          },
          "maxCommentsPerProduct": {
            "title": "Max Comments Per Product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum comments to scrape per product",
            "default": 20
          },
          "includeReactions": {
            "title": "Include Reactions",
            "type": "boolean",
            "description": "Include like/share/save counts and engagement metrics",
            "default": false
          },
          "region": {
            "title": "Region",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "ES",
              "IT",
              "ID",
              "MY",
              "PH",
              "SG",
              "TH",
              "VN"
            ],
            "type": "string",
            "description": "TikTok Shop region - affects currency, price formatting, and available products. Southeast Asian markets (ID, MY, TH) often have better scraping success rates.",
            "default": "US"
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Run with realistic sample data for testing (no actual scraping, minimal charges). Set to FALSE for real scraping.",
            "default": false
          },
          "useCamoufox": {
            "title": "Use Camoufox Anti-Detection",
            "type": "boolean",
            "description": "Enable Camoufox browser fingerprint randomization to avoid bot detection. HIGHLY RECOMMENDED for TikTok Shop scraping.",
            "default": true
          },
          "useMobileSafari": {
            "title": "Emulate Mobile Safari (iOS) - RECOMMENDED",
            "type": "boolean",
            "description": "🍎 HIGHLY RECOMMENDED: Emulate iPhone Safari browser. Testing shows Mobile Safari has much better success rates for TikTok Shop extraction. Enable this for best results!",
            "default": true
          },
          "useFirecrawl": {
            "title": "Use Firecrawl API",
            "type": "boolean",
            "description": "Use Firecrawl API as an alternative scraping method. Useful if browser-based scraping fails. Requires your own Firecrawl API key.",
            "default": false
          },
          "firecrawlApiKey": {
            "title": "Firecrawl API Key",
            "type": "string",
            "description": "Your Firecrawl API key (get one at firecrawl.dev). Only needed if 'Use Firecrawl API' is enabled."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. RESIDENTIAL proxies are STRONGLY RECOMMENDED - TikTok blocks datacenter IPs. Enable Apify Proxy with RESIDENTIAL group for best results.",
            "default": {
              "useApifyProxy": true
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to send results to when scraping completes (Zapier, Make, n8n compatible)"
          },
          "enableSentimentAnalysis": {
            "title": "Enable AI Sentiment Analysis",
            "type": "boolean",
            "description": "Use AI to analyze sentiment of reviews and comments (requires AI API key)",
            "default": false
          },
          "aiProvider": {
            "title": "AI Provider",
            "enum": [
              "none",
              "openai",
              "anthropic",
              "google",
              "mistral",
              "cohere"
            ],
            "type": "string",
            "description": "Which AI provider to use for sentiment analysis",
            "default": "none"
          },
          "aiApiKey": {
            "title": "AI API Key",
            "type": "string",
            "description": "API key for your chosen AI provider"
          },
          "aiModel": {
            "title": "AI Model (Optional)",
            "type": "string",
            "description": "Custom model name (leave empty for default). Examples: gpt-4o, claude-3-5-sonnet-20241022, gemini-1.5-pro"
          },
          "enableCaptchaSolving": {
            "title": "Enable CAPTCHA Solving",
            "type": "boolean",
            "description": "Automatically solve CAPTCHAs using 2Captcha service. Increases cost but improves success rate.",
            "default": false
          },
          "twoCaptchaApiKey": {
            "title": "2Captcha API Key",
            "type": "string",
            "description": "Your 2Captcha API key (get one at 2captcha.com). Costs ~$2.99/1000 CAPTCHAs solved."
          },
          "useAiCaptchaSolver": {
            "title": "Use AI Vision for CAPTCHAs",
            "type": "boolean",
            "description": "Use Claude/GPT vision to solve image CAPTCHAs. Uses your AI API key if set. More reliable for complex CAPTCHAs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}