# TikTok Trends, Hashtags & Sound Extractor (`drain54/tiktok-trends-scraper`) Actor

Scrape trending TikTok videos, viral sounds, hashtags, engagement metrics (views, likes, comments, shares), and creator profiles.

- **URL**: https://apify.com/drain54/tiktok-trends-scraper.md
- **Developed by:** [Indra Darmawan](https://apify.com/drain54) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 scraped tiktok video & sound data

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TikTok Trends, Hashtags & Sound Extractor 🎵🔥

Scrape trending TikTok videos, viral sounds, hashtags, engagement metrics (views, likes, comments, shares), and creator profiles at scale.

Designed for **e-commerce sellers, dropshippers, affiliate marketers, content creators, and social intelligence teams** looking for viral products and trending sounds.

***

### ⚡ What does TikTok Trends Extractor do?

1. **Scrapes Detailed Video Metrics:** Extract view counts, like counts, comment counts, repost/share counts, and video duration.
2. **Viral Sound & Music Tracking:** Detects original sounds, artists, and music links used in trending videos.
3. **Hashtag Intelligence:** Automatically parses all hashtags from video captions to identify viral niches (e.g. `#tiktokmademebuyit`, `#amazonfinds`).
4. **Dual Engine Resilience:** Combines deep video inspection with official TikTok metadata feeds for **maximum reliability and 0% bot-wall failure**.
5. **Keyword & Topic Discovery:** Discover trending videos across specific niches simply by providing keywords.

***

### 🚀 Key Features & Extracted Data

| Data Field | Description | Example Output |
|---|---|---|
| `videoId` | Unique TikTok video ID | `6718335390845095173` |
| `videoUrl` | Direct link to the TikTok video | `https://www.tiktok.com/@scout2015/video/6718335390845095173` |
| `caption` | Full video description and text | `Scramble up ur name & I’ll try to guess it... #foryoupage` |
| `hashtags` | Clean list of extracted hashtags | `["foryoupage", "petsoftiktok", "aesthetic"]` |
| `authorUsername`| TikTok handle of the creator | `scout2015` |
| `authorName` | Display name of the creator | `Scout, Suki & Stella` |
| `soundTitle` | Audio track title | `original sound` |
| `soundAuthor`| Original sound artist | `tiff` |
| `soundUrl` | Direct link to TikTok sound library | `https://www.tiktok.com/music/original-sound-668980466...` |
| `viewCount` | Total views count | `159300` |
| `likeCount` | Total likes count | `35200` |
| `commentCount`| Total comments count | `5486` |
| `repostCount` | Total shares / reposts count | `1486` |
| `duration` | Video length in seconds | `10` |
| `thumbnailUrl`| High-resolution CDN cover image | `https://p16-common-sign.tiktokcdn.com/...` |

***

### 💡 How to Use

1. Enter direct **TikTok Video URLs** or enter **Search Keywords** (e.g. `dropshipping products`, `viral dance`).
2. Adjust **Max Videos to Scrape** (e.g. 10 to 100).
3. Click **Start** or trigger via Apify API.
4. Export your data to **CSV, Excel, or JSON**.

***

### 📥 Sample Input

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ],
  "searchKeywords": [
    "tiktok made me buy it",
    "viral products"
  ],
  "maxVideos": 10
}
```

***

### 📤 Sample Output

```json
{
  "videoUrl": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
  "videoId": "6718335390845095173",
  "caption": "Scramble up ur name & I’ll try to guess it😍❤️ #foryoupage #petsoftiktok #aesthetic",
  "hashtags": [
    "foryoupage",
    "petsoftiktok",
    "aesthetic"
  ],
  "authorUsername": "scout2015",
  "authorName": "Scout, Suki & Stella",
  "authorUrl": "https://www.tiktok.com/@scout2015",
  "soundTitle": "original sound",
  "soundAuthor": "tiff",
  "soundUrl": "https://www.tiktok.com/music/original-sound-6689804660171082501?refer=embed",
  "viewCount": 159300,
  "likeCount": 35200,
  "commentCount": 5486,
  "repostCount": 1486,
  "duration": 10,
  "thumbnailUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-p-0068/8ac0190d8ad54535bf823ed5f3202b6b~tplv-tiktokx-origin.image?dr=14575",
  "elapsedMs": 1420,
  "status": "success"
}
```

# Actor input Schema

## `videoUrls` (type: `array`):

List of TikTok video URLs to scrape.

## `searchKeywords` (type: `array`):

Discover trending TikTok videos matching these keywords or niches (e.g., dropshipping, viral sound, ai tools).

## `maxVideos` (type: `integer`):

Maximum number of videos to extract.

## `customProxyUrl` (type: `string`):

Optional custom proxy URL (e.g., http://user:pass@host:port).

## `proxyConfiguration` (type: `object`):

Proxy settings to bypass anti-scraping protections.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ],
  "maxVideos": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        "https://www.tiktok.com/@scout2015/video/6718335390845095173"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("drain54/tiktok-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "videoUrls": ["https://www.tiktok.com/@scout2015/video/6718335390845095173"] }

# Run the Actor and wait for it to finish
run = client.actor("drain54/tiktok-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ]
}' |
apify call drain54/tiktok-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,drain54/tiktok-trends-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HE8mawidR2naLVcEm/builds/dJA62VfcC8VdtI9mc/openapi.json
