ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Run a GEO/AEO Audit with a Search API
Tutorial

How to Run a GEO/AEO Audit with a Search API

Audit 20 brand keywords for AI Overview presence, score your GEO visibility, and generate an optimization report. Python at $0.005/keyword.

Get Free API KeyAPI Docs

A GEO/AEO audit checks how visible your brand is in Google AI Overviews across your target keywords. This audit queries 20 brand keywords, checks for AI Overview presence and brand citations, calculates a GEO visibility score, and generates an actionable report. The entire audit costs $0.10 (20 queries at $0.005 each).

Prerequisites

  • Python 3.8+
  • requests library
  • A Scavio API key from scavio.dev
  • 20 target keywords for your brand

Walkthrough

Step 1: Define audit keywords and brand terms

Set up the audit configuration with your target keywords.

Python
import os, requests, json
from datetime import datetime

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

BRAND = 'scavio'
BRAND_TERMS = ['scavio', 'scavio.dev', 'scavio api']
AUDIT_KEYWORDS = [
    'best serp api', 'search api for developers', 'google search api python',
    'web scraping api alternative', 'ai agent search tool', 'mcp search server',
    'serp api pricing', 'multi platform search api', 'reddit data api',
    'tiktok analytics api', 'amazon product search api', 'youtube search api',
    'search api comparison 2026', 'best api for ai agents', 'serp data provider',
    'google results api', 'search api latency', 'web data api for startups',
    'search api free tier', 'search api mcp integration'
]
print(f'GEO/AEO Audit for "{BRAND}" across {len(AUDIT_KEYWORDS)} keywords')
print(f'Estimated cost: ${len(AUDIT_KEYWORDS) * 0.005:.2f}')

Step 2: Run the audit checks

Query each keyword with AI Overview enabled and check for brand citations.

Python
def audit_keyword(keyword, brand_terms):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': keyword, 'country_code': 'us',
                          'include_ai_overview': True}).json()
    ao = data.get('ai_overview', {})
    ao_text = json.dumps(ao).lower() if ao else ''
    cited = any(b.lower() in ao_text for b in brand_terms)
    organic = data.get('organic_results', [])
    position = next((r['position'] for r in organic
        if any(b in r.get('link', '').lower() for b in brand_terms)), None)
    has_fs = bool(data.get('answer_box'))
    paa = len(data.get('related_questions', []))
    return {
        'keyword': keyword, 'has_ao': bool(ao), 'brand_cited': cited,
        'organic_position': position, 'has_featured_snippet': has_fs,
        'paa_count': paa
    }

results = []
for kw in AUDIT_KEYWORDS:
    r = audit_keyword(kw, BRAND_TERMS)
    results.append(r)
    status = 'CITED' if r['brand_cited'] else 'AO' if r['has_ao'] else '---'
    pos = f'#{r["organic_position"]}' if r['organic_position'] else '-'
    print(f'  [{status:6}] {kw:35} | Organic: {pos:4} | PAA: {r["paa_count"]}')

Step 3: Calculate GEO visibility score

Aggregate results into a single GEO visibility score.

Python
def calculate_geo_score(results):
    total = len(results)
    ao_present = sum(1 for r in results if r['has_ao'])
    brand_cited = sum(1 for r in results if r['brand_cited'])
    top_10 = sum(1 for r in results if r['organic_position'] and r['organic_position'] <= 10)
    top_3 = sum(1 for r in results if r['organic_position'] and r['organic_position'] <= 3)
    # Weighted score (0-100)
    score = (
        (brand_cited / total * 40) +  # 40% weight: AO citations
        (top_3 / total * 25) +         # 25% weight: top 3 rankings
        (top_10 / total * 20) +        # 20% weight: top 10 rankings
        (ao_present / total * 15)      # 15% weight: AO keyword coverage
    ) * 100 / 100
    return {
        'score': round(score, 1),
        'ao_presence_rate': round(ao_present / total * 100, 1),
        'citation_rate': round(brand_cited / total * 100, 1),
        'top_3_rate': round(top_3 / total * 100, 1),
        'top_10_rate': round(top_10 / total * 100, 1),
        'total_keywords': total
    }

scores = calculate_geo_score(results)
print(f'\nGEO Visibility Score: {scores["score"]}/100')
for k, v in scores.items():
    if k != 'score':
        print(f'  {k}: {v}')

Step 4: Generate the audit report

Produce a full audit report with recommendations.

Python
def geo_audit_report(results, scores):
    print(f'\n{"=" * 60}')
    print(f'GEO/AEO Audit Report - {datetime.now().strftime("%Y-%m-%d")}')
    print(f'Brand: {BRAND} | Keywords: {scores["total_keywords"]}')
    print(f'{"=" * 60}')
    print(f'\nOverall Score: {scores["score"]}/100')
    if scores['score'] >= 70: grade = 'STRONG'
    elif scores['score'] >= 40: grade = 'MODERATE'
    else: grade = 'NEEDS WORK'
    print(f'Grade: {grade}')
    print(f'\nMetrics:')
    print(f'  AI Overview presence: {scores["ao_presence_rate"]}%')
    print(f'  Brand cited in AO: {scores["citation_rate"]}%')
    print(f'  Top 3 organic: {scores["top_3_rate"]}%')
    print(f'  Top 10 organic: {scores["top_10_rate"]}%')
    # Opportunities
    uncited_ao = [r for r in results if r['has_ao'] and not r['brand_cited']]
    print(f'\nOpportunities ({len(uncited_ao)} keywords with AO but no brand citation):')
    for r in uncited_ao[:5]:
        print(f'  - {r["keyword"]} (organic #{r["organic_position"] or "not ranked"})')
    print(f'\nAudit cost: ${len(results) * 0.005:.2f}')

geo_audit_report(results, scores)

Python Example

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

def audit(keywords, brand):
    cited = ao = 0
    for kw in keywords:
        data = requests.post('https://api.scavio.dev/api/v1/search',
            headers=SH, json={'query': kw, 'country_code': 'us', 'include_ai_overview': True}).json()
        has_ao = bool(data.get('ai_overview'))
        is_cited = brand in json.dumps(data.get('ai_overview', {})).lower() if has_ao else False
        if has_ao: ao += 1
        if is_cited: cited += 1
        print(f'  {kw[:35]:35} | AO: {has_ao} | Cited: {is_cited}')
    print(f'\nAO rate: {ao}/{len(keywords)}, Citation rate: {cited}/{len(keywords)}. Cost: ${len(keywords)*0.005:.2f}')

audit(['best serp api', 'search api python'], 'scavio')

JavaScript Example

JavaScript
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
async function audit(keywords, brand) {
  let ao = 0, cited = 0;
  for (const kw of keywords) {
    const data = await fetch('https://api.scavio.dev/api/v1/search', {
      method: 'POST', headers: SH,
      body: JSON.stringify({ query: kw, country_code: 'us', include_ai_overview: true })
    }).then(r => r.json());
    const hasAO = !!data.ai_overview;
    const isCited = hasAO && JSON.stringify(data.ai_overview).toLowerCase().includes(brand);
    if (hasAO) ao++; if (isCited) cited++;
    console.log(`  ${kw.padEnd(35)} | AO: ${hasAO} | Cited: ${isCited}`);
  }
  console.log(`AO: ${ao}/${keywords.length}, Cited: ${cited}/${keywords.length}`);
}
audit(['best serp api', 'search api python'], 'scavio').catch(console.error);

Expected Output

JSON
GEO/AEO Audit for "scavio" across 20 keywords
Estimated cost: $0.10

  [CITED ] best serp api                     | Organic: #4   | PAA: 4
  [AO    ] search api for developers          | Organic: #6   | PAA: 3
  [---   ] google search api python           | Organic: #11  | PAA: 5

GEO Visibility Score: 48.5/100
Grade: MODERATE

Metrics:
  AI Overview presence: 75.0%
  Brand cited in AO: 25.0%
  Top 3 organic: 15.0%
  Top 10 organic: 55.0%

Opportunities (10 keywords with AO but no brand citation):
  - search api for developers (organic #6)
  - web scraping api alternative (organic #12)

Audit cost: $0.10

Related Tutorials

  • How to Track GEO Visibility with a Search API
  • How to Monitor Brand Mentions in AI Overviews
  • How to Build a Page Optimized for AI Model Citation

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+. requests library. A Scavio API key from scavio.dev. 20 target keywords for your brand. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, 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.

Related Resources

Glossary

Search API Provider Landscape (2026)

Read more
Best Of

Best API for GEO Audit Tools in 2026

Read more
Best Of

Best APIs That Return AI Overview Data in 2026

Read more
Use Case

Search API Legal Audit

Read more
Glossary

Free Search API Tier Comparison

Read more
Solution

Migrate from Brave Search API to Scavio for Better Coverage

Read more

Start Building

Audit 20 brand keywords for AI Overview presence, score your GEO visibility, and generate an optimization report. Python at $0.005/keyword.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy