{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Product Intelligence",
    "description": "Research TikTok product demand with organic posts, buyer-intent comments, Shop evidence, transparent commercial signals, history, breakouts, monitoring, and Creative Center ads evidence.",
    "version": "1.2",
    "x-build-id": "UAmfhP837tf4JzpBj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/beastmasteral~tiktok-product-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-beastmasteral-tiktok-product-intelligence",
        "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/beastmasteral~tiktok-product-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-beastmasteral-tiktok-product-intelligence",
        "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/beastmasteral~tiktok-product-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-beastmasteral-tiktok-product-intelligence",
        "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": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "What do you want to investigate?",
            "type": "string",
            "description": "Enter a product name, model, category, or niche. Examples: TOZO NC20 Pro, electric bike, portable blender. You can also use a supported hashtag, @creator, TikTok video/profile URL, or TikTok Shop product/seller URL when you already have one."
          },
          "country": {
            "title": "Market / country",
            "type": "string",
            "description": "Two-letter country code for the organic TikTok research scope, for example US, DE, SI, GB, FR, IT, or ES.",
            "default": "US"
          },
          "maxPosts": {
            "title": "Organic posts limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum organic TikTok post results requested from the upstream collector.",
            "default": 100
          },
          "maxCommentsPerPost": {
            "title": "Comments per post limit",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum top-level comments requested for each normalized TikTok post. Set to 0 to disable comment collection.",
            "default": 50
          },
          "includeShop": {
            "title": "Include TikTok Shop evidence",
            "type": "boolean",
            "description": "Collect TikTok Shop commerce evidence when the query type and market support it.",
            "default": true
          },
          "shopMarket": {
            "title": "TikTok Shop market",
            "enum": [
              "AUTO",
              "US",
              "MY",
              "TH",
              "VN",
              "PH",
              "SG"
            ],
            "type": "string",
            "description": "AUTO uses country only when the configured Shop source supports it. Otherwise choose a supported cross-market source explicitly.",
            "default": "AUTO"
          },
          "maxShopProducts": {
            "title": "Shop products limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum TikTok Shop product rows requested for keyword or seller discovery.",
            "default": 30
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Collect public TikTok Creative Center Top Ads evidence and link it conservatively to product clusters when product-specific evidence exists.",
            "default": false
          },
          "maxAds": {
            "title": "Maximum Creative Center ads",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only used when ads are enabled. Maximum public Creative Center ad rows requested from the upstream collector.",
            "default": 30
          },
          "adsPeriodDays": {
            "title": "Creative Center lookback",
            "type": "integer",
            "description": "Only used when ads are enabled. Creative Center Top Ads lookback window in days.",
            "default": 30
          },
          "adsSortBy": {
            "title": "Creative Center sort",
            "enum": [
              "for_you",
              "ctr",
              "like",
              "cost"
            ],
            "type": "string",
            "description": "Only used when ads are enabled. Public Creative Center ranking mode passed to the ads source.",
            "default": "for_you"
          },
          "includeSuppliers": {
            "title": "Include supplier sourcing",
            "type": "boolean",
            "description": "Search public Alibaba supplier offers after product clustering and link only product-specific matches. Disabled by default to avoid extra upstream cost.",
            "default": false
          },
          "maxSupplierOffers": {
            "title": "Maximum supplier offers",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Only used when supplier sourcing is enabled. Maximum Alibaba supplier rows requested from the upstream supplier collector.",
            "default": 30
          },
          "supplierTargetQuantity": {
            "title": "Target supplier quantity",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only used when supplier sourcing is enabled. Quantity used to select a published supplier price tier. Set 0 to use the observed MOQ / first compatible tier.",
            "default": 0
          },
          "includeLandedCost": {
            "title": "Include landed-cost scenario",
            "type": "boolean",
            "description": "Compute a transparent landed-cost scenario from observed supplier unit cost plus explicit per-unit import-cost inputs. Requires supplier sourcing. Disabled by default.",
            "default": false
          },
          "landedCostCurrency": {
            "title": "Landed-cost currency",
            "type": "string",
            "description": "Only used when landed-cost scenarios are enabled. Three-letter currency code shared by the supplier unit cost, retail evidence, and all declared landed-cost amounts. No FX conversion is performed."
          },
          "sourcingDestinationCountry": {
            "title": "Import destination country",
            "type": "string",
            "description": "Only used when landed-cost scenarios are enabled. Two-letter destination country for the user-declared import-cost scenario. This labels the scenario; TPI does not determine legal customs/tax obligations."
          },
          "freightPerUnit": {
            "title": "Freight per unit",
            "minimum": 0,
            "type": "number",
            "description": "Only used when landed-cost scenarios are enabled. Explicit freight / international shipping amount per unit in the landed-cost currency."
          },
          "customsDutyPerUnit": {
            "title": "Customs duty per unit",
            "minimum": 0,
            "type": "number",
            "description": "Only used when landed-cost scenarios are enabled. Explicit customs-duty amount per unit. Enter 0 only when you have evidence that the amount is zero."
          },
          "nonRecoverableImportTaxPerUnit": {
            "title": "Non-recoverable import tax per unit",
            "minimum": 0,
            "type": "number",
            "description": "Only used when landed-cost scenarios are enabled. Explicit non-recoverable import tax/VAT amount per unit. Do not include recoverable tax as a cost."
          },
          "otherImportCostPerUnit": {
            "title": "Other import cost per unit",
            "minimum": 0,
            "type": "number",
            "description": "Only used when landed-cost scenarios are enabled. Other explicit import/logistics cost per unit not already included above."
          },
          "monitor": {
            "title": "Monitoring state & alerts",
            "type": "boolean",
            "description": "Keep durable same-scope breakout-alert state across repeated runs. For recurring execution, create an Apify Schedule outside this Actor; the public Actor does not manage account schedules.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}