Tutorial

How to Monitor AI Overview Citations via API

Track which pages get cited in Google AI Overviews. Python and JavaScript examples using Scavio API for AEO/GEO monitoring.

Monitor AI Overview citations by querying Google SERP with include_ai_overview enabled at $0.005/query. Track which of your pages get cited, which competitor pages appear, and when citation patterns change.

Prerequisites

  • Scavio API key
  • List of target keywords to monitor
  • Python 3.8+ or Node.js 18+

Walkthrough

Step 1: Check a keyword for AI Overview

Search with include_ai_overview to get citation data.

Python
import requests, os

H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

resp = requests.post('https://api.scavio.dev/api/v1/search',
    headers=H,
    json={'query': 'best project management tools 2026',
          'country_code': 'us', 'include_ai_overview': True})

data = resp.json()
aio = data.get('ai_overview', {})
if aio:
    print('AI Overview present')
    for source in aio.get('sources', []):
        print(f"  Cited: {source.get('domain', 'unknown')} - {source.get('title', '')}")
else:
    print('No AI Overview for this query')

Step 2: Track your domain citations

Filter citations to find your own domain.

Python
my_domain = 'mysite.com'
my_citations = [s for s in aio.get('sources', [])
    if my_domain in s.get('domain', '')]
competitor_citations = [s for s in aio.get('sources', [])
    if my_domain not in s.get('domain', '')]

print(f'My citations: {len(my_citations)}')
print(f'Competitor citations: {len(competitor_citations)}')

Python Example

Python
import requests, os, json
from datetime import date

H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

def monitor_aio(keywords, my_domain):
    report = {'date': date.today().isoformat(), 'keywords': []}
    for kw in keywords:
        data = requests.post('https://api.scavio.dev/api/v1/search',
            headers=H,
            json={'query': kw, 'country_code': 'us',
                  'include_ai_overview': True}).json()
        aio = data.get('ai_overview') or {}
        sources = aio.get('sources', [])
        report['keywords'].append({
            'keyword': kw,
            'has_aio': bool(aio),
            'my_citations': [s for s in sources if my_domain in s.get('domain', '')],
            'competitor_citations': [s['domain'] for s in sources if my_domain not in s.get('domain', '')],
        })
    cited = sum(1 for k in report['keywords'] if k['my_citations'])
    print(f"Cited in {cited}/{len(keywords)} AI Overviews")
    return report

report = monitor_aio(['best crm 2026', 'crm comparison'], 'mysite.com')

JavaScript Example

JavaScript
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function monitorAIO(keywords, myDomain) {
  const report = [];
  for (const kw of keywords) {
    const r = await fetch('https://api.scavio.dev/api/v1/search', {
      method: 'POST', headers: H,
      body: JSON.stringify({query: kw, country_code: 'us', include_ai_overview: true})
    }).then(r => r.json());
    const aio = r.ai_overview || {};
    const sources = aio.sources || [];
    report.push({
      keyword: kw, hasAIO: !!r.ai_overview,
      myCitations: sources.filter(s => (s.domain || '').includes(myDomain)),
      competitors: sources.filter(s => !(s.domain || '').includes(myDomain)).map(s => s.domain),
    });
  }
  const cited = report.filter(r => r.myCitations.length > 0).length;
  console.log(`Cited in ${cited}/${keywords.length} AI Overviews`);
  return report;
}
monitorAIO(['best crm 2026'], 'mysite.com');

Expected Output

JSON
Daily AI Overview monitoring report showing which keywords trigger AIOs and which domains (yours and competitors) get cited.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Scavio API key. List of target keywords to monitor. Python 3.8+ or Node.js 18+. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Track which pages get cited in Google AI Overviews. Python and JavaScript examples using Scavio API for AEO/GEO monitoring.