Realice un seguimiento de la presencia de su marca en las citas de Google AI Overview ejecutando consultas de búsqueda diarias para sus palabras clave objetivo y analizando el campo ai_overview para menciones de marca. La descripción general de IA de Google ahora aparece en el 30-40% de las consultas informativas y la ubicación de las citas genera un tráfico significativo. Las marcas que monitorean su presencia de AI pueden detectar caídas tempranas, identificar nuevas oportunidades de citación y medir el impacto de la optimización AEO. Este tutorial crea un rastreador diario que almacena el historial de citas y alertas sobre cambios.
Requisitos previos
- Python 3.8+ instalado
- solicita biblioteca instalada
- Una clave API de Scavio de scavio.dev
- Una lista de palabras clave objetivo donde espera citas de descripción general de AI
Guia paso a paso
Paso 1: Configurar consultas de seguimiento
Defina el nombre de la marca, el dominio y las palabras clave de destino para buscar citas en AI Overview.
import os, requests, json, datetime
API_KEY = os.environ['SCAVIO_API_KEY']
BRAND = 'YourBrand'
DOMAIN = 'yourbrand.com'
TARGET_KEYWORDS = [
'best project management tool 2026',
'project management software comparison',
'how to manage remote teams',
'team collaboration tools',
'agile project tracking',
]
HISTORY_FILE = 'ai_overview_mentions.json'Paso 2: Búsqueda con análisis de descripción general de IA
Consulta cada palabra clave a través de Scavio y comprueba si la descripción general de IA menciona tu marca o enlaza a tu dominio.
def check_ai_overview(query: str) -> dict:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'platform': 'google', 'query': query}, timeout=15)
data = resp.json()
ai_overview = data.get('ai_overview', {})
overview_text = ai_overview.get('text', '') if isinstance(ai_overview, dict) else str(ai_overview)
citations = ai_overview.get('citations', []) if isinstance(ai_overview, dict) else []
brand_in_text = BRAND.lower() in overview_text.lower()
domain_in_citations = any(DOMAIN in str(c) for c in citations)
return {
'query': query,
'has_ai_overview': bool(overview_text),
'brand_mentioned': brand_in_text,
'domain_cited': domain_in_citations,
'citation_count': len(citations),
}
result = check_ai_overview(TARGET_KEYWORDS[0])
print(json.dumps(result, indent=2))Paso 3: Analizar las citas para obtener más detalles
Extraiga las URL de citas y los títulos de la descripción general de IA para comprender qué competidores también aparecen.
def parse_citations(query: str) -> list:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'platform': 'google', 'query': query}, timeout=15)
data = resp.json()
ai_overview = data.get('ai_overview', {})
citations = ai_overview.get('citations', []) if isinstance(ai_overview, dict) else []
parsed = []
for c in citations:
if isinstance(c, dict):
parsed.append({'title': c.get('title', ''), 'url': c.get('url', c.get('link', ''))})
elif isinstance(c, str):
parsed.append({'url': c})
return parsed
citations = parse_citations('best project management tool 2026')
for c in citations:
is_ours = DOMAIN in c.get('url', '')
print(f"{'[OURS]' if is_ours else ' '} {c.get('url', 'N/A')}")Paso 4: Seguimiento diario y del historial de la tienda
Ejecute todas las consultas, registre los resultados y compárelos con días anteriores para detectar cambios.
def daily_scan(keywords: list) -> dict:
today = datetime.date.today().isoformat()
scan = {'date': today, 'results': []}
for kw in keywords:
result = check_ai_overview(kw)
result['citations'] = parse_citations(kw)
scan['results'].append(result)
mentioned = sum(1 for r in scan['results'] if r['brand_mentioned'] or r.get('domain_cited'))
scan['summary'] = {'total': len(keywords), 'mentioned': mentioned}
history = []
try:
with open(HISTORY_FILE) as f:
history = json.load(f)
except FileNotFoundError:
pass
history.append(scan)
with open(HISTORY_FILE, 'w') as f:
json.dump(history, f, indent=2)
print(f'{today}: Brand mentioned in {mentioned}/{len(keywords)} AI Overviews')
return scan
daily_scan(TARGET_KEYWORDS)Paso 5: Alerta sobre cambios
Compare el análisis de hoy con el del día anterior y avise cuando se obtengan o pierdan citas.
def detect_changes() -> list:
try:
with open(HISTORY_FILE) as f:
history = json.load(f)
except FileNotFoundError:
return []
if len(history) < 2:
return []
prev = {r['query']: r for r in history[-2]['results']}
curr = {r['query']: r for r in history[-1]['results']}
alerts = []
for query in curr:
was_cited = prev.get(query, {}).get('brand_mentioned', False) or prev.get(query, {}).get('domain_cited', False)
is_cited = curr[query].get('brand_mentioned', False) or curr[query].get('domain_cited', False)
if was_cited and not is_cited:
alerts.append({'query': query, 'change': 'LOST', 'action': 'investigate'})
elif not was_cited and is_cited:
alerts.append({'query': query, 'change': 'GAINED', 'action': 'celebrate'})
for a in alerts:
print(f"[{a['change']}] {a['query']}")
return alerts
detect_changes()Ejemplo en Python
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def check_brand_in_ai_overview(query, brand):
data = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': 'google', 'query': query}).json()
ai = data.get('ai_overview', {})
text = ai.get('text', '') if isinstance(ai, dict) else ''
return {'query': query, 'mentioned': brand.lower() in text.lower()}
print(check_brand_in_ai_overview('best crm 2026', 'HubSpot'))Ejemplo en JavaScript
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function checkBrand(query, brand) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: H, body: JSON.stringify({platform: 'google', query})
});
const ai = (await r.json()).ai_overview || {};
const text = ai.text || '';
return {query, mentioned: text.toLowerCase().includes(brand.toLowerCase())};
}
checkBrand('best crm 2026', 'HubSpot').then(console.log);Salida esperada
A daily monitoring system that tracks brand presence in Google AI Overview citations, stores history, and alerts when citations are gained or lost.