{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trends Scraper",
    "description": "Scrape TikTok trends: Creative Center hashtags by country, period and industry with popularity curves and trend stage, ranked top videos, plus videos, sounds and creators from Explore. No login.",
    "version": "0.1",
    "x-build-id": "niQCc3y8kpCat4ttA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~tiktok-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-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/automation-lab~tiktok-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-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/automation-lab~tiktok-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-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",
        "required": [
          "trendType"
        ],
        "properties": {
          "trendType": {
            "title": "📊 Trend type",
            "enum": [
              "hashtag",
              "sound",
              "creator",
              "video"
            ],
            "type": "string",
            "description": "Hashtags come from Creative Center lists. Videos come from Explore or Creative Center (see Video source). Sounds and creators come from concrete Explore videos, in source order; TikTok removed its sound and creator rankings from public Creative Center.",
            "default": "hashtag"
          },
          "countryCode": {
            "title": "🌍 Country",
            "pattern": "^(?![Hh][Kk]$|[Cc][Nn]$|[Ii][Nn]$)[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter ISO country. Creative Center hashtag lists cover 27 markets, including US, GB, DE, FR, IT, ES, BR, MX, CA, AU, JP, KR, ID, TH, VN, SG, MY, PH, TW, TR, SA, AE, EG, ZA, IL, AR and CO; elsewhere hashtag rows are derived from Explore. For Explore modes it sets the browser location. TikTok is not available in HK, CN or IN, so those codes are rejected.",
            "default": "US"
          },
          "period": {
            "title": "📅 Time period (days)",
            "minimum": 7,
            "maximum": 120,
            "type": "integer",
            "description": "Creative Center window in days: 7, 30 or 90 for hashtags, 7 or 30 for Creative Center videos. Another value uses the closest window (120 becomes 90). Explore rows keep this value as context only, because the Explore feed has no period filter.",
            "default": 7
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of results, up to 100. TikTok shows short lists to logged-out visitors, so a run reads many lists and merges them: about 45 hashtags per country and period, and about 80 Creative Center videos. Explore modes usually reach 100.",
            "default": 30
          },
          "industry": {
            "title": "🏭 Hashtag industry",
            "enum": [
              "Education",
              "Vehicle & Transportation",
              "Baby, Kids & Maternity",
              "Beauty & Personal Care",
              "Tech & Electronics",
              "Travel",
              "Household Products",
              "Pets",
              "Home Improvement",
              "Apparel & Accessories",
              "News & Entertainment",
              "Games",
              "Food & Beverage",
              "Sports & Outdoor",
              "Health"
            ],
            "type": "string",
            "description": "Hashtags only. Read one industry's list instead of all of them. TikTok shows 3 hashtags per list to logged-out visitors, so this returns up to 3 rows."
          },
          "videoSource": {
            "title": "🎬 Video source",
            "enum": [
              "explore",
              "creativeCenter"
            ],
            "type": "string",
            "description": "Videos only. Explore: live videos with likes, comments and shares, in source order, from any country. Creative Center: TikTok's ranked top videos by country and period, with views, engagement rate and 6-second view rate, for US, JP, VN, TH and ID only.",
            "default": "explore"
          },
          "videoSortBy": {
            "title": "↕️ Video ranking",
            "enum": [
              "views",
              "engagement",
              "sixSecondViews"
            ],
            "type": "string",
            "description": "Creative Center videos only. All rows are sorted by this metric, highest first, across the lists read. With organic-only rows, `views` means organic views.",
            "default": "views"
          },
          "organicOnly": {
            "title": "🌱 Organic videos only",
            "type": "boolean",
            "description": "Creative Center videos only. Leave out rankings that include paid views.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}