Resumen
Este flujo de trabajo rastrea TikTok hashtag rendimiento semanal by querying Scavio TikTok API for cada tracked hashtag's view conteo, video conteo, y engagement metricas. It almacena semanal snapshots to construir tendencia datos, detecta sudden spikes o drops in hashtag rendimiento, y genera un informe for marketing teams. Use it to monitorear campana hashtags, rastrear competidor branded etiquetas, y identificar emerging tendencias in your categoria.
Desencadenador
Cron programar (cada Monday at 9:00 AM UTC)
Programación
Ejecuta cada Monday at 9:00 AM UTC
Pasos del flujo de trabajo
Cargar tracked hashtag lista
Leer el lista of hashtags to monitorear de configuracion, including campana y competidor etiquetas.
Consulta TikTok hashtag datos
Call Scavio TikTok hashtag endpoint for cada tracked etiqueta to obtener actual view counts y video metricas.
Comparar contra anterior semana
Cargar last week's snapshot y calcular week-over-week cambios in views y video conteo.
Marcar anomalias
Detectar hashtags con unusual crecimiento o descenso comparado to their promedio movil.
Generar informe semanal
Compile un ranked hashtag rendimiento informe con tendencias y anomalia flags.
Implementacion en Python
import requests
import json
from datetime import datetime
from pathlib import Path
API_KEY = "your_scavio_api_key"
TIKTOK_URL = "https://api.scavio.dev/api/v1/tiktok"
def check_hashtag(hashtag: str) -> dict:
res = requests.post(
f"{TIKTOK_URL}/hashtag",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"hashtag": hashtag},
timeout=15,
)
if not res.ok:
return {"hashtag": hashtag, "views": 0, "videos": 0, "error": True}
data = res.json()
return {
"hashtag": hashtag,
"views": data.get("view_count", 0),
"videos": data.get("video_count", 0),
"error": False,
}
def run():
date = datetime.utcnow().strftime("%Y-%m-%d")
hashtags = ["#scavio", "#searchapi", "#webscraping", "#aitools", "#n8nautomation", "#openwebui"]
results = []
for tag in hashtags:
data = check_hashtag(tag.lstrip("#"))
results.append(data)
results.sort(key=lambda x: x["views"], reverse=True)
report = {"date": date, "hashtags_tracked": len(hashtags), "results": results}
Path(f"tiktok_hashtags_{date}.json").write_text(json.dumps(report, indent=2))
print(f"TikTok hashtag tracker {date}:")
for r in results:
print(f" {r['hashtag']}: {r['views']:,} views, {r['videos']:,} videos")
if __name__ == "__main__":
run()Implementacion en JavaScript
const API_KEY = "your_scavio_api_key";
const T = "https://api.scavio.dev/api/v1/tiktok";
async function checkHashtag(hashtag) {
const res = await fetch(`${T}/hashtag`, {
method: "POST",
headers: { Authorization: `Bearer ${API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({ hashtag }),
});
if (!res.ok) return { hashtag, views: 0, videos: 0 };
const data = await res.json();
return { hashtag, views: data.view_count ?? 0, videos: data.video_count ?? 0 };
}
const tags = ["scavio", "searchapi", "webscraping", "aitools"];
for (const tag of tags) {
const r = await checkHashtag(tag);
console.log(`#${r.hashtag}: ${r.views.toLocaleString()} views, ${r.videos.toLocaleString()} videos`);
}Plataformas utilizadas
TikTok
Descubrimiento de videos, creadores y productos en tendencia