# TikTok Trending Scout (`scalloped_scotspine/tiktok-trending-scout`) Actor

Scrapes TikTok trending content and finds common interests, hashtags, sounds, and topics. Uses Playwright for JS rendering.

- **URL**: https://apify.com/scalloped\_scotspine/tiktok-trending-scout.md
- **Developed by:** [Huy Tran](https://apify.com/scalloped_scotspine) (community)
- **Categories:** AI, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Trending Scout

Scrapes TikTok trending content and finds common interests, hashtags, sounds, and topics.

### What it extracts

| Field | Description |
|---|---|
| `interests.top_interests` | Interest clusters ranked by frequency |
| `interests.top_hashtags` | Most-used hashtags across trending videos |
| `interests.top_sounds` | Most-used sounds/tracks |
| `interests.top_accounts` | Most-repeated creators |
| `ai_insights` | Deep analysis: clusters, trends, demographics (if AI enabled) |

### Input

```json
{
  "region": "US",
  "category": "recommend",
  "count": 20,
  "extractHashtags": true,
  "extractSounds": true,
  "extractAccounts": true,
  "useAiInsights": false
}
```

### Output

Each run produces:

- **N video records** — individual video data (url, description, likes, comments, hashtags, sound, author)
- **1 summary record** — aggregate stats, interest clusters, top hashtags/sounds/accounts

### AI Interest Analysis

Enable `useAiInsights: true` + provide your OpenAI API key to get:

- Interest clusters (grouped themes)
- Emerging trends
- Audience demographics
- Content patterns that perform well
- Hashtag recommendations

### Notes

- Uses Playwright (headless Chrome) to render TikTok's JS-heavy pages
- TikTok has bot detection — may need retries or proxy for high-volume runs
- More videos = slower but deeper interest coverage

# Actor input Schema

## `region` (type: `string`):

Country code for trending content (US, GB, AU, CA, etc.)

## `category` (type: `string`):

Feed type: recommend, following, music, gaming, sports, news, etc.

## `count` (type: `integer`):

Number of trending videos to analyze (more = deeper insights, slower)

## `extractInterests` (type: `boolean`):

Analyze videos to find common interest clusters and topics.

## `extractHashtags` (type: `boolean`):

Extract all hashtags from video descriptions.

## `extractSounds` (type: `boolean`):

Extract trending sounds and music used in videos.

## `extractAccounts` (type: `boolean`):

Extract creator usernames and follower counts.

## `useAiInsights` (type: `boolean`):

Use AI to cluster videos into interest categories and find common themes.

## `openaiApiKey` (type: `string`):

Required if AI interest analysis is enabled.

## `proxy` (type: `string`):

Custom HTTP/SOCKS5 proxy. Example: http://your-vps-ip:1080 or socks5://your-vps-ip:1080. Leave empty to run without proxy.

## `aiModel` (type: `string`):

Model for AI analysis (gpt-4o-mini recommended).

## Actor input object example

```json
{
  "region": "US",
  "category": "recommend",
  "count": 20,
  "extractInterests": true,
  "extractHashtags": true,
  "extractSounds": true,
  "extractAccounts": true,
  "useAiInsights": false,
  "proxy": "",
  "aiModel": "gpt-4o-mini"
}
```

# 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 = {
    "count": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scalloped_scotspine/tiktok-trending-scout").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 = { "count": 20 }

# Run the Actor and wait for it to finish
run = client.actor("scalloped_scotspine/tiktok-trending-scout").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 '{
  "count": 20
}' |
apify call scalloped_scotspine/tiktok-trending-scout --silent --output-dataset

```

## MCP server setup

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

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/ZBCYasx5hbOXHX2pu/builds/z4fn90AvLtXLXnt9w/openapi.json
