ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Track Brand Citations Across ChatGPT, Perplexity, Gemini
Tutorial

How to Track Brand Citations Across ChatGPT, Perplexity, Gemini

Daily citation tracking across AI engines. AI Overviews, Perplexity citations, ChatGPT browsing — same pattern, one search API.

Get Free API KeyAPI Docs

AI search visibility tools track citations in ChatGPT, Perplexity, and Google AI Mode. This tutorial walks the DIY layer that pairs with any tracker — daily citation pulls into DuckDB for delta tracking.

Prerequisites

  • Python 3.10+
  • Scavio API key
  • DuckDB

Walkthrough

Step 1: Define brand keyword set

10-30 brand and category keywords.

Python
KEYWORDS = ['scavio', 'best mcp search server', 'tavily alternative', 'search api for ai agents']

Step 2: AI Overviews citations via Scavio

include_ai_overview surfaces the citation list.

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

def ai_overview(q):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'query': q, 'include_ai_overview': True}).json()
    return (r.get('ai_overview') or {}).get('citations', [])

Step 3: Reddit thread tracking

Reddit citations precede AI Overview citations.

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

Step 4: Persist into DuckDB

One row per (keyword, surface, citation, date).

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

for k in KEYWORDS:
    today = datetime.date.today()
    for c in ai_overview(k):
        db.execute('INSERT INTO citations VALUES (?, ?, ?, ?)', (k, 'ai_overview', c, today))
    for p in reddit_mentions(k):
        db.execute('INSERT INTO citations VALUES (?, ?, ?, ?)', (k, 'reddit', p['url'], today))

Step 5: Friday delta query

What's new vs last Friday?

Python
delta = db.execute('''
  SELECT keyword, surface, url
  FROM citations
  WHERE date >= current_date - INTERVAL 7 days
  AND url NOT IN (SELECT url FROM citations WHERE date < current_date - INTERVAL 7 days)
''').fetchall()

Python Example

Python
# See steps above. Daily run: 30 keywords × 2 calls = 60 credits = $0.26 on Project tier.

JavaScript Example

JavaScript
// Same pattern in TS with duckdb-async.

Expected Output

JSON
Daily citation log per surface. Friday delta email with new and lost citations per keyword.

Related Tutorials

  • How to Track AI Citations vs. SEO Rankings
  • How to Track Whether Your SaaS Shows Up in AI Search

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

Use Case

Automated LLM Visibility Tracking

Read more
Use Case

AI Overview Citation Tracking

Read more
Best Of

Best GEO/AI Visibility Tracking Tools in 2026

Read more
Workflow

AI Overview Citation Trust Check Workflow

Read more
Glossary

AI Search Visibility

Read more
Glossary

AI Overview Citation Tracking

Read more

Start Building

Daily citation tracking across AI engines. AI Overviews, Perplexity citations, ChatGPT browsing — same pattern, one search API.

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