Vetting TikTok creators before sponsorship using an API checklist lets you programmatically evaluate engagement rates, follower counts, content consistency, and posting frequency instead of relying on screenshots or self-reported metrics. This tutorial shows you how to pull a creator profile via the Scavio TikTok API, compute key trust signals, and score creators against a pass/fail rubric so you can confidently allocate your influencer budget.
Prerequisites
- Scavio API key with TikTok access (free 250 credits/mo at scavio.dev)
- Python 3.9+ or Node.js 18+
- A list of TikTok creator usernames to evaluate
Walkthrough
Step 1: Fetch creator profile data
Use the Scavio TikTok user info endpoint to pull the creator profile including follower count, following count, total likes, video count, and bio. This gives you the raw numbers you need for your vetting rubric.
import requests
API_KEY = 'your_scavio_api_key'
def get_creator_profile(username):
resp = requests.post(
'https://api.scavio.dev/api/v1/tiktok/user/info',
headers={'Authorization': f'Bearer {API_KEY}'},
json={'username': username}
)
resp.raise_for_status()
return resp.json()
profile = get_creator_profile('target_creator')
print(f'Followers: {profile.get("follower_count", 0):,}')
print(f'Total likes: {profile.get("total_likes", 0):,}')
print(f'Videos: {profile.get("video_count", 0)}')Step 2: Pull recent videos for engagement analysis
Fetch the creator recent posts to calculate real engagement metrics. Self-reported averages are unreliable. You need per-video data to spot trends and outliers.
def get_recent_videos(username, count=20):
resp = requests.post(
'https://api.scavio.dev/api/v1/tiktok/user/posts',
headers={'Authorization': f'Bearer {API_KEY}'},
json={'username': username, 'count': count}
)
resp.raise_for_status()
return resp.json().get('posts', [])
videos = get_recent_videos('target_creator', count=20)Step 3: Compute engagement rate and consistency score
Calculate the median engagement rate (likes + comments + shares divided by views) across recent videos. Use median instead of mean to avoid skew from one viral outlier. Also compute the coefficient of variation to measure how consistent their performance is.
import statistics
def compute_engagement_metrics(videos):
rates = []
for v in videos:
views = v.get('views', 0)
if views < 100:
continue
engagement = v.get('likes', 0) + v.get('comments', 0) + v.get('shares', 0)
rates.append(engagement / views)
if not rates:
return {'median_rate': 0, 'consistency': 0, 'sample_size': 0}
median_rate = statistics.median(rates)
mean_rate = statistics.mean(rates)
stdev = statistics.stdev(rates) if len(rates) > 1 else 0
cv = stdev / mean_rate if mean_rate > 0 else 0
return {
'median_rate': round(median_rate * 100, 2),
'consistency': round((1 - min(cv, 1)) * 100, 1),
'sample_size': len(rates),
}
metrics = compute_engagement_metrics(videos)
print(f'Median engagement: {metrics["median_rate"]}%')
print(f'Consistency score: {metrics["consistency"]}%')Step 4: Run the vetting checklist
Score the creator against a pass/fail rubric covering minimum follower count, engagement rate floor, consistency threshold, and minimum posting frequency. Each check returns pass or fail with the actual value so you can make informed decisions.
def vet_creator(profile, metrics, videos):
checks = []
follower_count = profile.get('follower_count', 0)
checks.append({
'check': 'Min 10K followers',
'pass': follower_count >= 10000,
'value': f'{follower_count:,}',
})
checks.append({
'check': 'Engagement rate >= 3%',
'pass': metrics['median_rate'] >= 3.0,
'value': f'{metrics["median_rate"]}%',
})
checks.append({
'check': 'Consistency score >= 60%',
'pass': metrics['consistency'] >= 60,
'value': f'{metrics["consistency"]}%',
})
checks.append({
'check': 'At least 2 posts/week',
'pass': len(videos) >= 8,
'value': f'{len(videos)} posts in sample',
})
passed = sum(1 for c in checks if c['pass'])
return {'checks': checks, 'passed': passed, 'total': len(checks)}
result = vet_creator(profile, metrics, videos)
for c in result['checks']:
status = 'PASS' if c['pass'] else 'FAIL'
print(f'[{status}] {c["check"]}: {c["value"]}')
print(f'\nScore: {result["passed"]}/{result["total"]}')Python Example
import requests
import statistics
API_KEY = 'your_scavio_api_key'
def get_creator_profile(username):
resp = requests.post(
'https://api.scavio.dev/api/v1/tiktok/user/info',
headers={'Authorization': f'Bearer {API_KEY}'},
json={'username': username}
)
resp.raise_for_status()
return resp.json()
def get_recent_videos(username, count=20):
resp = requests.post(
'https://api.scavio.dev/api/v1/tiktok/user/posts',
headers={'Authorization': f'Bearer {API_KEY}'},
json={'username': username, 'count': count}
)
resp.raise_for_status()
return resp.json().get('posts', [])
def compute_engagement(videos):
rates = []
for v in videos:
views = v.get('views', 0)
if views < 100:
continue
eng = v.get('likes', 0) + v.get('comments', 0) + v.get('shares', 0)
rates.append(eng / views)
if not rates:
return {'median_rate': 0, 'consistency': 0}
median_rate = statistics.median(rates)
mean_rate = statistics.mean(rates)
stdev = statistics.stdev(rates) if len(rates) > 1 else 0
cv = stdev / mean_rate if mean_rate > 0 else 0
return {
'median_rate': round(median_rate * 100, 2),
'consistency': round((1 - min(cv, 1)) * 100, 1),
}
def vet_creator(username):
profile = get_creator_profile(username)
videos = get_recent_videos(username, count=20)
metrics = compute_engagement(videos)
checks = [
('Min 10K followers', profile.get('follower_count', 0) >= 10000),
('Engagement >= 3%', metrics['median_rate'] >= 3.0),
('Consistency >= 60%', metrics['consistency'] >= 60),
('2+ posts/week', len(videos) >= 8),
]
for label, passed in checks:
print(f'[{"PASS" if passed else "FAIL"}] {label}')
print(f'Score: {sum(p for _, p in checks)}/{len(checks)}')
vet_creator('target_creator')JavaScript Example
const API_KEY = 'your_scavio_api_key';
async function getProfile(username) {
const resp = await fetch('https://api.scavio.dev/api/v1/tiktok/user/info', {
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ username }),
});
return resp.json();
}
async function getRecentVideos(username, count = 20) {
const resp = await fetch('https://api.scavio.dev/api/v1/tiktok/user/posts', {
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ username, count }),
});
const data = await resp.json();
return data.posts || [];
}
function computeEngagement(videos) {
const rates = videos
.filter(v => (v.views || 0) >= 100)
.map(v => ((v.likes || 0) + (v.comments || 0) + (v.shares || 0)) / v.views);
if (!rates.length) return { medianRate: 0, consistency: 0 };
const sorted = [...rates].sort((a, b) => a - b);
const median = sorted[Math.floor(sorted.length / 2)];
const mean = rates.reduce((a, b) => a + b, 0) / rates.length;
const stdev = Math.sqrt(rates.reduce((s, r) => s + (r - mean) ** 2, 0) / rates.length);
const cv = mean > 0 ? stdev / mean : 0;
return {
medianRate: Math.round(median * 10000) / 100,
consistency: Math.round((1 - Math.min(cv, 1)) * 1000) / 10,
};
}
async function vetCreator(username) {
const profile = await getProfile(username);
const videos = await getRecentVideos(username, 20);
const metrics = computeEngagement(videos);
const checks = [
['Min 10K followers', (profile.follower_count || 0) >= 10000],
['Engagement >= 3%', metrics.medianRate >= 3.0],
['Consistency >= 60%', metrics.consistency >= 60],
['2+ posts/week', videos.length >= 8],
];
for (const [label, passed] of checks) {
console.log(`[${passed ? 'PASS' : 'FAIL'}] ${label}`);
}
console.log(`Score: ${checks.filter(c => c[1]).length}/${checks.length}`);
}
vetCreator('target_creator');Expected Output
[PASS] Min 10K followers
[PASS] Engagement >= 3%
[FAIL] Consistency >= 60%
[PASS] 2+ posts/week
Score: 3/4