·9 min read

How to Track Brand Mentions in ChatGPT (Step-by-Step)

To track brand mentions in ChatGPT you need four things: a fixed set of buying-intent prompts, a way to run them against the real ChatGPT web interface on a schedule, structured output you can diff (which brands were named, which URLs were cited), and a scoring layer that turns noisy per-run results into stable weekly metrics. This article walks through that exact system step by step, with working code.

One thing to get right up front: the ChatGPT your customers use is the web product — with live web search, its own system prompts, and answers that vary by region and session. The OpenAI API will not tell you what ChatGPT says about your brand; it serves raw models without the web product's search and recommendation behavior. Whatever tooling you use has to observe the real interface. llmdata's ChatGPT endpoint does this and returns parsed JSON; the system below is built on it, but the methodology stands regardless of your data source.

Why bother tracking ChatGPT mentions

When someone asks ChatGPT "best CRM for a small agency" and it names three products, that shortlist is the consideration set for that buyer. You are either in it or invisible. Unlike a SERP, you can't see this happening in any analytics tool — there's no impression report for AI answers. The only way to know whether ChatGPT recommends you, and whether that changed since last week, is to ask it the questions your buyers ask and measure the answers.

That's the whole system. Now let's build it.

Step 1: Design your prompt set

Your prompt set is your keyword portfolio for AI answers. Bad prompt sets produce vanity data ("ChatGPT knows who we are!"); good ones mirror actual buying journeys.

Build it from four categories:

CategoryPatternExample
Category shortlist"best X for Y""best project management tools for agencies"
Comparison"X vs Y", "alternatives to X""alternatives to Asana for small teams"
Problem-firstdescribe the pain, no category term"my team keeps missing client deadlines, what software helps"
Brand-adjacentyour brand or a competitor named"is Monday.com worth it for a 5-person agency"

Guidelines that matter in practice:

  • 20–50 prompts is the sweet spot to start. Fewer and one flaky answer skews your score; many more and cost grows before your process is proven.
  • Write prompts like buyers, not like SEOs. Nobody types "project management software agencies 2026" into ChatGPT. They write sentences.
  • Include problem-first prompts. These are where category leaders get named without the category being mentioned — the purest visibility signal, and where challengers most often lose.
  • Freeze the set. Changing prompts mid-stream breaks your trend lines. Version the set, and when you revise it, start a new series.

Step 2: Pull structured answers on a schedule

Manual checking doesn't work — answers vary by session, and you can't diff screenshots. You need each prompt run programmatically, from a consistent country context, returning structure.

llmdata runs the prompt against the real ChatGPT web interface and returns the answer text, cited sources, the web searches ChatGPT ran, and the entities it mentioned:

curl -X POST https://api.llmdata.dev/v1/monitor/chatgpt \
  -H "Authorization: Bearer $LLMDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "best project management tools for agencies",
    "country": "US",
    "include": { "markdown": true, "sources": true }
  }'
{
  "success": true,
  "result": {
    "text": "For agencies, the most recommended tools are...",
    "markdown": "For agencies, the most recommended tools are...",
    "sources": [
      { "title": "...", "url": "https://...", "position": 1 }
    ],
    "searchQueries": ["best agency project management 2026"],
    "entities": ["Asana", "Monday.com", "ClickUp"]
  }
}

Three of these fields carry your entire measurement system:

  • entities — the brands and products ChatGPT actually named. This is your mention signal.
  • sources — every cited URL with its position. This is your citation signal, and it's different from the mention signal (more on that below).
  • searchQueries — the web searches ChatGPT ran to build the answer. This is free intelligence: it tells you which SERPs feed ChatGPT's answer, i.e., which pages you need to win to change the answer.

Scheduling and sampling. ChatGPT's answers are non-deterministic — the same prompt can name different brands across runs. So a single run per prompt is a coin flip, not a measurement. The fix is sampling: run each prompt several times per period (start with 3–5 runs per prompt per week) and score rates, not booleans. A weekly cron that fires prompts × runs requests and appends everything to a table is the entire infrastructure.

Step 3: Diff the entities array and compute mention rate

Here's a compact tracker: it runs the prompt set with repeats, computes each brand's mention rate, and diffs against the previous week.

import requests, json, datetime
from collections import Counter

API = "https://api.llmdata.dev/v1/monitor/chatgpt"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

PROMPTS = json.load(open("prompt_set_v1.json"))   # your frozen prompt set
BRANDS = ["YourBrand", "Asana", "Monday.com", "ClickUp"]  # you + competitors
RUNS_PER_PROMPT = 3

def run_week():
    rows = []
    for prompt in PROMPTS:
        for _ in range(RUNS_PER_PROMPT):
            r = requests.post(API, headers=HEADERS, json={
                "prompt": prompt, "country": "US",
                "include": {"markdown": True, "sources": True},
            })
            result = r.json()["result"]
            rows.append({
                "date": datetime.date.today().isoformat(),
                "prompt": prompt,
                "entities": result["entities"],
                "sources": [s["url"] for s in result["sources"]],
                "searchQueries": result["searchQueries"],
            })
    return rows

def mention_rates(rows):
    total = len(rows)
    hits = Counter()
    for row in rows:
        named = {e.lower() for e in row["entities"]}
        for b in BRANDS:
            if b.lower() in named:
                hits[b] += 1
    return {b: hits[b] / total for b in BRANDS}

this_week = run_week()
rates = mention_rates(this_week)
# persist rows + rates; next week, diff against the stored rates

From rates you get the two headline metrics:

  • Mention rate — share of all runs where your brand was named. This is your topline AI visibility number.
  • Share of voice — your mention rate divided by the sum across all tracked brands. This is the number that makes movement legible: "we went from 12% to 19% share of voice in ChatGPT answers" is a sentence a client or CMO understands immediately.

Diffing week over week at the prompt level is where the actionable findings live: "we dropped out of all three 'alternatives to Asana' prompts" is a specific problem you can work, unlike a portfolio-level wobble.

Step 4: Measure citation share separately from mentions

Mentions and citations are different games. ChatGPT can name your brand without citing your site (it learned about you from reviews and roundups), and it can cite your site in an answer that recommends a competitor.

Compute citation share from the sources arrays you already stored:

from urllib.parse import urlparse
from collections import Counter

def citation_share(rows, domains):
    counts = Counter()
    total = 0
    for row in rows:
        for url in row["sources"]:
            total += 1
            host = urlparse(url).netloc.replace("www.", "")
            for d in domains:
                if host == d or host.endswith("." + d):
                    counts[d] += 1
    return {d: (counts[d] / total if total else 0) for d in domains}

share = citation_share(this_week, ["yourbrand.com", "asana.com", "monday.com"])

Then read the two metrics together, because the combination is the diagnosis:

Mentioned?Cited?What it meansWhat to do
YesYesStrong positionDefend: keep cited pages fresh
YesNoThird parties carry your storyFind who is cited; get into those roundups
NoYesYour content ranks, your brand doesn't landSharpen product positioning on cited pages
NoNoInvisibleStart with the searchQueries data: win those SERPs

That last row is where searchQueries earns its place: if ChatGPT builds "best X for Y" answers from a handful of identifiable searches, the pages winning those SERPs are the pages deciding your AI visibility. Classic SEO with a new target list — and you can monitor those SERPs (including whether an AI Overview sits on top of them) with the Google SERP endpoint and the approach in Google AI Overview API: How to Get AI Overviews as JSON.

Step 5: Alerting — catch the change when it happens

A weekly report is for trends; alerts are for events. Two alert rules cover most of what matters:

  1. You disappeared from a prompt where your mention rate had been stable — fire when this week's rate for a prompt drops below a threshold (e.g., mentioned in 0 of 3 runs after 3 of 3 last week).
  2. A competitor entered a prompt they'd never appeared in.
def alerts(prev_rates, curr_rates, threshold=0.34):
    out = []
    for brand in curr_rates:
        prev, curr = prev_rates.get(brand, 0), curr_rates[brand]
        if prev >= threshold and curr < threshold:
            out.append(f"DROP: {brand} fell from {prev:.0%} to {curr:.0%}")
        if prev == 0 and curr >= threshold:
            out.append(f"NEW: {brand} now appears at {curr:.0%}")
    return out
# pipe the list into Slack/email; done

Keep thresholds loose. With 3 runs per prompt, one flaky answer moves a prompt-level rate by 33 points — alert on sustained changes across the portfolio or on two consecutive periods, not on single-run noise.

Extending beyond ChatGPT

The exact same loop — frozen prompt set, scheduled runs, diff entities, compute citation share — ports to every other AI surface, because llmdata returns the same core shape (text, sources, entities) for each of them. The natural expansion order: Perplexity (the most citation-dense engine, ideal for citation-share analysis), Gemini (the default-assistant Android audience), and Google's own AI surfaces via the approaches in the AI Overview and AI Mode guides. Same tables, same metrics, one more column for engine.


llmdata is in early access. If you want to run this system without building the scraping layer underneath it, join the early access and you'll get an API key when your wave opens.

Try the best SEO and AI SEO scraper

Monitor your brand and your competitors, at global scale and with the best performance.

No credit card required.