Overview
Vet TikTok influencer candidates by pulling profile stats, recent posts, and follower samples via API. Calculate real engagement rates, check posting consistency, and flag accounts with suspicious follower patterns. Runs daily against a watchlist of creator usernames.
Trigger
Daily cron at 08:00 UTC
Schedule
Daily at 08:00 UTC
Workflow Steps
Load creator watchlist
Read target TikTok usernames from a config file or database. Each entry has the username and the campaign they are being evaluated for.
Pull profile data
For each username, call the TikTok profile endpoint to get follower count, following count, total likes, video count, and bio.
Fetch recent posts
Call user/posts endpoint with max_cursor pagination to get the last 20 videos. Extract view counts, like counts, comment counts, and share counts per video.
Calculate engagement metrics
Compute median engagement rate (likes + comments + shares) / followers for the last 20 posts. Flag creators below 2% or above 20% (suspiciously high).
Sample followers for quality
Pull 2 pages of followers (40 accounts). Check what percentage have zero videos and follow 500+ accounts, which indicates bot followers.
Output vetting report
Write a CSV with: username, followers, median engagement rate, posting frequency, follower quality score, and a pass/flag/fail recommendation.
Python Implementation
import requests, os, statistics
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
BASE = "https://api.scavio.dev"
def vet_creator(username):
profile = requests.post(f"{BASE}/api/v1/tiktok/profile",
headers=H, json={"username": username}).json()["data"]["user"]
followers = profile["follower_count"]
posts_resp = requests.post(f"{BASE}/api/v1/tiktok/user/posts",
headers=H, json={"sec_user_id": profile["sec_uid"], "count": 20}).json()
posts = posts_resp["data"].get("posts", [])
engagement_rates = []
for p in posts:
stats = p.get("statistics", {})
eng = stats.get("digg_count", 0) + stats.get("comment_count", 0) + stats.get("share_count", 0)
if followers > 0:
engagement_rates.append(eng / followers * 100)
median_eng = statistics.median(engagement_rates) if engagement_rates else 0
foll_resp = requests.post(f"{BASE}/api/v1/tiktok/user/followers",
headers=H, json={"sec_user_id": profile["sec_uid"], "count": 20}).json()
sample = foll_resp["data"].get("followers", [])
bot_like = sum(1 for f in sample if f.get("aweme_count", 0) == 0 and f.get("following_count", 0) > 500)
quality_score = 1 - (bot_like / len(sample)) if sample else 0
return {
"username": username,
"followers": followers,
"median_engagement": round(median_eng, 2),
"posts_sampled": len(posts),
"follower_quality": round(quality_score, 2),
"status": "pass" if median_eng >= 2 and quality_score >= 0.8 else "flag",
}
result = vet_creator("example_creator")
print(f"{result['username']}: {result['median_engagement']}% eng, {result['follower_quality']} quality -> {result['status']}")JavaScript Implementation
const BASE = "https://api.scavio.dev";
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
async function vetCreator(username) {
const profile = await fetch(`${BASE}/api/v1/tiktok/profile`, {
method: "POST", headers: H, body: JSON.stringify({ username })
}).then(r => r.json());
const user = profile.data.user;
const postsResp = await fetch(`${BASE}/api/v1/tiktok/user/posts`, {
method: "POST", headers: H,
body: JSON.stringify({ sec_user_id: user.sec_uid, count: 20 })
}).then(r => r.json());
const posts = postsResp.data.posts || [];
const engRates = posts.map(p => {
const s = p.statistics || {};
return user.follower_count > 0
? ((s.digg_count || 0) + (s.comment_count || 0) + (s.share_count || 0)) / user.follower_count * 100
: 0;
});
engRates.sort((a, b) => a - b);
const median = engRates[Math.floor(engRates.length / 2)] || 0;
console.log(`${username}: ${median.toFixed(2)}% engagement, ${posts.length} posts sampled`);
return { username, followers: user.follower_count, medianEngagement: median };
}
vetCreator("example_creator");Platforms Used
TikTok
Trending video, creator, and product discovery