Local agencies productize AEO audits as a one-time deliverable per client. This tutorial walks the audit pipeline: SERP visibility, Reddit mentions, AI Overview citations, all rendered into a markdown report.
Prerequisites
- Python 3.10+
- Scavio API key
- Markdown-to-PDF tool (optional)
Walkthrough
Step 1: Take business inputs
Name, website domain, primary service category.
BIZ = {'name': 'Smile Dental', 'domain': 'smiledentalaustin.com', 'category': 'dentist Austin TX'}Step 2: Branded query SERP + AI Overviews
Score business presence.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def branded(biz):
return requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': biz['name'], 'include_ai_overview': True}).json()Step 3: Category query — AI Overview citations
Are they cited when buyers ask the category question?
def category(biz):
return requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'best {biz["category"]}', 'include_ai_overview': True}).json()Step 4: Reddit signal
Recommendations + complaints in local subs.
def reddit(biz):
return requests.post('https://api.scavio.dev/api/v1/reddit/search',
headers={'x-api-key': API_KEY}, json={'query': biz['name']}).json()Step 5: Score 0-100 + render markdown report
Reusable client deliverable.
def report(biz):
b = branded(biz); c = category(biz); r = reddit(biz)
domain = biz['domain']
branded_score = sum(20 for o in b.get('organic_results', [])[:5] if domain in o.get('link','')) + (50 if domain in (b.get('ai_overview') or {}).get('citations',[]) else 0)
cited = domain in (c.get('ai_overview') or {}).get('citations',[])
return {'branded_score': branded_score, 'category_cited': cited, 'reddit_threads': len(r.get('posts',[]))}Python Example
# Per-business audit: 3 Scavio calls = $0.013. Sell at $99-499 per audit; margin is essentially the whole price.JavaScript Example
// Same pattern in TS.Expected Output
Per-business markdown report with branded SERP visibility score, category citation status, Reddit signal count, and 5 specific recommendations.