{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Trending Videos Insights: Industry Category Breakdown",
    "description": "TikTok Trending Videos Insights: Discover trending videos by industry and analyze views, likes, comments, shares, creators, hashtags, and engagement. Compare content performance across categories to identify viral trends, audience interests, and marketing opportunities.",
    "version": "0.1",
    "x-build-id": "QN5KkOmRsu4brclTj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~tiktok-trending-videos-insights/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-tiktok-trending-videos-insights",
        "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/api-empire~tiktok-trending-videos-insights/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-tiktok-trending-videos-insights",
        "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/api-empire~tiktok-trending-videos-insights/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-tiktok-trending-videos-insights",
        "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": {
          "contentNiche": {
            "title": "🧭 Content Niche (Industry Filter)",
            "enum": [
              "general",
              "beauty",
              "gaming",
              "finance",
              "fitness",
              "food",
              "tech",
              "fashion",
              "education"
            ],
            "type": "string",
            "description": "🔎 Keep only ads matching this niche: a real client-side keyword match against the ad's own title/brand name plus its Creative Center objective tag (industry_key is also included as raw ID output, but it is an opaque numeric taxonomy code with no recoverable category name, so it's not used alone for matching). 'general' = no filter, return everything. Default: 'general'.",
            "default": "general"
          },
          "market": {
            "title": "🌍 Market (Country Code)",
            "type": "string",
            "description": "Two-letter Creative Center ad market to analyze (e.g. 'US', 'AU', 'GB', 'CA'). Falls back to the legacy 'countryCode' key if set instead. Default: 'US'.",
            "default": "US"
          },
          "adRanking": {
            "title": "📊 Ad Ranking Mode",
            "enum": [
              "topPicks",
              "highestCtr"
            ],
            "type": "string",
            "description": "The Top Ads API genuinely supports only 2 distinct orderings. 'topPicks' = TikTok's recommended feed (order_by=for_you). 'highestCtr' = sorted by click-through rate (order_by=ctr). Falls back to the legacy 'sortOrder' key (hot/view/like/share/comment) if set instead, honestly mapped to one of these 2 real behaviors.",
            "default": "topPicks"
          },
          "resultsLimit": {
            "title": "🎬 Ad Results Limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of ad rows to return (1-1000), applied AFTER the contentNiche filter. Falls back to the legacy 'maxItems' key if set instead. Default: 50.",
            "default": 50
          },
          "trendWindowDays": {
            "title": "📅 Trend Window (Days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days back the Top Ads window covers (1-30). Falls back to the legacy 'period' key if set instead. Default: 7.",
            "default": 7
          },
          "includeTrendingCreators": {
            "title": "👤 Include Trending Creator Leaderboard",
            "type": "boolean",
            "description": "📈 When ON, also fetches a SECOND, standalone data type in the same run: a trending-creator leaderboard from TikTok Creative Center (handle, followers, engagement rate, organic/branded split, audience demographics, top/recent videos). These rows are NOT tied to the ad rows above — they're labeled type='creator' so they never get confused with type='ad' rows. Default: true.",
            "default": true
          },
          "creatorFollowerRange": {
            "title": "👥 Creator Follower Range",
            "enum": [
              "Any",
              "10K-100K",
              "100K-1M",
              "1M-10M",
              ">10M"
            ],
            "type": "string",
            "description": "🎚️ Optional filter on the creator leaderboard's audience size. 'Any' = no filter.",
            "default": "Any"
          },
          "creatorRankingCategory": {
            "title": "🏆 Creator Ranking Category",
            "enum": [
              "trending",
              "mostFollowers",
              "highestEngagement",
              "mostViews"
            ],
            "type": "string",
            "description": "📈 How to rank the trending-creator leaderboard: 'trending' = highest average views, 'mostFollowers' = biggest audiences, 'highestEngagement' = highest engagement rate, 'mostViews' = highest reach per video.",
            "default": "trending"
          },
          "maxCreators": {
            "title": "🔢 Max Creators",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of creator-leaderboard rows to return (1-200). This is a SEPARATE cap from Ad Results Limit above — creators are a standalone data type, not children of the ad rows. Default: 20.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "🔌 Proxy Configuration",
            "type": "object",
            "description": "Choose which proxies to use. If TikTok rejects the connection, a RESIDENTIAL proxy is used automatically as a fallback with a fresh IP per retry."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}