ScavioScavio
FeaturesPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Track AI Brand Mentions in ChatGPT
Tutorial

How to Track AI Brand Mentions in ChatGPT

Monitor how often ChatGPT recommends your brand vs competitors. Build a daily tracker with Scavio and deliver the data to a dashboard or Slack.

Get Free API KeyAPI Docs

In 2026, 31% of US internet users run at least one query per day on ChatGPT. When a prospect asks 'what's the best [your category] tool?', the brands ChatGPT names are the new leaderboard. This tutorial walks through building a daily tracker that queries ChatGPT with your target prompts, extracts brand mentions, and logs the data.

Prerequisites

  • Python 3.8+
  • A Scavio API key
  • A list of prompts relevant to your brand (e.g. 'best SERP API 2026')
  • Optional: a Slack webhook URL for alerts

Walkthrough

Step 1: Define the prompts to monitor

Curate 10-20 prompts that capture how prospects describe your category.

Python
PROMPTS = [
    'what is the best SERP API in 2026',
    'top alternatives to SerpAPI',
    'best search API for AI agents',
    'cheapest Google search API',
]

Step 2: Query ChatGPT via Scavio

Scavio's ask_chatgpt endpoint wraps the ChatGPT UI and returns the raw answer.

Python
import requests, os

def ask_chatgpt(prompt):
    r = requests.post('https://api.scavio.dev/api/v1/ask',
        headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
        json={'platform': 'chatgpt', 'prompt': prompt})
    return r.json()['answer']

Step 3: Extract brand mentions

Run a regex across the answer text to count mentions of your brand and competitors.

Python
import re

BRANDS = ['Scavio', 'SerpAPI', 'Serper', 'Tavily', 'Brave', 'Firecrawl']

def extract_mentions(text):
    counts = {}
    for brand in BRANDS:
        counts[brand] = len(re.findall(rf'\b{brand}\b', text, re.IGNORECASE))
    return counts

Step 4: Log daily results

Run the tracker on a schedule and append to a CSV or database.

Python
import csv, datetime

def log(prompt, counts):
    row = {'date': datetime.date.today().isoformat(), 'prompt': prompt, **counts}
    with open('aeo_log.csv', 'a') as f:
        writer = csv.DictWriter(f, fieldnames=row.keys())
        writer.writerow(row)

Step 5: Send Slack alerts on change

Fire a Slack alert when a competitor is newly cited or your brand drops out.

Python
import requests

def alert_slack(message, webhook_url):
    requests.post(webhook_url, json={'text': message})

Python Example

Python
import os, re, requests, csv, datetime

API_KEY = os.environ['SCAVIO_API_KEY']
PROMPTS = ['best SERP API 2026', 'top SerpAPI alternatives']
BRANDS = ['Scavio', 'SerpAPI', 'Serper', 'Tavily']

def ask_chatgpt(prompt):
    r = requests.post('https://api.scavio.dev/api/v1/ask',
        headers={'x-api-key': API_KEY},
        json={'platform': 'chatgpt', 'prompt': prompt})
    return r.json()['answer']

for prompt in PROMPTS:
    answer = ask_chatgpt(prompt)
    counts = {b: len(re.findall(rf'\b{b}\b', answer, re.I)) for b in BRANDS}
    print(prompt, counts)

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const PROMPTS = ['best SERP API 2026', 'top SerpAPI alternatives'];
const BRANDS = ['Scavio', 'SerpAPI', 'Serper', 'Tavily'];

async function askChatGPT(prompt) {
  const r = await fetch('https://api.scavio.dev/api/v1/ask', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ platform: 'chatgpt', prompt })
  });
  return (await r.json()).answer;
}

for (const prompt of PROMPTS) {
  const answer = await askChatGPT(prompt);
  const counts = Object.fromEntries(BRANDS.map(b => [b, (answer.match(new RegExp(`\\b${b}\\b`, 'gi')) || []).length]));
  console.log(prompt, counts);
}

Expected Output

JSON
For each prompt, the tracker prints a mention count per brand. Over time, you get a daily trend of how often ChatGPT names your brand vs competitors in answers to your category-defining prompts.

Related Tutorials

  • How to Monitor Perplexity Citations
  • How to Build an AEO Dashboard

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.8+. A Scavio API key. A list of prompts relevant to your brand (e.g. 'best SERP API 2026'). Optional: a Slack webhook URL for alerts. A Scavio API key gives you 250 free credits per month.

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

Related Resources

Use Case

Google AI Mode Brand Monitoring

Read more
Use Case

Search Surface Brand Monitoring

Read more
Best Of

Best Cross-Platform Brand Monitoring APIs in 2026

Read more
Best Of

Best LLM Visibility Measurement Tools (May 2026)

Read more
Solution

Monitor Your Brand on TikTok Without Enterprise Pricing

Read more
Glossary

Cross-Platform Brand Intelligence (Unified)

Read more

Start Building

Monitor how often ChatGPT recommends your brand vs competitors. Build a daily tracker with Scavio and deliver the data to a dashboard or Slack.

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