Tutorial

How to Monitor Google AI Agent Brand Mentions

Track when your brand appears in Google AI Overview citations. Daily monitoring, alerting, and historical tracking with Python and Scavio API.

Track your brand's presence in Google AI Overview citations by running daily search queries for your target keywords and parsing the ai_overview field for brand mentions. Google's AI Overview now appears on 30-40% of informational queries, and citation placement drives significant traffic. Brands that monitor their AI Overview presence can detect drops early, identify new citation opportunities, and measure the impact of AEO optimization. This tutorial builds a daily tracker that stores citation history and alerts on changes.

Prerequisites

  • Python 3.8+ installed
  • requests library installed
  • A Scavio API key from scavio.dev
  • A list of target keywords where you expect AI Overview citations

Walkthrough

Step 1: Set up monitoring queries

Define the brand name, domain, and target keywords to check for AI Overview citations.

Python
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'

Step 2: Search with AI Overview parsing

Query each keyword through Scavio and check whether the AI Overview mentions your brand or links to your domain.

Python
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))

Step 3: Parse citations for detail

Extract citation URLs and titles from the AI Overview to understand which competitors also appear.

Python
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')}")

Step 4: Track daily and store history

Run all queries, record results, and compare against previous days to detect changes.

Python
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)

Step 5: Alert on changes

Compare today's scan with the previous day and alert when citations are gained or lost.

Python
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()

Python Example

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'))

JavaScript Example

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);

Expected Output

JSON
A daily monitoring system that tracks brand presence in Google AI Overview citations, stores history, and alerts when citations are gained or lost.

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.

Python 3.8+ installed. requests library installed. A Scavio API key from scavio.dev. A list of target keywords where you expect AI Overview citations. 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 when your brand appears in Google AI Overview citations. Daily monitoring, alerting, and historical tracking with Python and Scavio API.