Overview
Search TikTok for videos mentioning your brand or product category, then scan comments for brand mentions, purchase intent signals, and competitor comparisons. Alert when a comment thread contains actionable brand intelligence.
Trigger
Every 6 hours
Schedule
Every 6 hours
Workflow Steps
Search for brand-related videos
Use the search/videos endpoint to find recent TikTok videos mentioning your brand, product, or category keywords.
Pull comments from relevant videos
For each matching video, fetch comments using the video/comments endpoint. Paginate through up to 5 pages per video.
Scan for brand signals
Check each comment for brand mentions, product questions, purchase intent phrases, and competitor name mentions.
Score and prioritize
Rank detected mentions by comment like count and reply count, prioritizing high-engagement threads.
Send alerts
Push high-priority brand mentions to Slack or email with the video link, comment text, and engagement context.
Python Implementation
import requests, os, re
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
BASE = "https://api.scavio.dev"
BRAND_TERMS = ["scavio", "scavio api", "search api"]
def scan_comments(brand_query, max_videos=5):
search = requests.post(f"{BASE}/api/v1/tiktok/search/videos",
headers=H, json={"query": brand_query, "count": 20}).json()
mentions = []
for video in search["data"].get("videos", [])[:max_videos]:
comments = requests.post(f"{BASE}/api/v1/tiktok/video/comments",
headers=H, json={"video_id": video["aweme_id"], "count": 20}).json()
for c in comments["data"].get("comments", []):
text = c.get("text", "").lower()
if any(term in text for term in BRAND_TERMS):
mentions.append({
"video_desc": video.get("desc", "")[:60],
"comment": c["text"][:200],
"likes": c.get("digg_count", 0),
"replies": c.get("reply_comment_total", 0),
})
return sorted(mentions, key=lambda m: m["likes"], reverse=True)
results = scan_comments("search api tools")
for m in results[:5]:
print(f"[{m['likes']} likes] {m['comment'][:80]}")JavaScript Implementation
const BASE = "https://api.scavio.dev";
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
async function scanBrandMentions(query, brandTerms = ["scavio"]) {
const search = await fetch(`${BASE}/api/v1/tiktok/search/videos`, {
method: "POST", headers: H, body: JSON.stringify({ query, count: 20 })
}).then(r => r.json());
for (const video of (search.data.videos || []).slice(0, 5)) {
const comments = await fetch(`${BASE}/api/v1/tiktok/video/comments`, {
method: "POST", headers: H,
body: JSON.stringify({ video_id: video.aweme_id, count: 20 })
}).then(r => r.json());
const mentions = (comments.data.comments || [])
.filter(c => brandTerms.some(t => c.text?.toLowerCase().includes(t)));
if (mentions.length) console.log(`Video: ${video.desc?.slice(0, 60)} - ${mentions.length} mentions`);
}
}
scanBrandMentions("search api tools");Platforms Used
TikTok
Trending video, creator, and product discovery