{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Product Detail Scraper — US & Southeast Asia",
    "description": "Scrape product pages by URL or ID (US, ID, MY, SG, PH, VN, TH): prices, SKU stock, sold count, ratings & seller stats. $1.25/1K, errors unbilled.",
    "version": "1.2",
    "x-build-id": "7bNAd54gEIdFUGRGW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rainfetch~tiktok-shop-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rainfetch-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/rainfetch~tiktok-shop-product-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rainfetch-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/rainfetch~tiktok-shop-product-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rainfetch-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",
        "required": [
          "productUrlsOrIds"
        ],
        "properties": {
          "productUrlsOrIds": {
            "title": "Product URLs or IDs",
            "type": "array",
            "description": "List of TikTok Shop / Tokopedia Shop product URLs (e.g. https://shop-id.tokopedia.com/pdp/<slug>/<id>, https://shop.tiktok.com/<region>/pdp/<slug>/<id>, https://shop.tiktok.com/<region>/view/product/<id>, or region-less https://www.tiktok.com/view/product/<id> which uses ?region=<CODE> or the Region input), bare numeric product IDs, or shop_id:product_id pairs.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Default Region (for bare IDs)",
            "enum": [
              "ID",
              "MY",
              "SG",
              "PH",
              "VN",
              "TH",
              "US"
            ],
            "type": "string",
            "description": "Storefront region used when a bare product ID (or URL without a region segment) is provided. Full regional URLs auto-detect their region.",
            "default": "ID"
          },
          "sellerIds": {
            "title": "Extra Seller IDs (Optional)",
            "type": "array",
            "description": "Optional list of numeric TikTok Shop seller IDs to look up via the Shop Intelligence API (sold count, followers, rating, SLA rates). Results are stored in the SHOP_INTELLIGENCE Key-Value Store record (not billed as products).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeEmbeddedReviews": {
            "title": "Include Embedded Reviews & Rating Histogram",
            "type": "boolean",
            "description": "Include the top 5 SSR-embedded product reviews and the 1-5 star rating histogram on each product record.",
            "default": true
          },
          "includeShopIntelligence": {
            "title": "Include Live Shop Intelligence",
            "type": "boolean",
            "description": "Enrich each product's seller object with live store_info metrics (total sold, followers, rating count, 48h shipping rate, 24h response rate). Cached per seller within a run.",
            "default": true
          },
          "proxyMode": {
            "title": "Proxy Mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Controls proxy usage when no custom Proxy Configuration is supplied. 'auto' uses direct requests first for ID and US (retrying via regional Apify Residential Proxy on Security Check) and goes straight to regional Residential Proxy with healthy session reuse for SEA storefronts (MY, SG, PH, VN, TH); 'always' uses Residential Proxy from the first attempt for all regions; 'never' disables proxies.",
            "default": "auto"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of product inputs to process from productUrlsOrIds. The Actor stops at this limit and never fetches more than requested.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of concurrent product requests (1-10). Default 10 is optimal for Indonesia; use 5 for heavy multi-region SEA/US batches.",
            "default": 10
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts per product on Security Check CAPTCHAs or transient HTTP/network errors. Failed proxy sessions are discarded and rotated to a fresh residential IP/cookie jar while proven-clean regional sessions are reused. Leave empty for region-adaptive defaults: 5 for Indonesia (ID), 8 for other regions (MY, SG, PH, VN, TH, US)."
          },
          "requestDelayMs": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Base delay in milliseconds between requests per worker (randomised by +/-50%). Set to 0 for maximum speed.",
            "default": 0
          },
          "priceSamples": {
            "title": "Price Samples",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of direct fetches per product (1-5, default 3) used to reduce TikTok Shop's randomized anonymous price markup. The Actor returns the lowest observed sale price across samples (an upper bound on the real price). Only direct (non-proxy) successes are resampled so residential proxy usage does not increase.",
            "default": 3
          },
          "includeRaw": {
            "title": "Include Raw SSR Product Node",
            "type": "boolean",
            "description": "Attach the raw parsed `product_info` JSON node from __MODERN_ROUTER_DATA__ under the `raw` key for debugging or custom fields.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Custom Proxy Configuration (Overrides Proxy Mode)",
            "type": "object",
            "description": "Optional standard Apify Proxy Configuration. If enabled (useApifyProxy: true or custom proxyUrls), this configuration is used and `proxyMode` is ignored."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}