{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trends Scraper (Top Ads, Hashtags & Videos)",
    "description": "Scrape TikTok Creative Center trends by country: top ads with landing page, budget and CTR percentile, trending hashtags with posts, views and 7-day popularity, and trending videos with views and engagement. Each row shows its rank change since your last run. No login. $1 per 1,000 items.",
    "version": "0.1",
    "x-build-id": "faYIFZUKSW9J1kv0y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~tiktok-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-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/locaihost~tiktok-trends/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-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/locaihost~tiktok-trends/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-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",
        "properties": {
          "modes": {
            "title": "Charts",
            "type": "array",
            "description": "Which Creative Center rankings to read. Top ads: the 4 shown publicly per country and filter, with landing page details. Trending hashtags: the top 3 per country, period and industry. Trending videos: the top 4 per country, period and category (US, Japan, Vietnam, Thailand, Indonesia only). Songs and creators are not offered: TikTok no longer shows them to logged-out visitors.",
            "items": {
              "type": "string",
              "enum": [
                "topAds",
                "hashtags",
                "videos"
              ],
              "enumTitles": [
                "Top ads",
                "Trending hashtags",
                "Trending videos"
              ]
            },
            "default": [
              "topAds",
              "hashtags",
              "videos"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "One ranking is read per country (and per industry or category, if you pick any). Each chart covers its own set of countries, shown in brackets; a country a chart lacks is skipped for that chart and named in the status message.",
            "items": {
              "type": "string",
              "enum": [
                "AR",
                "AU",
                "BR",
                "CA",
                "CO",
                "EG",
                "FR",
                "DE",
                "ID",
                "IL",
                "IT",
                "JP",
                "MY",
                "MX",
                "NL",
                "PK",
                "PH",
                "RO",
                "SA",
                "SG",
                "ZA",
                "KR",
                "ES",
                "SE",
                "TW",
                "TH",
                "TR",
                "AE",
                "GB",
                "US",
                "VN"
              ],
              "enumTitles": [
                "Argentina (ads, hashtags)",
                "Australia (ads, hashtags)",
                "Brazil (ads, hashtags)",
                "Canada (ads, hashtags)",
                "Colombia (ads, hashtags)",
                "Egypt (hashtags)",
                "France (ads, hashtags)",
                "Germany (ads, hashtags)",
                "Indonesia (ads, hashtags, videos)",
                "Israel (hashtags)",
                "Italy (ads, hashtags)",
                "Japan (ads, hashtags, videos)",
                "Malaysia (ads, hashtags)",
                "Mexico (ads, hashtags)",
                "Netherlands (ads)",
                "Pakistan (ads)",
                "Philippines (ads, hashtags)",
                "Romania (ads)",
                "Saudi Arabia (ads, hashtags)",
                "Singapore (ads, hashtags)",
                "South Africa (ads, hashtags)",
                "South Korea (ads, hashtags)",
                "Spain (ads, hashtags)",
                "Sweden (ads)",
                "Taiwan (hashtags)",
                "Thailand (ads, hashtags, videos)",
                "Turkey (ads, hashtags)",
                "United Arab Emirates (ads, hashtags)",
                "United Kingdom (ads, hashtags)",
                "United States (ads, hashtags, videos)",
                "Vietnam (ads, hashtags, videos)"
              ]
            },
            "default": [
              "US"
            ]
          },
          "period": {
            "title": "Period",
            "enum": [
              "7",
              "30",
              "90",
              "180"
            ],
            "type": "string",
            "description": "Days the ranking covers. Each chart has its own periods (top ads 7/30/180, hashtags 7/30/90, videos 7/30); the nearest one is used and every row says which in periodDays.",
            "default": "7"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Leave empty for no limit (your maximum cost per run still applies)."
          },
          "industries": {
            "title": "Industries (top ads and hashtags)",
            "type": "array",
            "description": "Leave empty for all industries together. Each industry picked becomes its own ranking per country. The hashtag chart has 15 of these industries; the others apply to top ads only.",
            "items": {
              "type": "string",
              "enum": [
                "education",
                "vehicles-transportation",
                "baby-kids-maternity",
                "financial-services",
                "beauty-personal-care",
                "tech-electronics",
                "appliances",
                "travel",
                "household-products",
                "pets",
                "apps",
                "home-improvement",
                "apparel-accessories",
                "news-entertainment",
                "business-services",
                "games",
                "life-services",
                "food-beverage",
                "sports-outdoor",
                "health",
                "ecommerce"
              ],
              "enumTitles": [
                "Education",
                "Vehicle & Transportation",
                "Baby, Kids & Maternity",
                "Financial Services",
                "Beauty & Personal Care",
                "Tech & Electronics",
                "Appliances",
                "Travel",
                "Household Products",
                "Pets",
                "Apps",
                "Home Improvement",
                "Apparel & Accessories",
                "News & Entertainment",
                "Business Services",
                "Games",
                "Life Services",
                "Food & Beverage",
                "Sports & Outdoor",
                "Health",
                "E-Commerce (Non-app)"
              ]
            },
            "default": []
          },
          "videoCategories": {
            "title": "Video categories (trending videos)",
            "type": "array",
            "description": "Leave empty for all categories together. Each category picked becomes its own ranking per country.",
            "items": {
              "type": "string",
              "enum": [
                "beauty-care",
                "fashion",
                "food-beverage",
                "lifestyle-leisure",
                "tech-finance"
              ],
              "enumTitles": [
                "Beauty & Care",
                "Fashion",
                "Food & Beverage",
                "Lifestyle & Leisure",
                "Technology & Finance"
              ]
            },
            "default": []
          },
          "topAdsSortBy": {
            "title": "Top ads: sort by",
            "enum": [
              "for-you",
              "reach",
              "ctr",
              "likes",
              "six-second-view-rate"
            ],
            "type": "string",
            "description": "The order Creative Center ranks top ads in.",
            "default": "for-you"
          },
          "videosSortBy": {
            "title": "Trending videos: sort by",
            "enum": [
              "views",
              "engagement",
              "six-second-views"
            ],
            "type": "string",
            "description": "The metric the video chart ranks by.",
            "default": "views"
          },
          "includeAdDetails": {
            "title": "Top ads: add landing page and countries",
            "type": "boolean",
            "description": "Open each top ad public detail page for its landing page, the countries it runs in, comments and shares. Included in the price; turn off for faster runs.",
            "default": true
          },
          "onlyNew": {
            "title": "Only items new to the ranking",
            "type": "boolean",
            "description": "For daily schedules: return (and charge for) only items this saved task has not returned before in the same ranking. Rank change since your last run is filled in either way.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy by default: datacenter first, residential only if TikTok blocks (included in the price).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}