{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trending Hashtags And Videos Scraper",
    "description": "🔥 TikTok Trending Hashtags And Videos Scraper pulls real-time trending tags, views, and engagement. 🔍 Hashtag research: related tags, popularity, growth. 📈 Export CSV/JSON or use API. 🚀 Ideal for creators, brands, and marketers.",
    "version": "0.1",
    "x-build-id": "EH74UnqedJ3OXFtYx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeengine~tiktok-trending-hashtags-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeengine-tiktok-trending-hashtags-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/scrapeengine~tiktok-trending-hashtags-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapeengine-tiktok-trending-hashtags-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/scrapeengine~tiktok-trending-hashtags-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeengine-tiktok-trending-hashtags-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",
        "properties": {
          "resultMode": {
            "title": "🎯 Result Mode",
            "enum": [
              "top100",
              "top100_with_analytics",
              "analytics"
            ],
            "type": "string",
            "description": "Choose what the scraper should return. 🏆 Trending Ranking = the hashtag list only. 📊 Ranking + Analytics = list with per-hashtag trend/creator analytics. 🔬 Custom Hashtag Analytics = analytics for your own hashtag list (see 'Hashtags To Analyze' below). Base-compat: also accepts the legacy `result_type` key."
          },
          "targetCountry": {
            "title": "🌍 Target Country",
            "enum": [
              "ALL",
              "AL",
              "AR",
              "AU",
              "AT",
              "BH",
              "BD",
              "BY",
              "BE",
              "BR",
              "BG",
              "KH",
              "CA",
              "CL",
              "CO",
              "HR",
              "CZ",
              "DK",
              "EG",
              "EE",
              "FI",
              "FR",
              "DE",
              "GR",
              "HU",
              "IS",
              "ID",
              "IQ",
              "IE",
              "IL",
              "IT",
              "JP",
              "JO",
              "KZ",
              "KW",
              "LV",
              "LB",
              "LT",
              "LU",
              "MO",
              "MY",
              "MX",
              "MA",
              "MN",
              "NL",
              "NZ",
              "NG",
              "NO",
              "OM",
              "PK",
              "PE",
              "PH",
              "PL",
              "PT",
              "QA",
              "RO",
              "SA",
              "SG",
              "SK",
              "ZA",
              "KR",
              "ES",
              "SE",
              "CH",
              "TW",
              "TH",
              "TR",
              "UA",
              "AE",
              "GB",
              "US",
              "UZ",
              "VN"
            ],
            "type": "string",
            "description": "Pick a country (or 🌐 All for global trends). Base-compat: also accepts the legacy `country` key."
          },
          "trendingWindow": {
            "title": "📅 Trending Window",
            "enum": [
              "7",
              "30",
              "120"
            ],
            "type": "string",
            "description": "Time window for the trending ranking. Used by 🏆 Trending Ranking and 📊 Ranking + Analytics. Base-compat: also accepts `top100_period`."
          },
          "analyticsWindow": {
            "title": "📈 Analytics Window",
            "enum": [
              "7",
              "30",
              "120",
              "365",
              "1095"
            ],
            "type": "string",
            "description": "Time window for analytics curves (trend history/engagement growth). Used by 🔬 Custom Hashtag Analytics. Base-compat: also accepts `analytics_period`."
          },
          "industryCategory": {
            "title": "🏷️ Industry Category",
            "enum": [
              "",
              "1000000001",
              "2000000001",
              "3000000000",
              "5000000000",
              "7000000000",
              "8000000002",
              "9000000002",
              "10000000000",
              "14000000000",
              "15000000001",
              "17000000002",
              "20000000001",
              "21000000000",
              "23000000000",
              "24000000000",
              "26000000001",
              "28000000001",
              "29000000001"
            ],
            "type": "string",
            "description": "Narrow the trending ranking by industry. Leave on 🌐 All Industries to skip filtering. Base-compat: also accepts `top100_industry`."
          },
          "onlyNewEntries": {
            "title": "🆕 Only New Entries",
            "type": "boolean",
            "description": "Enable to return only hashtags that newly entered the ranking in the chosen period. Base-compat: also accepts `top100_new_on_board`.",
            "default": false
          },
          "maxHashtags": {
            "title": "🔢 Max Hashtags",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Top-level cap on how many trending hashtags to collect (this is the parent-row cap; video children are counted separately below). Example: 20 → up to 20 hashtag rows. Base-compat: also accepts `total_hashtags`."
          },
          "hashtagsToAnalyze": {
            "title": "#️⃣ Hashtags To Analyze",
            "uniqueItems": true,
            "type": "array",
            "description": "Your own hashtags (without the #) to fetch analytics for. Only used when Result Mode = 🔬 Custom Hashtag Analytics. If a hashtag isn't currently trending in the selected country/period, TikTok returns no analytics for it. Base-compat: also accepts `hashtag_list`.",
            "items": {
              "type": "string"
            }
          },
          "fetchTopVideos": {
            "title": "🎬 Fetch Top Videos Per Hashtag",
            "type": "boolean",
            "description": "When ON, the actor opens each hashtag's TikTok page and captures its live video feed (up to the cap below) as linked child rows. Turn OFF for a hashtag-only run (faster).",
            "default": true
          },
          "maxVideosPerHashtag": {
            "title": "🎞️ Max Videos Per Hashtag",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on how many top videos to fetch PER hashtag (children are additional to Max Hashtags, not counted against it). Example: Max Hashtags=20 + Max Videos Per Hashtag=5 → up to 20 hashtag rows plus up to 100 linked video rows. 0 = no videos.",
            "default": 5
          },
          "enableAiAnalysis": {
            "title": "🤖 Enable AI Caption Analysis",
            "type": "boolean",
            "description": "When ON (and an API key is supplied below), each video caption fetched by 'Fetch Top Videos Per Hashtag' is classified for sentiment/topics/language.",
            "default": false
          },
          "aiModel": {
            "title": "🤖 AI Model / Provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "claude-fable-5",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "gpt-4.1",
              "o3-mini",
              "o1",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-1.5-pro",
              "gemini-2.5-flash",
              "gemini-2.5-pro",
              "grok-2-latest",
              "grok-3-mini",
              "grok-3",
              "grok-beta",
              "deepseek-chat",
              "deepseek-reasoner",
              "sonar",
              "sonar-pro",
              "sonar-reasoning",
              "mistral-small-latest",
              "mistral-large-latest"
            ],
            "type": "string",
            "description": "Provider auto-detected from the name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku models are recommended for classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI Provider API Key",
            "type": "string",
            "description": "Your own API key for the selected AI provider (Anthropic/OpenAI/Google/xAI/DeepSeek/Perplexity/Mistral). Required only when AI Caption Analysis is ON. Never logged or stored."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy Configuration",
            "type": "object",
            "description": "Choose which proxies to use. By default no proxy is used."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}