Tutorial

How to Build an AEO Audit Pipeline for Local Businesses

Per-business AEO audit pipeline. Scores 0-100 on AI search visibility, generates a personalized report, ready for client delivery.

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.

Python
BIZ = {'name': 'Smile Dental', 'domain': 'smiledentalaustin.com', 'category': 'dentist Austin TX'}

Step 2: Branded query SERP + AI Overviews

Score business presence.

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

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

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

Python
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

Python
# Per-business audit: 3 Scavio calls = $0.013. Sell at $99-499 per audit; margin is essentially the whole price.

JavaScript Example

JavaScript
// Same pattern in TS.

Expected Output

JSON
Per-business markdown report with branded SERP visibility score, category citation status, Reddit signal count, and 5 specific recommendations.

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.10+. Scavio API key. Markdown-to-PDF tool (optional). A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 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

Per-business AEO audit pipeline. Scores 0-100 on AI search visibility, generates a personalized report, ready for client delivery.