{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trends (Pay Per Event)",
    "description": "🔥 Scrape TikTok trending hashtags, viral videos & top creators from Creative Center. Get rankings, views, engagement stats, trend charts & audience insights. Multi-country, multi-industry filtering.",
    "version": "0.6",
    "x-build-id": "USHRZDySYEvorUFFp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_xplorer~tiktok-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_xplorer-tiktok-trends",
        "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/data_xplorer~tiktok-trends/runs": {
      "post": {
        "operationId": "runs-sync-data_xplorer-tiktok-trends",
        "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/data_xplorer~tiktok-trends/run-sync": {
      "post": {
        "operationId": "run-sync-data_xplorer-tiktok-trends",
        "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": [
          "trendType"
        ],
        "properties": {
          "trendType": {
            "title": "Trend Type",
            "enum": [
              "hashtags",
              "videos",
              "creators",
              "songs"
            ],
            "type": "string",
            "description": "Type of trending data to scrape.",
            "default": "hashtags"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of items to scrape.",
            "default": 50
          },
          "saveMedia": {
            "title": "Save Images to Apify",
            "type": "boolean",
            "description": "Save cover images and avatars permanently to Apify Key-Value Store. TikTok CDN URLs expire after a few hours — enable this to keep images accessible forever. Applies to video covers, creator avatars, song covers, and related video thumbnails. Does NOT save audio files.",
            "default": false
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "AE",
              "AR",
              "AT",
              "AU",
              "BD",
              "BE",
              "BG",
              "BH",
              "BR",
              "BY",
              "CA",
              "CH",
              "CL",
              "CO",
              "CZ",
              "DE",
              "DK",
              "EE",
              "EG",
              "ES",
              "FI",
              "FR",
              "GB",
              "GR",
              "HR",
              "HU",
              "ID",
              "IE",
              "IL",
              "IQ",
              "IS",
              "IT",
              "JO",
              "JP",
              "KH",
              "KR",
              "KW",
              "KZ",
              "LB",
              "LT",
              "LU",
              "LV",
              "MA",
              "MM",
              "MO",
              "MX",
              "MY",
              "NG",
              "NL",
              "NO",
              "NZ",
              "OM",
              "PE",
              "PH",
              "PK",
              "PL",
              "PT",
              "QA",
              "RO",
              "SA",
              "SE",
              "SG",
              "SK",
              "TH",
              "TR",
              "TW",
              "UA",
              "US",
              "UZ",
              "VN",
              "ZA"
            ],
            "type": "string",
            "description": "Country code for hashtag trends.",
            "default": "FR"
          },
          "hashtagPeriod": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "120"
            ],
            "type": "string",
            "description": "Time period for hashtag trends.\n\nAPI values:\n• Last 7 days = 7\n• Last 30 days = 30\n• Last 120 days = 120",
            "default": "7"
          },
          "industryId": {
            "title": "Industry",
            "enum": [
              "",
              "22000000000",
              "12000000000",
              "14000000000",
              "24000000000",
              "10000000000",
              "13000000000",
              "27000000000",
              "25000000000",
              "29000000000",
              "21000000000",
              "18000000000",
              "26000000000",
              "23000000000",
              "19000000000",
              "28000000000",
              "15000000000",
              "17000000000",
              "11000000000"
            ],
            "type": "string",
            "description": "Filter hashtags by industry. Leave empty for all industries.\n\nAPI values:\n• All Industries = (empty)\n• Apparel & Accessories = 22000000000\n• Baby, Kids & Maternity = 12000000000\n• Beauty & Personal Care = 14000000000\n• Business Services = 24000000000\n• Education = 10000000000\n• Financial Services = 13000000000\n• Food & Beverage = 27000000000\n• Games = 25000000000\n• Health = 29000000000\n• Home Improvement = 21000000000\n• Household Products = 18000000000\n• Life Services = 26000000000\n• News & Entertainment = 23000000000\n• Pets = 19000000000\n• Sports & Outdoor = 28000000000\n• Tech & Electronics = 15000000000\n• Travel = 17000000000\n• Vehicle & Transportation = 11000000000",
            "default": ""
          },
          "showOnlyNew": {
            "title": "Show Only New Hashtags",
            "type": "boolean",
            "description": "If enabled, only returns hashtags that are new to the trending list.",
            "default": false
          },
          "videoCountryCode": {
            "title": "Country",
            "enum": [
              "AE",
              "AU",
              "BR",
              "CA",
              "DE",
              "EG",
              "ES",
              "FR",
              "GB",
              "ID",
              "IT",
              "JP",
              "KR",
              "MX",
              "MY",
              "PH",
              "PL",
              "RU",
              "SA",
              "SE",
              "SG",
              "TH",
              "TR",
              "US",
              "VN"
            ],
            "type": "string",
            "description": "Country code for video trends.",
            "default": "FR"
          },
          "videoPeriod": {
            "title": "Period",
            "enum": [
              "7",
              "30"
            ],
            "type": "string",
            "description": "Time period for video trends.\n\nAPI values:\n• Last 7 days = 7\n• Last 30 days = 30",
            "default": "7"
          },
          "videoSortBy": {
            "title": "Sort By",
            "enum": [
              "vv",
              "like",
              "comment",
              "share"
            ],
            "type": "string",
            "description": "Sort trending videos by metric.\n\nAPI values:\n• Video Views = vv\n• Likes = like\n• Comments = comment\n• Shares = share",
            "default": "vv"
          },
          "creatorCountryCode": {
            "title": "Creator Country",
            "enum": [
              "AU",
              "BR",
              "CA",
              "EG",
              "FR",
              "DE",
              "ID",
              "IL",
              "IT",
              "JP",
              "MY",
              "PH",
              "RU",
              "SA",
              "SG",
              "KR",
              "ES",
              "TW",
              "TH",
              "TR",
              "AE",
              "GB",
              "US",
              "VN"
            ],
            "type": "string",
            "description": "Country where the creator is based.",
            "default": "FR"
          },
          "creatorAudienceCountry": {
            "title": "Audience Country",
            "enum": [
              "",
              "AU",
              "BR",
              "CA",
              "EG",
              "FR",
              "DE",
              "ID",
              "IL",
              "IT",
              "JP",
              "MY",
              "PH",
              "RU",
              "SA",
              "SG",
              "KR",
              "ES",
              "TW",
              "TH",
              "TR",
              "AE",
              "GB",
              "US",
              "VN"
            ],
            "type": "string",
            "description": "Filter creators by their audience country. Leave empty for all audiences.",
            "default": ""
          },
          "creatorSortBy": {
            "title": "Sort By",
            "enum": [
              "follower",
              "engagement",
              "avg_views"
            ],
            "type": "string",
            "description": "Sort trending creators by metric.\n\nAPI values:\n• Followers = follower\n• Engagement = engagement\n• Popularity = avg_views",
            "default": "follower"
          },
          "songCountryCode": {
            "title": "Country",
            "enum": [
              "AE",
              "AR",
              "AT",
              "AU",
              "BD",
              "BE",
              "BG",
              "BH",
              "BR",
              "BY",
              "CA",
              "CH",
              "CL",
              "CO",
              "CZ",
              "DE",
              "DK",
              "EE",
              "EG",
              "ES",
              "FI",
              "FR",
              "GB",
              "GR",
              "HR",
              "HU",
              "ID",
              "IE",
              "IL",
              "IQ",
              "IS",
              "IT",
              "JO",
              "JP",
              "KH",
              "KR",
              "KW",
              "KZ",
              "LB",
              "LT",
              "LU",
              "LV",
              "MA",
              "MM",
              "MO",
              "MX",
              "MY",
              "NG",
              "NL",
              "NO",
              "NZ",
              "OM",
              "PE",
              "PH",
              "PK",
              "PL",
              "PT",
              "QA",
              "RO",
              "SA",
              "SE",
              "SG",
              "SK",
              "TH",
              "TR",
              "TW",
              "UA",
              "US",
              "UZ",
              "VN",
              "ZA"
            ],
            "type": "string",
            "description": "Country code for song trends.",
            "default": "FR"
          },
          "songPeriod": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "120"
            ],
            "type": "string",
            "description": "Time period for song trends.\n\nAPI values:\n• Last 7 days = 7\n• Last 30 days = 30\n• Last 120 days = 120",
            "default": "7"
          },
          "songShowOnlyNew": {
            "title": "Show Only New Songs",
            "type": "boolean",
            "description": "If enabled, only returns songs that are new to the trending list.",
            "default": false
          },
          "songCommercialOnly": {
            "title": "Commercial Music Only",
            "type": "boolean",
            "description": "If enabled, only returns songs from TikTok's Commercial Music Library (safe for ads).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Select proxies to be used by this scraper.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}