{
  "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": "r2yekiTfVDcdYUugN"
  },
  "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": "Type the product you might sell. A specific brand/model gives the cleanest match, but a category such as “electric bike”, “portable blender”, or “LED face mask” also works."
          },
          "country": {
            "title": "Market / country",
            "type": "string",
            "description": "Choose the country for the TikTok research scope. Use the market where you want to understand demand.",
            "default": "US"
          },
          "maxPosts": {
            "title": "Organic posts limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How broad should the TikTok scan be? 5 is a good fast first look. Higher limits can uncover more evidence but may increase Apify platform/upstream usage.",
            "default": 100
          },
          "maxCommentsPerPost": {
            "title": "Comments per post limit",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many top-level comments per post should TPI inspect for buying, price, availability, shipping, and product questions? 3 is a fast first look; 0 turns comment analysis off.",
            "default": 50
          },
          "includeShop": {
            "title": "Include TikTok Shop evidence",
            "type": "boolean",
            "description": "Recommended. Compare social attention with products actually listed in TikTok Shop, including observed price, sold/review/rating evidence when available.",
            "default": true
          },
          "shopMarket": {
            "title": "TikTok Shop market",
            "enum": [
              "AUTO",
              "US",
              "MY",
              "TH",
              "VN",
              "PH",
              "SG"
            ],
            "type": "string",
            "description": "Choose the TikTok Shop market to inspect. AUTO only works when the source supports the selected country; US is the safest default for the Store example.",
            "default": "AUTO"
          },
          "maxShopProducts": {
            "title": "Shop products limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum Shop products to inspect. 5 is enough for a fast first pass; higher limits can improve coverage and increase usage cost.",
            "default": 30
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Optional. Check public TikTok Creative Center Top Ads for product-specific ad evidence. Adds a $0.10 TPI event fee when the ads stage executes, plus platform usage.",
            "default": false
          },
          "maxAds": {
            "title": "Maximum Creative Center ads",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only used when Ads is on. Maximum public Creative Center ad rows to inspect; higher limits can increase usage cost.",
            "default": 30
          },
          "adsPeriodDays": {
            "title": "Creative Center lookback",
            "type": "integer",
            "description": "Only used when Ads is on. How far back to look in public Creative Center Top Ads.",
            "default": 30
          },
          "adsSortBy": {
            "title": "Creative Center sort",
            "enum": [
              "for_you",
              "ctr",
              "like",
              "cost"
            ],
            "type": "string",
            "description": "Only used when Ads is on. Which public Creative Center ordering to request.",
            "default": "for_you"
          },
          "includeSuppliers": {
            "title": "Include supplier sourcing",
            "type": "boolean",
            "description": "Optional. Search Alibaba for product-specific sourcing leads after TPI identifies usable product matches. Adds a $0.25 TPI supplier event fee when this stage executes, plus platform usage.",
            "default": false
          },
          "maxSupplierOffers": {
            "title": "Maximum supplier offers",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Only used when Supplier sourcing is on. Maximum Alibaba offers to inspect. Start with 10; larger scans can increase usage cost.",
            "default": 30
          },
          "supplierTargetQuantity": {
            "title": "Target supplier quantity",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only used when Supplier sourcing is on. Your intended order quantity, used to pick a published supplier price tier. Use 0 to fall back to the observed MOQ/first compatible tier.",
            "default": 0
          },
          "includeLandedCost": {
            "title": "Include landed-cost scenario",
            "type": "boolean",
            "description": "Optional. Add your own per-unit freight, duty, non-recoverable import tax and other import costs to test whether observed sourcing still leaves room below observed retail. No extra TPI event beyond the supplier-analysis fee.",
            "default": false
          },
          "landedCostCurrency": {
            "title": "Landed-cost currency",
            "type": "string",
            "description": "Three-letter currency used by supplier cost, retail evidence and every amount you enter here (for example USD). TPI does not convert currencies."
          },
          "sourcingDestinationCountry": {
            "title": "Import destination country",
            "type": "string",
            "description": "Two-letter destination country for your sourcing scenario (for example SI). This labels your scenario; TPI does not determine customs or tax law."
          },
          "freightPerUnit": {
            "title": "Freight per unit",
            "minimum": 0,
            "type": "number",
            "description": "Your known/assumed international freight amount per unit in the selected currency."
          },
          "customsDutyPerUnit": {
            "title": "Customs duty per unit",
            "minimum": 0,
            "type": "number",
            "description": "Your known/assumed customs-duty amount per unit. Enter 0 only when you have a reason to treat it as zero."
          },
          "nonRecoverableImportTaxPerUnit": {
            "title": "Non-recoverable import tax per unit",
            "minimum": 0,
            "type": "number",
            "description": "Your non-recoverable import tax/VAT cost per unit. Do not count recoverable tax as a cost."
          },
          "otherImportCostPerUnit": {
            "title": "Other import cost per unit",
            "minimum": 0,
            "type": "number",
            "description": "Any other known per-unit import/logistics cost not already entered above."
          },
          "monitor": {
            "title": "Track this product over time",
            "type": "boolean",
            "description": "Keep durable alert state across repeated identical searches. Repeat runs are what let TPI distinguish one snapshot from strengthening/fading momentum. Create the recurrence with Apify Schedules outside this Actor.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}