{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trends Scraper: Trending Hashtags and Top Videos",
    "description": "Scrape TikTok Creative Center trends by country: trending hashtags for 7, 30 or 90 days with rank, industry charts, posts, views, daily popularity curve and top creators, plus top videos with views, organic views and engagement rate. No login.",
    "version": "0.1",
    "x-build-id": "OlsDnByQxGdmlARLi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~tiktok-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-tiktok-trends-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/themineworks~tiktok-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-tiktok-trends-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/themineworks~tiktok-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-tiktok-trends-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": {
          "trendTypes": {
            "title": "What to read",
            "type": "array",
            "description": "Trending hashtags (27 countries, 7, 30 or 90 days, by industry) and top videos (US, Japan, Vietnam, Thailand and Indonesia, 7 or 30 days). Pick one or both.",
            "items": {
              "type": "string",
              "enum": [
                "hashtags",
                "videos"
              ],
              "enumTitles": [
                "Trending hashtags",
                "Top videos"
              ]
            },
            "default": [
              "hashtags"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Each country is read on its own. Hashtags: all 27 listed. Top videos: US, JP, VN, TH and ID only (other countries get an error row and cost nothing).",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "CA",
                "AU",
                "DE",
                "FR",
                "IT",
                "ES",
                "AR",
                "BR",
                "CO",
                "MX",
                "EG",
                "IL",
                "SA",
                "AE",
                "TR",
                "ZA",
                "ID",
                "JP",
                "KR",
                "MY",
                "PH",
                "SG",
                "TW",
                "TH",
                "VN"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Canada",
                "Australia",
                "Germany",
                "France",
                "Italy",
                "Spain",
                "Argentina",
                "Brazil",
                "Colombia",
                "Mexico",
                "Egypt",
                "Israel",
                "Saudi Arabia",
                "United Arab Emirates",
                "Turkey",
                "South Africa",
                "Indonesia",
                "Japan",
                "South Korea",
                "Malaysia",
                "Philippines",
                "Singapore",
                "Taiwan",
                "Thailand",
                "Vietnam"
              ]
            },
            "default": [
              "US"
            ]
          },
          "period": {
            "title": "Time window",
            "enum": [
              "7",
              "30",
              "90"
            ],
            "type": "string",
            "description": "Last 7, 30 or 90 days. Top video charts cover 7 or 30 days, so 90 reads videos for 30 days.",
            "default": "7"
          },
          "industries": {
            "title": "Hashtag charts (industries)",
            "type": "array",
            "description": "Leave empty to read the overall chart and all 15 industry charts and merge them (about 40 to 48 hashtags per country). Pick some to read only those. TikTok shows the top 3 of each chart to visitors who are not logged in.",
            "items": {
              "type": "string",
              "enum": [
                "all-industries",
                "apparel-accessories",
                "baby-kids-maternity",
                "beauty-personal-care",
                "education",
                "food-beverage",
                "games",
                "health",
                "home-improvement",
                "household-products",
                "news-entertainment",
                "pets",
                "sports-outdoor",
                "tech-electronics",
                "travel",
                "vehicle-transportation"
              ],
              "enumTitles": [
                "Overall chart (all industries)",
                "Apparel & Accessories",
                "Baby, Kids & Maternity",
                "Beauty & Personal Care",
                "Education",
                "Food & Beverage",
                "Games",
                "Health",
                "Home Improvement",
                "Household Products",
                "News & Entertainment",
                "Pets",
                "Sports & Outdoor",
                "Tech & Electronics",
                "Travel",
                "Vehicle & Transportation"
              ]
            },
            "default": []
          },
          "includeTopCreators": {
            "title": "Top creators of each hashtag",
            "type": "boolean",
            "description": "Adds the creators TikTok lists for each hashtag: username, nickname, followers, country and profile link. Same price either way.",
            "default": true
          },
          "videoSortBy": {
            "title": "Top video charts: sort by",
            "type": "array",
            "description": "Leave empty to read all three rankings and merge them. Each chart shows its top 4 videos to visitors who are not logged in.",
            "items": {
              "type": "string",
              "enum": [
                "views",
                "engagement",
                "completion"
              ],
              "enumTitles": [
                "Video views",
                "Engagement rate",
                "6 second view rate"
              ]
            },
            "default": []
          },
          "videoContentTags": {
            "title": "Top video charts: content",
            "type": "array",
            "description": "Leave empty to read all content plus the five content filters and merge them.",
            "items": {
              "type": "string",
              "enum": [
                "all-content",
                "beauty-care",
                "fashion",
                "food-beverage",
                "lifestyle-leisure",
                "technology-finance"
              ],
              "enumTitles": [
                "All content",
                "Beauty & Care",
                "Fashion",
                "Food & Beverage",
                "Lifestyle & Leisure",
                "Technology & Finance"
              ]
            },
            "default": []
          },
          "organicOnly": {
            "title": "Top videos: organic only",
            "type": "boolean",
            "description": "On: rank videos by their organic (unpaid) results only. Off: all views, paid included, as the Creative Center shows by default.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "The most hashtag and video rows this run returns, 1 to 20,000. A country gives about 44 hashtags and about 66 videos with every chart read.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}