ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build a GEO Audit Tool
Tutorial

How to Build a GEO Audit Tool

Build a GEO audit tool that scores your site's generative engine visibility across ChatGPT, Perplexity, and Gemini using Scavio.

Get Free API KeyAPI Docs

GEO (Generative Engine Optimization) is the 2026 rebrand of SEO for AI answer engines. A GEO audit tool checks presence, citation share, and content structure across ChatGPT, Perplexity, and Gemini. This tutorial builds a simple scoring audit backed by Scavio.

Prerequisites

  • Python 3.10+
  • A Scavio API key
  • A query panel (20-50 target queries)
  • Your domain

Walkthrough

Step 1: Run each query across engines

ChatGPT, Perplexity, Gemini (AI Overview) coverage.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def run(query):
    engines = ['chatgpt', 'perplexity']
    out = {}
    for e in engines:
        r = requests.post('https://api.scavio.dev/api/v1/search',
            headers={'x-api-key': API_KEY},
            json={'platform': e, 'query': query})
        out[e] = r.json()
    ov = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'query': query, 'include': ['ai_overview']}).json().get('ai_overview')
    out['gemini_overview'] = ov
    return out

Step 2: Score citation presence per engine

1 point per engine where your domain is cited.

Python
def score_query(resp, domain):
    score = 0
    for e, r in resp.items():
        srcs = r.get('citations', []) + r.get('sources', []) if isinstance(r, dict) else []
        if any(domain in s.get('url', '') for s in srcs):
            score += 1
    return score

Step 3: Audit content structure

Check your pages have FAQ schema, clear headings, and short paragraphs.

Python
def structure_check(url):
    html = requests.get(url).text
    return {
        'has_faq_schema': 'FAQPage' in html,
        'headings': html.count('<h2'),
        'paragraphs': html.count('<p')
    }

Step 4: Compute overall GEO score

Weighted average of presence + structure.

Python
def geo_score(presence_score, structure):
    return 0.7 * presence_score + 0.3 * min(structure['headings'] / 5, 1)

Step 5: Generate an action list

Flag queries where you are absent with suggested content fixes.

Python
def actions(results, domain):
    return [q for q, s in results.items() if s['presence'] == 0]

Python Example

Python
import os, requests

API_KEY = os.environ['SCAVIO_API_KEY']
QUERIES = ['best ai agent framework', 'how to build a rag agent']
DOMAIN = 'scavio.dev'

score = 0
for q in QUERIES:
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'perplexity', 'query': q})
    if any(DOMAIN in s.get('url', '') for s in r.json().get('sources', [])):
        score += 1
print(f'GEO coverage: {score}/{len(QUERIES)}')

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const QUERIES = ['best ai agent framework'];
const DOMAIN = 'scavio.dev';
let score = 0;
for (const q of QUERIES) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ platform: 'perplexity', query: q })
  });
  const d = await r.json();
  if (d.sources?.some(s => s.url.includes(DOMAIN))) score++;
}
console.log(`GEO coverage: ${score}/${QUERIES.length}`);

Expected Output

JSON
Per-query GEO report with score, missing engines, and content structure gaps. Typical first-run score: 15-30% coverage on B2B SaaS, improvable to 60%+ in 90 days.

Related Tutorials

  • How to Build an AEO Dashboard
  • How to Track Gemini AI Overview Citations
  • How to Build an SEO Audit Tool with SERP and Competitor Analysis

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+. A Scavio API key. A query panel (20-50 target queries). Your domain. 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

GEO/AI SEO Convergence

Read more
Best Of

Best API for GEO Audit Tools in 2026

Read more
Best Of

Best GEO Optimization Tools in 2026

Read more
Use Case

SEO Team GEO Audit Automation

Read more
Workflow

Weekly GEO Citation Content Audit Workflow

Read more
Workflow

Weekly GEO Compliance Audit

Read more

Start Building

Build a GEO audit tool that scores your site's generative engine visibility across ChatGPT, Perplexity, and Gemini using Scavio.

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