# TikTok Trend Alert Bot - Trending Hashtags to Discord/Slack (`martin10291/tiktok-trend-alert-bot`) Actor

Watches TikTok's trending hashtags by country and sends alerts for new trends to Discord, Slack, Telegram or any webhook (Zapier, Make, n8n). Views, posts, trend direction and top creators.

- **URL**: https://apify.com/martin10291/tiktok-trend-alert-bot.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Trend Alert Bot - Trending Hashtags to Discord & Slack

Get an alert **the moment a new hashtag starts trending on TikTok** in the countries you care about. The bot reads TikTok's own trend ranking (TikTok Creative Center), works out whether each trend is **rising, peaking or fading**, and posts only the **new** trends to **Discord, Slack, Telegram** or any webhook (**Zapier, Make, n8n**).

Schedule it every hour or every morning and your team never misses a trend again.

### Why use it

- **Real TikTok data**: the trending hashtags TikTok itself ranks per country, with views and post counts
- **Only new trends**: remembers what it already sent, so scheduled runs don't spam you
- **Trend direction**: rising / peaking / stable / fading from the 7-day popularity curve, plus the peak date
- **Many countries in one run**: US, UK, Germany, France, Brazil, Indonesia, Japan, UAE and more
- **Alerts anywhere**: Discord, Slack, Telegram, or a JSON webhook for Zapier/Make/n8n
- **Top creators** already using each hashtag, with follower counts
- No TikTok login, no cookies, no API key

### Who it's for

Social media managers, TikTok creators, UGC creators, agencies, e-commerce brands and clipping teams who want to jump on trends early.

### Quick start

1. Add your **countries** (e.g. `US`, `GB`).
2. Paste a **Discord webhook** (Server Settings → Integrations → Webhooks), a **Slack incoming webhook**, a **Telegram bot token + chat ID**, or a **Zapier/Make "Catch Hook" URL**.
3. Click **Start**, then **Schedule** the actor (e.g. every 3 hours). The first run sends the current ranking; later runs send only new trends.

### Output

| Field | Description |
|---|---|
| `hashtag`, `rank`, `country`, `periodDays` | Trending hashtag and its position |
| `views`, `posts`, `viewsPerPost` | Reach in the period |
| `trendDirection`, `momentum`, `peakDate`, `popularityCurve` | Rising / peaking / stable / fading |
| `industries` | TikTok industry labels (Games, Beauty, Food...) |
| `topCreators` | Creators leading the trend (handle, followers, URL) |
| `isNew`, `firstSeenAt` | New since the last run? |
| `tiktokUrl`, `trendPageUrl` | Links to the hashtag and the trend page |

A `RUN_SUMMARY` record lists new trends, rising hashtags and the status of every alert channel.

### Example Discord alert

```
TikTok Trend Alert: 3 new trending hashtags
🚀 #livecanbeeasy (US, 7d #3): 30.2M views, 21.3K posts, rising · News & Entertainment
🔥 #marvelrivalsavengers (FR, 7d #1): 24.1M views, 110.1K posts, peaking · Games
```

### Zapier / Make

Put a Zapier **Webhooks by Zapier → Catch Hook** (or Make **Custom webhook**) URL into `webhookUrl`. Each run POSTs `{title, text, trends: [...]}`, so you can forward trends to Gmail, Google Sheets, Notion, Airtable or SMS. You can also use the official Apify app in Zapier/Make to start the actor and read its dataset.

### Pricing

Pay per result: one result per trending hashtag saved. A 6-country run costs a few cents.

### FAQ

**How many hashtags per country?** The top hashtags TikTok shows publicly for that country and time range (currently the top 3 per country and period). Add more countries for a wider radar.
**How fresh is the data?** As fresh as TikTok's trend ranking; schedule the actor to catch changes.
**Do I need a TikTok account?** No.

# Actor input Schema

## `countries` (type: `array`):

2-letter country codes to watch (US, GB, DE, FR, BR, ID, JP, AE...). Each country returns the hashtags TikTok currently ranks as top trending there.

## `periods` (type: `array`):

Trend window in days: 7 (this week) and/or 30 (this month).

## `discordWebhookUrl` (type: `string`):

Server Settings → Integrations → Webhooks → Copy URL. New trends are posted to this channel.

## `slackWebhookUrl` (type: `string`):

Slack app → Incoming Webhooks → webhook URL.

## `telegramBotToken` (type: `string`):

Token from @BotFather. Use together with the chat ID.

## `telegramChatId` (type: `string`):

Your user, group or channel ID that receives the alerts.

## `webhookUrl` (type: `string`):

Receives a JSON POST with the new trends: connect it to Zapier/Make/n8n Catch Hook and send them anywhere (email, Sheets, Notion...).

## `alertOn` (type: `string`):

'new' = only hashtags that were not in the ranking at the last run (best for schedules). 'all' = the whole ranking every run. 'none' = no alerts, just the dataset.

## `keywords` (type: `array`):

Keep only trends whose hashtag or industry contains one of these words, e.g. 'beauty', 'games', 'food'.

## `risingOnly` (type: `boolean`):

Skip trends whose popularity is stable or fading.

## `minViews` (type: `integer`):

Skip hashtags with fewer views in the period.

## `maxItems` (type: `integer`):

Hard limit on dataset rows (and cost).

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

Optional Apify Proxy. The actor tries the proxy and a direct connection.

## Actor input object example

```json
{
  "countries": [
    "US",
    "GB",
    "FR",
    "BR",
    "ID",
    "JP"
  ],
  "periods": [
    "7",
    "30"
  ],
  "alertOn": "new",
  "risingOnly": false,
  "minViews": 0,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Items extracted by the Actor.

# 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 = {
    "countries": [
        "US",
        "GB",
        "FR",
        "BR",
        "ID",
        "JP"
    ],
    "periods": [
        "7",
        "30"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/tiktok-trend-alert-bot").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 = {
    "countries": [
        "US",
        "GB",
        "FR",
        "BR",
        "ID",
        "JP",
    ],
    "periods": [
        "7",
        "30",
    ],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("martin10291/tiktok-trend-alert-bot").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 '{
  "countries": [
    "US",
    "GB",
    "FR",
    "BR",
    "ID",
    "JP"
  ],
  "periods": [
    "7",
    "30"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call martin10291/tiktok-trend-alert-bot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/tiktok-trend-alert-bot"
        }
    }
}
```

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/HFeb3AdGTxz0gQmmK/builds/Q6Mvv9sGLlG7lXFVy/openapi.json
