ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build a TikTok Creator Brand Safety Report
Tutorial

How to Build a TikTok Creator Brand Safety Report

Screen TikTok creators for brand safety before partnerships. Analyze content themes, audience quality, and controversy signals.

Get Free API KeyAPI Docs

Before partnering with a TikTok creator, brands need to verify content safety, audience quality, and controversy history. This tutorial builds an automated brand safety report that screens creators by analyzing their recent content, engagement patterns, and public sentiment. Each creator report costs $0.010.

Prerequisites

  • Python 3.8+
  • requests library
  • A Scavio API key from scavio.dev
  • TikTok creator usernames to screen

Walkthrough

Step 1: Fetch creator content for analysis

Pull recent videos from a TikTok creator to analyze content themes.

Python
import os, requests, json
from datetime import datetime
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_content(username):
    data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/videos',
        headers=TH, json={'username': username}).json()
    videos = data.get('videos', data.get('data', {}).get('videos', []))
    return [{
        'desc': v.get('desc', ''),
        'plays': v.get('stats', {}).get('playCount', 0),
        'likes': v.get('stats', {}).get('diggCount', 0),
        'comments': v.get('stats', {}).get('commentCount', 0),
        'shares': v.get('stats', {}).get('shareCount', 0),
        'hashtags': [h.get('name', '') for h in v.get('textExtra', []) if h.get('hashtagName')],
    } for v in videos]

CREATORS = ['charlidamelio', 'khaby.lame', 'addisonre']

creator_data = {}
for username in CREATORS:
    videos = get_creator_content(username)
    creator_data[username] = videos
    total_plays = sum(v['plays'] for v in videos)
    print(f'  @{username:20} | {len(videos)} videos | {total_plays:,} total plays')
print(f'\nCost: ${len(CREATORS) * 0.005:.3f}')

Step 2: Screen content for brand safety issues

Analyze video descriptions for unsafe content themes and calculate safety scores.

Python
UNSAFE_KEYWORDS = {
    'high_risk': ['gambling', 'drugs', 'violence', 'explicit', 'nsfw', 'controversy', 'scandal'],
    'medium_risk': ['alcohol', 'smoking', 'political', 'conspiracy', 'drama', 'exposed', 'canceled'],
    'low_risk': ['rant', 'clickbait', 'shocking', 'unbelievable', 'prank'],
}

def safety_screen(username, videos):
    flags = {'high_risk': 0, 'medium_risk': 0, 'low_risk': 0}
    flagged_videos = []
    for v in videos:
        text = v['desc'].lower()
        for level, keywords in UNSAFE_KEYWORDS.items():
            for kw in keywords:
                if kw in text:
                    flags[level] += 1
                    flagged_videos.append({'desc': v['desc'][:60], 'level': level, 'keyword': kw})
    # Calculate safety score (100 = safest)
    total = len(videos) or 1
    penalty = flags['high_risk'] * 20 + flags['medium_risk'] * 10 + flags['low_risk'] * 3
    safety_score = max(0, 100 - penalty)
    # Engagement quality check
    if videos:
        avg_engagement = sum(v['likes'] + v['comments'] for v in videos) / len(videos)
        avg_plays = sum(v['plays'] for v in videos) / len(videos)
        engagement_rate = avg_engagement / avg_plays if avg_plays else 0
    else:
        engagement_rate = 0
    return {
        'username': username,
        'safety_score': safety_score,
        'flags': flags,
        'flagged_videos': flagged_videos[:5],
        'engagement_rate': engagement_rate,
        'video_count': len(videos),
    }

print(f'\n=== Brand Safety Screening ===')
reports = []
for username, videos in creator_data.items():
    report = safety_screen(username, videos)
    reports.append(report)
    status = 'SAFE' if report['safety_score'] >= 80 else 'REVIEW' if report['safety_score'] >= 50 else 'RISK'
    print(f'  @{username:20} | Score: {report["safety_score"]:3}/100 | Status: {status}')
    if report['flagged_videos']:
        for fv in report['flagged_videos'][:2]:
            print(f'    [{fv["level"]}] "{fv["keyword"]}" in: {fv["desc"]}')

Step 3: Check public sentiment via search

Search for controversy or negative press about the creator.

Python
def check_public_sentiment(username):
    # Search for controversy
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': f'{username} tiktok controversy', 'country_code': 'us'}, timeout=10).json()
    organic = data.get('organic_results', [])
    negative_signals = []
    for r in organic[:5]:
        text = f'{r.get("title", "")} {r.get("snippet", "")}'.lower()
        if any(w in text for w in ['controversy', 'scandal', 'canceled', 'backlash', 'apologize', 'fired']):
            negative_signals.append(r.get('title', '')[:60])
    return {'controversy_results': len(organic), 'negative_signals': negative_signals}

def full_safety_report(reports):
    print(f'\n{"=" * 60}')
    print(f'  TIKTOK CREATOR BRAND SAFETY REPORT')
    print(f'  Date: {datetime.now().strftime("%Y-%m-%d")}')
    print(f'{"=" * 60}')
    for report in reports:
        sentiment = check_public_sentiment(report['username'])
        score = report['safety_score']
        if sentiment['negative_signals']:
            score = max(0, score - len(sentiment['negative_signals']) * 15)
        status = 'APPROVED' if score >= 80 else 'NEEDS REVIEW' if score >= 50 else 'DO NOT PARTNER'
        print(f'\n  @{report["username"]}')
        print(f'    Safety Score: {score}/100 | Status: {status}')
        print(f'    Engagement Rate: {report["engagement_rate"]*100:.1f}%')
        print(f'    Content Flags: H:{report["flags"]["high_risk"]} M:{report["flags"]["medium_risk"]} L:{report["flags"]["low_risk"]}')
        if sentiment['negative_signals']:
            print(f'    Controversy Signals:')
            for s in sentiment['negative_signals'][:2]:
                print(f'      - {s}')
    print(f'\n  Cost: ${len(reports) * 0.010:.3f} per report')
    print(f'  vs. Brand safety tools: $500-2000/mo')

full_safety_report(reports)

Python Example

Python
import os, requests
TH = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}', 'Content-Type': 'application/json'}

def screen_creator(username):
    data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/videos',
        headers=TH, json={'username': username}).json()
    videos = data.get('videos', data.get('data', {}).get('videos', []))
    plays = sum(v.get('stats', {}).get('playCount', 0) for v in videos)
    print(f'@{username}: {len(videos)} videos, {plays:,} plays')

screen_creator('charlidamelio')
print('Cost: $0.005')

JavaScript Example

JavaScript
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/videos', {
  method: 'POST', headers: TH, body: JSON.stringify({ username: 'charlidamelio' })
}).then(r => r.json());
const videos = data.videos || data.data?.videos || [];
console.log(`Videos: ${videos.length}`);

Expected Output

JSON
  @charlidamelio         | 15 videos | 45,000,000 total plays
  @khaby.lame            | 12 videos | 120,000,000 total plays
  @addisonre             | 10 videos | 25,000,000 total plays

=== Brand Safety Screening ===
  @charlidamelio         | Score:  90/100 | Status: SAFE
  @khaby.lame            | Score: 100/100 | Status: SAFE
  @addisonre             | Score:  85/100 | Status: SAFE

============================================================
  TIKTOK CREATOR BRAND SAFETY REPORT
  Date: 2026-05-21
============================================================

  @charlidamelio
    Safety Score: 85/100 | Status: APPROVED
    Engagement Rate: 8.5%

  Cost: $0.030 per report
  vs. Brand safety tools: $500-2000/mo

Related Tutorials

  • How to Build TikTok UGC Campaign Tracker
  • How to Build TikTok Audience Quality Scorer
  • How to Build TikTok to Amazon Product Trend Pipeline

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.8+. requests library. A Scavio API key from scavio.dev. TikTok creator usernames to screen. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best TikTok Creator Brand Safety APIs (2026)

Read more
Best Of

Best TikTok Brand Safety API in 2026

Read more
Use Case

TikTok Creator Brand Safety Audit

Read more
Use Case

TikTok Brand Safety Creator Vetting

Read more
Comparison

Manual Vetting vs API-Driven Vetting (via Scavio or TikAPI)

Read more
Solution

Automate TikTok Creator Vetting for Brand Partnerships

Read more

Start Building

Screen TikTok creators for brand safety before partnerships. Analyze content themes, audience quality, and controversy signals.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy