Resumen
Rastrear competidor TikTok cuentas diario to detectar estrategia de contenidos cambios, viral publicaciones, y engagement patron shifts. Pull ultimo publicaciones, comparar engagement rates to their linea base, y marcar videos ese outperform their promedio by 3x o mas.
Desencadenador
Diario cron at 07:00 UTC
Programación
Diario at 07:00 UTC
Pasos del flujo de trabajo
Cargar competidor lista
Leer competidor TikTok usernames de config. Cada entrada incluye their historico promedio engagement tasa for comparacion.
Pull ultimo publicaciones
For cada competidor, obtener their 20 mas reciente publicaciones via el usuario/publicaciones endpoint.
Detectar viral valores atipicos
Marcar cualquier publicacion con engagement 3x above el competitor's linea base promedio.
Extraer contenido patrones
Log video descriptions, hashtags usado, posting times, y duracion for patron analisis.
Generar diario digest
Salida un resumen of nuevo publicaciones, viral valores atipicos, y cualquier shifts in posting frecuencia o contenido themes.
Implementacion en Python
import requests, os
H = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}", "Content-Type": "application/json"}
BASE = "https://api.scavio.dev"
def monitor_competitor(username, baseline_eng=0.03):
profile = requests.post(f"{BASE}/api/v1/tiktok/profile",
headers=H, json={"username": username}).json()["data"]["user"]
followers = profile["follower_count"]
posts = requests.post(f"{BASE}/api/v1/tiktok/user/posts",
headers=H, json={"sec_user_id": profile["sec_uid"], "count": 20}).json()
viral = []
for p in posts["data"].get("posts", []):
stats = p.get("statistics", {})
eng = (stats.get("digg_count", 0) + stats.get("comment_count", 0)) / max(followers, 1)
if eng > baseline_eng * 3:
viral.append({
"desc": p.get("desc", "")[:80],
"views": stats.get("play_count", 0),
"engagement": round(eng * 100, 2),
})
return {"username": username, "followers": followers, "viral_posts": viral}
report = monitor_competitor("competitor_brand")
print(f"@{report['username']}: {len(report['viral_posts'])} viral posts detected")
for v in report["viral_posts"]:
print(f" {v['views']:,} views, {v['engagement']}% eng: {v['desc']}")Implementacion en JavaScript
const BASE = "https://api.scavio.dev";
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
async function monitorCompetitor(username, baselineEng = 0.03) {
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 posts = 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 viral = (posts.data.posts || []).filter(p => {
const s = p.statistics || {};
return ((s.digg_count || 0) + (s.comment_count || 0)) / user.follower_count > baselineEng * 3;
});
console.log(`@${username}: ${viral.length} viral posts`);
}
monitorCompetitor("competitor_brand");Plataformas utilizadas
TikTok
Descubrimiento de videos, creadores y productos en tendencia