Tutorial

How to Track Whether Your SaaS Shows Up in AI Search

Daily snapshot of SaaS visibility across SERP, AI Overviews, ChatGPT prompt studies, and Reddit. Self-hosted, $30/mo, full control.

Founders ask the same Reddit question every week: 'how do I track whether my SaaS shows up in AI search results?' This tutorial wires Scavio plus a weekly prompt-study script into a self-hosted AEO monitor that costs $30/mo total.

Prerequisites

  • Python 3.10+
  • Scavio API key
  • Anthropic API key for Claude prompt studies
  • DuckDB

Walkthrough

Step 1: Define brand keyword set

10 to 30 brand and category queries in YAML.

# keywords.yaml
brand: scavio
keywords:
  - scavio review
  - best ai search api 2026
  - tavily alternative

Step 2: Daily SERP plus AI Overviews

One Scavio call per keyword.

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

def snap(q):
    r = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': q, 'include_ai_overview': True})
    return r.json()

Step 3: Reddit brand mentions

Daily Reddit scan for the brand keyword.

Python
def reddit(brand):
    r = requests.post('https://api.scavio.dev/api/v1/reddit/search',
        headers={'x-api-key': API_KEY},
        json={'query': brand})
    return r.json().get('posts', [])

Step 4: Weekly ChatGPT prompt study

Run the same prompt set against ChatGPT.

Python
import openai
client = openai.OpenAI()
def chatgpt_says(prompt):
    r = client.chat.completions.create(model='gpt-5', messages=[{'role':'user','content':prompt}])
    return r.choices[0].message.content

Step 5: Store deltas

DuckDB row per (keyword, surface, url, date).

Python
import duckdb
db = duckdb.connect('aeo.duckdb')
db.execute('CREATE TABLE IF NOT EXISTS aeo(brand TEXT, surface TEXT, url TEXT, date DATE)')

Python Example

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

def snapshot(brand, keyword):
    serp = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': keyword, 'include_ai_overview': True}).json()
    rdt = requests.post('https://api.scavio.dev/api/v1/reddit/search',
        headers={'x-api-key': API_KEY},
        json={'query': brand}).json()
    return {'date': str(datetime.date.today()), 'ao': serp.get('ai_overview'), 'reddit': rdt.get('posts',[])[:5]}

print(snapshot('scavio', 'best ai search api 2026'))

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function snapshot(brand, keyword) {
  const headers = { 'x-api-key': API_KEY, 'Content-Type': 'application/json' };
  const [serp, rdt] = await Promise.all([
    fetch('https://api.scavio.dev/api/v1/google', { method:'POST', headers, body: JSON.stringify({ query: keyword, include_ai_overview: true }) }).then(r => r.json()),
    fetch('https://api.scavio.dev/api/v1/reddit/search', { method:'POST', headers, body: JSON.stringify({ query: brand }) }).then(r => r.json())
  ]);
  return { serp, rdt };
}

Expected Output

JSON
Daily snapshot per keyword across SERP, AI Overviews, and Reddit. Weekly ChatGPT prompt study runs against the same set. DuckDB stores deltas; weekly digest emails new and lost citations.

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. Anthropic API key for Claude prompt studies. DuckDB. 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

Daily snapshot of SaaS visibility across SERP, AI Overviews, ChatGPT prompt studies, and Reddit. Self-hosted, $30/mo, full control.