Before spending budget on a TikTok creator partnership, you need to verify they are brand-safe. This audit checks a creator's recent content for controversial topics, scans comments for toxic patterns, and verifies audience engagement authenticity. Each full audit costs $0.025-0.035 depending on content volume.
Prerequisites
- Python 3.8+
- requests library
- A Scavio API key from scavio.dev
- TikTok creator username to audit
Walkthrough
Step 1: Pull creator profile and recent content
Fetch the creator's profile info and recent video posts.
import os, requests, json
from collections import Counter
API_KEY = os.environ['SCAVIO_API_KEY']
TH = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}
def get_creator_profile(username):
data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/profile',
headers=TH, json={'username': username}).json()
profile = data.get('user', data.get('data', {}).get('user', {}))
stats = data.get('stats', data.get('data', {}).get('stats', {}))
return {'username': profile.get('uniqueId', username),
'nickname': profile.get('nickname', ''),
'followers': stats.get('followerCount', 0),
'following': stats.get('followingCount', 0),
'likes': stats.get('heartCount', 0),
'videos': stats.get('videoCount', 0)}
def get_recent_posts(username, count=20):
data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/posts',
headers=TH, json={'username': username, 'count': count}).json()
posts = data.get('posts', data.get('data', {}).get('posts', []))
return [{'id': p.get('id', ''), 'desc': p.get('desc', ''),
'plays': p.get('stats', {}).get('playCount', 0),
'likes': p.get('stats', {}).get('diggCount', 0),
'comments': p.get('stats', {}).get('commentCount', 0)} for p in posts]
username = 'example_creator'
profile = get_creator_profile(username)
print(f'Profile: @{profile["username"]}')
print(f' Followers: {profile["followers"]:,} | Videos: {profile["videos"]} | Likes: {profile["likes"]:,}')
posts = get_recent_posts(username)
print(f' Recent posts fetched: {len(posts)}')
print(f'Cost: $0.010')Step 2: Scan content for brand safety signals
Check video descriptions for controversial topics and risky content.
RISKY_TOPICS = {
'political': ['politics', 'election', 'democrat', 'republican', 'trump', 'biden', 'maga'],
'controversy': ['drama', 'expose', 'cancelled', 'canceled', 'scandal', 'callout', 'beef'],
'adult': ['nsfw', 'onlyfans', '18+', 'adult content'],
'scam': ['crypto scam', 'get rich quick', 'mlm', 'pyramid', 'ponzi'],
'violence': ['fight', 'violent', 'weapon', 'blood', 'gore'],
}
def content_safety_scan(posts):
flags = []
for post in posts:
desc = post.get('desc', '').lower()
for category, keywords in RISKY_TOPICS.items():
for kw in keywords:
if kw in desc:
flags.append({
'category': category,
'keyword': kw,
'post_desc': post['desc'][:60],
'post_id': post['id']
})
# Engagement authenticity check
if posts:
avg_plays = sum(p['plays'] for p in posts) / len(posts)
avg_likes = sum(p['likes'] for p in posts) / len(posts)
engagement_rate = avg_likes / avg_plays if avg_plays > 0 else 0
if engagement_rate < 0.01:
flags.append({'category': 'authenticity', 'keyword': 'low engagement rate',
'post_desc': f'Avg {engagement_rate:.4f} (normal: 0.03-0.08)'})
print(f'\n=== Content Safety Scan ===')
print(f' Posts analyzed: {len(posts)}')
print(f' Flags found: {len(flags)}')
if flags:
by_category = Counter(f['category'] for f in flags)
for cat, count in by_category.most_common():
print(f' [{cat}]: {count} flags')
for f in [x for x in flags if x['category'] == cat][:2]:
print(f' "{f["keyword"]}" in: {f["post_desc"]}')
return flags
flags = content_safety_scan(posts)Step 3: Check creator reputation via web search
Search for controversy or negative press about the creator.
def reputation_check(username):
"""Search web for creator reputation signals."""
checks = [
f'@{username} tiktok controversy',
f'@{username} tiktok scam',
f'@{username} tiktok cancelled',
]
reputation_flags = []
for query in checks:
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': query, 'country_code': 'us', 'num_results': 3}).json()
results = data.get('organic_results', [])
for r in results:
title = r.get('title', '').lower()
if any(w in title for w in ['scam', 'controversy', 'cancelled', 'exposed', 'fraud']):
reputation_flags.append({'query': query, 'title': r['title'][:60], 'link': r.get('link', '')})
print(f'\n=== Reputation Check ===')
if reputation_flags:
print(f' WARNING: {len(reputation_flags)} reputation issues found:')
for f in reputation_flags:
print(f' - {f["title"]}')
else:
print(f' CLEAN: No reputation issues found in web search.')
print(f' Cost: ${len(checks) * 0.005:.3f}')
return reputation_flags
rep_flags = reputation_check(username)
# Final audit summary
print(f'\n=== BRAND SAFETY AUDIT SUMMARY ===')
total_flags = len(flags) + len(rep_flags)
if total_flags == 0:
print(f' PASS: @{username} is brand-safe')
elif total_flags <= 3:
print(f' CAUTION: @{username} has {total_flags} minor flags. Review manually.')
else:
print(f' FAIL: @{username} has {total_flags} flags. Do not partner.')Python Example
import os, requests
TH = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}', 'Content-Type': 'application/json'}
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def quick_audit(username):
# Check profile
data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/profile',
headers=TH, json={'username': username}).json()
stats = data.get('stats', data.get('data', {}).get('stats', {}))
print(f'@{username}: {stats.get("followerCount", 0):,} followers')
# Check reputation
rep = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'@{username} controversy', 'country_code': 'us'}).json()
print(f'Reputation check: {len(rep.get("organic_results", []))} results')
quick_audit('example_creator')
print('Cost: $0.010')JavaScript Example
const TH = { 'Authorization': `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json' };
const data = await fetch('https://api.scavio.dev/api/v1/tiktok/user/profile', {
method: 'POST', headers: TH, body: JSON.stringify({ username: 'example_creator' })
}).then(r => r.json());
console.log(`Followers: ${data.stats?.followerCount || 0}`);Expected Output
Profile: @example_creator
Followers: 245,000 | Videos: 312 | Likes: 5,200,000
Recent posts fetched: 20
Cost: $0.010
=== Content Safety Scan ===
Posts analyzed: 20
Flags found: 1
[controversy]: 1 flags
"drama" in: Reacting to the biggest drama of 2026...
=== Reputation Check ===
CLEAN: No reputation issues found in web search.
Cost: $0.015
=== BRAND SAFETY AUDIT SUMMARY ===
CAUTION: @example_creator has 1 minor flags. Review manually.