How to Track Your Brand in Google AI Overviews (Per Query, With Citations)
Track whether Google's AI Overview names your brand, in what order, and which sources it cites, query by query, with a weekly diff of the citations. Tested Python.
Short answer: for each query you care about, ask for Google’s AI Overview, record whether it appeared, whether it names your brand and in what order, and the full list of sources it cites, then compare week to week. Our Google AI Overviews API returns all of that as JSON, one credit per query ($1.99 per 1,000 pay-as-you-go), with the first 30 requests free. The script below keeps a citation log per query and prints which sources each query gained or lost since the last run.
Why per query, with the sources
Free tools such as Ahrefs’ AI visibility checks are a good way to see whether you show up at all. When you need the detail for specific queries, in code, you need three things back for every query:
- Was an AI Overview shown? Many searches don’t get one, and that’s a result too.
- Is your brand named, and where? The first brand an Overview names gets read first.
- Which pages does it cite? An Overview can name you while citing a rival’s page, or cite your page without naming you. You want both facts, and the full source list, to see who the Overview is drawing on.
What comes back
For each query, the API returns the Overview’s text, answerShown (whether Google showed an Overview at all), the brands you asked about with whether each was named, its order and whether its pages were cited, and answer.sources: every cited page with its position, domain, title and URL. A search with no Overview comes back with answerShown: false and is billed as one answer.
A tested weekly citation tracker
This script checks three queries for HubSpot against Salesforce, Zoho and Pipedrive through the /chatgpt/mentions endpoint with provider: "google_ai_overviews". It writes one CSV row per cited source, so the file doubles as a citation log, and prints each query’s sources gained (+) or lost (−) since the previous run:
import csv
import os
from datetime import datetime, timezone
from pathlib import Path
import requests
BRAND = {"name": "HubSpot", "domains": ["hubspot.com"]}
COMPETITORS = [{"name": "Salesforce", "domains": ["salesforce.com"]}, {"name": "Zoho", "domains": ["zoho.com"]}, {"name": "Pipedrive", "domains": ["pipedrive.com"]}]
QUERIES = ["best crm for small business", "free crm software", "crm for real estate agents"]
OUT = Path("aio-sources.csv")
FIELDS = ["run", "query", "overview_shown", "brand_named", "brand_order", "brand_cited", "position", "domain", "url"]
HEADERS = {"Authorization": f"Bearer {os.environ['FETCHLAYER_API_KEY']}"}
run = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M")
rows = []
for query in QUERIES:
res = requests.post(
"https://api.fetchlayer.dev/chatgpt/mentions",
json={"prompt": query, "provider": "google_ai_overviews", "targets": [BRAND, *COMPETITORS], "includeAnswer": True},
headers=HEADERS,
timeout=240,
)
res.raise_for_status()
data = res.json()
me = next(t for t in data["targets"] if t["name"] == BRAND["name"])
answer = data.get("answer") or {}
base = {
"run": run,
"query": query,
"overview_shown": answer.get("answerShown"),
"brand_named": me["mentioned"],
"brand_order": me["orderOfFirstMention"] if me["mentioned"] else "",
"brand_cited": me["citedAsSource"],
}
# One row per cited source, so the file is also the full citation list
for source in answer.get("sources") or [{}]:
rows.append({**base, "position": source.get("position", ""), "domain": source.get("domain", ""), "url": source.get("url", "")})
new_file = not OUT.exists()
with OUT.open("a", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=FIELDS)
if new_file:
writer.writeheader()
writer.writerows(rows)
# Weekly diff: sources each query gained or lost since the previous run
with OUT.open(encoding="utf-8") as f:
history = list(csv.DictReader(f))
runs = sorted({r["run"] for r in history})
for query in QUERIES:
now = [r for r in history if r["run"] == runs[-1] and r["query"] == query]
head = now[0]
line = f"{query:<28} shown={head['overview_shown']} named={head['brand_named']} order={head['brand_order'] or '-'} cited={head['brand_cited']}"
if len(runs) > 1:
prev = {r["domain"] for r in history if r["run"] == runs[-2] and r["query"] == query and r["domain"]}
cur = {r["domain"] for r in now if r["domain"]}
line += f" | +{sorted(cur - prev) or '-'} -{sorted(prev - cur) or '-'}"
else:
line += f" | sources: {', '.join(r['domain'] for r in now if r['domain'])}"
print(line)The first run on 18 November 2026 (3 queries, 3 credits):
best crm for small business shown=True named=True order=1 cited=False | sources: youtube.com, reddit.com, zoho.com, youtube.com, salesforce.com, forbes.com, youtube.com, youtube.com
free crm software shown=True named=True order=1 cited=True | sources: zapier.com, hubspot.com, youtube.com, zoho.com, uschamber.com, reddit.com, youtube.com
crm for real estate agents shown=True named=False order=- cited=False | sources: reddit.com, wiseagent.com, housingwire.com, lofty.com, reddit.com, followupboss.com, realtyjuggler.com, ixactcontact.com, youtube.com, forbes.com, zapier.com, youtube.com, youtube.comWhat it shows:
- “best crm for small business”: HubSpot is named first but not cited. The Overview cites zoho.com and salesforce.com, so rivals’ pages are shaping the answer that names you.
- “free crm software”: HubSpot is named first and cited.
- “crm for real estate agents”: HubSpot isn’t named, and the Overview cites niche real-estate CRMs and Reddit instead.
The second run, a few minutes later:
best crm for small business shown=True named=True order=1 cited=False | +- --
free crm software shown=True named=True order=1 cited=True | +- --
crm for real estate agents shown=True named=False order=- cited=False | +- --No sources were gained or lost between the two runs. Run it weekly and this line is where changes show up: a new domain in +[...] is a page Google started citing for that query; one in -[...] is a page it dropped.
Make it weekly
Schedule the script with cron or a GitHub Actions workflow. Twenty queries checked weekly is about 80 requests a month, roughly $0.16 pay-as-you-go. Keep the CSV: after a month it shows which domains Google relies on for each query, which is where outreach and content work pays off.
Without code
Connect FetchLayer’s MCP server to Claude, ChatGPT or Cursor (setup) and ask:
For the Google search “best crm for small business”, show me the AI Overview, whether it names HubSpot and in what order, and every source it cites.
Next steps
- Google AI Overviews API: what comes back, and pricing
- AI visibility API: the same checks across ChatGPT, Gemini, Muse / Meta AI and more
- API docs: every parameter and field
- Get a FetchLayer API key: 30 free requests, no card