Suivez la présence de votre marque dans les citations Google AI Overview en effectuant des recherches quotidiennes sur vos mots-clés cibles et en analysant le champ ai_overview pour les mentions de marque. L'AI Overview de Google apparaît désormais sur 30 à 40 % des requêtes informatives, et le placement de citations génère un trafic important. Les marques qui surveillent leur présence dans AI Overview peuvent détecter rapidement les baisses, identifier de nouvelles opportunités de citations et mesurer l'impact de l'optimisation AEO. Ce tutoriel construit un suivi quotidien qui stocke l'historique des citations et alerte en cas de changements.
Prérequis
- Python 3.8+ installé
- bibliothèque requests installée
- Une clé API Scavio depuis scavio.dev
- Une liste de mots-clés cibles pour lesquels vous attendez des citations AI Overview
Parcours
Étape 1: Configurer les requêtes de surveillance
Définissez le nom de la marque, le domaine et les mots-clés cibles à vérifier pour les citations 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'Étape 2: Rechercher avec analyse AI Overview
Interrogez chaque mot-clé via Scavio et vérifiez si l'AI Overview mentionne votre marque ou renvoie vers votre domaine.
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))Étape 3: Analyser les citations en détail
Extrayez les URL et les titres des citations de l'AI Overview pour comprendre quels concurrents apparaissent également.
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')}")Étape 4: Suivi quotidien et stockage de l'historique
Exécutez toutes les requêtes, enregistrez les résultats et comparez-les aux jours précédents pour détecter les changements.
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)Étape 5: Alerter en cas de changements
Comparez l'analyse d'aujourd'hui avec celle de la veille et alertez lorsque des citations sont gagnées ou perdues.
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()Exemple 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'))Exemple 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);Sortie attendue
A daily monitoring system that tracks brand presence in Google AI Overview citations, stores history, and alerts when citations are gained or lost.