Las menciones de marca ocurren simultáneamente en Google, Reddit, TikTok y YouTube. Monitorear cada plataforma por separado es costoso y fragmentado. Este canal consulta las cuatro plataformas desde una API, deduplica menciones, califica el sentimiento y genera un resumen diario unificado. Costo total: $0.020 por marca por día.
Requisitos previos
- Python 3.8+
- solicita biblioteca
- Una clave API de Scavio de scavio.dev
- Nombres de marcas y competidores
Guia paso a paso
Paso 1: Consulta todas las plataformas en busca de menciones de marca
Busque su marca en Google, Reddit, TikTok y YouTube de una sola vez.
import os, requests, json
from datetime import datetime
from collections import Counter
API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}
TH = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}
BRAND = 'Scavio'
def search_platform(query, platform=None):
body = {'query': query, 'country_code': 'us'}
if platform:
body['platform'] = platform
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json=body).json()
return [{'title': r.get('title', ''), 'link': r.get('link', ''),
'snippet': r.get('snippet', ''), 'platform': platform or 'google'}
for r in data.get('organic_results', [])]
def search_tiktok(query):
data = requests.post('https://api.scavio.dev/api/v1/tiktok/search/videos',
headers=TH, json={'query': query}).json()
videos = data.get('videos', data.get('data', {}).get('videos', []))
return [{'title': v.get('desc', '')[:80], 'link': f'tiktok.com/@{v.get("author", {}).get("uniqueId", "")}',
'snippet': v.get('desc', ''), 'platform': 'tiktok',
'plays': v.get('stats', {}).get('playCount', 0)} for v in videos]
all_mentions = []
for platform in [None, 'reddit', 'youtube']:
mentions = search_platform(BRAND, platform)
all_mentions.extend(mentions)
print(f'{platform or "google":10}: {len(mentions)} mentions')
tiktok_mentions = search_tiktok(BRAND)
all_mentions.extend(tiktok_mentions)
print(f'{"tiktok":10}: {len(tiktok_mentions)} mentions')
print(f'\nTotal: {len(all_mentions)} mentions. Cost: $0.020')Paso 2: Puntuación de sentimiento y alcance por plataforma
Clasifique el sentimiento de mención y estime el alcance en todas las plataformas.
POSITIVE = ['best', 'great', 'love', 'recommend', 'amazing', 'excellent', 'perfect']
NEGATIVE = ['worst', 'terrible', 'avoid', 'hate', 'broken', 'expensive', 'scam']
def score_mention(mention):
text = f'{mention["title"]} {mention["snippet"]}'.lower()
pos = sum(1 for w in POSITIVE if w in text)
neg = sum(1 for w in NEGATIVE if w in text)
if pos > neg: return 'positive'
if neg > pos: return 'negative'
return 'neutral'
def platform_report(mentions):
by_platform = {}
for m in mentions:
p = m['platform']
if p not in by_platform:
by_platform[p] = []
by_platform[p].append(m)
print(f'\n=== Cross-Platform Brand Report - {BRAND} ===')
for platform, items in by_platform.items():
sentiments = Counter(score_mention(m) for m in items)
print(f'\n [{platform.upper()}] {len(items)} mentions')
print(f' Positive: {sentiments["positive"]} | Neutral: {sentiments["neutral"]} | Negative: {sentiments["negative"]}')
for item in items[:2]:
print(f' - {item["title"][:55]}')
platform_report(all_mentions)Paso 3: Generar resumen diario unificado
Recopile todos los datos de la plataforma en un único informe procesable.
def daily_digest(mentions):
total = len(mentions)
sentiments = Counter(score_mention(m) for m in mentions)
platforms = Counter(m['platform'] for m in mentions)
print(f'\n=== Daily Brand Digest - {datetime.now().strftime("%Y-%m-%d")} ===')
print(f' Brand: {BRAND}')
print(f' Total mentions: {total}')
print(f' Sentiment: +{sentiments["positive"]} neutral:{sentiments["neutral"]} -{sentiments["negative"]}')
print(f' Platforms: {", ".join(f"{p}({c})" for p, c in platforms.most_common())}')
# Highlight negative mentions that need attention
negative = [m for m in mentions if score_mention(m) == 'negative']
if negative:
print(f'\n NEEDS ATTENTION ({len(negative)} negative mentions):')
for m in negative[:3]:
print(f' [{m["platform"]}] {m["title"][:50]}')
print(f' {m["link"][:60]}')
# Highlight high-reach mentions
tiktok_high = [m for m in mentions if m.get('plays', 0) > 10000]
if tiktok_high:
print(f'\n HIGH REACH TikTok ({len(tiktok_high)} videos >10K plays):')
for m in tiktok_high[:3]:
print(f' {m["plays"]:,} plays: {m["title"][:40]}')
print(f'\n Daily cost: $0.020 (4 platform searches)')
daily_digest(all_mentions)Ejemplo en Python
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
TH = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}', 'Content-Type': 'application/json'}
brand = 'Scavio'
for p in [None, 'reddit', 'youtube']:
body = {'query': brand, 'country_code': 'us'}
if p: body['platform'] = p
data = requests.post('https://api.scavio.dev/api/v1/search', headers=SH, json=body).json()
print(f'{p or "google"}: {len(data.get("organic_results", []))} mentions')
tt = requests.post('https://api.scavio.dev/api/v1/tiktok/search/videos', headers=TH, json={'query': brand}).json()
print(f'tiktok: {len(tt.get("videos", []))} mentions')
print('Cost: $0.020')Ejemplo en JavaScript
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
for (const p of [null, 'reddit', 'youtube']) {
const body = { query: 'Scavio', country_code: 'us' };
if (p) body.platform = p;
const data = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: SH, body: JSON.stringify(body)
}).then(r => r.json());
console.log(`${p || 'google'}: ${(data.organic_results || []).length} mentions`);
}Salida esperada
google : 8 mentions
reddit : 5 mentions
youtube : 4 mentions
tiktok : 6 mentions
Total: 23 mentions. Cost: $0.020
=== Daily Brand Digest - 2026-05-20 ===
Brand: Scavio
Total mentions: 23
Sentiment: +12 neutral:9 -2
Platforms: google(8), tiktok(6), reddit(5), youtube(4)
NEEDS ATTENTION (2 negative mentions):
[reddit] Scavio API returning 429 errors today
Daily cost: $0.020 (4 platform searches)