Gemini AI Overviews replaced featured snippets on 40%+ of Google SERPs by 2026. Citations in the overview are the new rank-1. This tutorial tracks Gemini AI Overview citations for your query panel using Scavio's AI Overview extraction endpoint.
Prerequisites
- Python 3.10+
- A Scavio API key
- A query panel with overview-eligible queries
Walkthrough
Step 1: Identify overview-triggering queries
Informational and comparison queries trigger overviews most.
QUERIES = [
'what is an ai agent',
'how does rag work',
'serpapi vs scavio'
]Step 2: Query Scavio with ai_overview flag
Scavio returns the overview content and citations when present.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def get_overview(query):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': query, 'include': ['ai_overview']})
return r.json().get('ai_overview', {})Step 3: Extract citation URLs
Overview responses include a citations array.
def citations(overview):
return [c['url'] for c in overview.get('citations', [])]Step 4: Track presence vs. absence
Not every query gets an overview. Log both cases.
def track(query):
ov = get_overview(query)
if not ov:
return {'query': query, 'has_overview': False}
return {'query': query, 'has_overview': True, 'citations': citations(ov)}Step 5: Compute your domain's coverage
Percent of overview-eligible queries where you are cited.
def coverage(results, domain):
with_ov = [r for r in results if r['has_overview']]
mine = [r for r in with_ov if any(domain in c for c in r.get('citations', []))]
return len(mine) / len(with_ov) if with_ov else 0Python Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
QUERIES = ['what is an ai agent', 'how does rag work']
results = []
for q in QUERIES:
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': q, 'include': ['ai_overview']})
ov = r.json().get('ai_overview', {})
if ov:
results.append({'query': q, 'citations': [c['url'] for c in ov.get('citations', [])]})
print(results)JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
const QUERIES = ['what is an ai agent', 'how does rag work'];
const results = [];
for (const q of QUERIES) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query: q, include: ['ai_overview'] })
});
const data = await r.json();
if (data.ai_overview) results.push({ query: q, citations: data.ai_overview.citations?.map(c => c.url) });
}
console.log(results);Expected Output
Per-query list of AI Overview citations. Typical B2B SaaS sees 15-30% of target queries trigger overviews, with 3-5 citations each.