DEV Community

Magenta Waterwheel
Magenta Waterwheel

Posted on Edited on

How to Check if Your Brand Shows Up in Google AI Overviews (with Working Code)

Google has been putting AI-generated answers above the normal blue links for a couple of years now, first as "AI Overviews" and more recently as the more conversational "AI Mode." For a lot of queries, that AI answer is the only thing a user reads before they either click a citation or leave satisfied without clicking anything at all.

If you work in SEO, content, or DevRel, that creates a new question you can't answer by checking Search Console: does the AI answer mention my brand, and if it cites sources, is my domain one of them? Rankings in the traditional ten blue links don't tell you this. You have to actually look at the AI answer.

This post walks through a scriptable way to do that check in bulk, with real, tested code and real output, not a mockup.

Why this is hard to check by hand

The obvious first move is to just search the query yourself and look. That works for one query. It falls apart fast once you have:

  • More than a handful of queries to track
  • Multiple target queries per content cluster, run on a schedule
  • A need to check both AI Overviews and AI Mode, which are different surfaces with different triggering behavior
  • A need to track competitor mentions and citation rank over time, not just "yes/no it showed up today"

AI Overviews are also inconsistent: the same query can show an AI Overview one day and not the next, and it's geographically and personalization-sensitive. Logged-out, consistent-location checks run on a schedule are the only way to get a baseline you can actually trend.

The approach: call a scraper that returns structured JSON

Google doesn't offer a public API for AI Overview content. What's available instead is scraping the live result page and parsing the answer, citations, and brand/competitor mentions into structured fields. We built the Google AI Overviews & AI Mode Tracker, an Apify Actor, to do exactly that (full disclosure: it's ours, and the examples below use it): you give it prompts, a brand, a domain, and optional competitors, and it returns one JSON record per prompt per engine.

Apify Actors are just HTTP-triggerable programs with a dataset as output, so the integration point is a single POST request. Here's the request shape (run-sync-get-dataset-items runs the Actor and hands back the dataset items in the same response, which is convenient for anything synchronous like a script or a CI job):

export APIFY_TOKEN="your-apify-token"

curl -s "https://api.apify.com/v2/acts/magenta_waterwheel~google-ai-overviews-tracker/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": ["best pdf to markdown converter for llms"],
    "engines": ["google_aio"],
    "brand": "Magenta Waterwheel",
    "domain": "magentawaterwheel.com",
    "competitors": ["LlamaParse", "Unstructured", "MarkItDown"]
  }'
Enter fullscreen mode Exit fullscreen mode

I ran this exact call against the live Actor while writing this post. It returned a 201 and a single dataset item. Trimmed for length:

[{
  "prompt": "best pdf to markdown converter for llms",
  "engine": "google_aio",
  "aiAnswerPresent": true,
  "answer": "- [Marker]... An open-source tool built specifically to convert complex PDFs...\n- Docling : A strong local-first pipeline...\n- [Python MarkItDown]... Microsoft's lightweight Python tool...\n- [LlamaParse]... A cloud-based parsing solution by LlamaIndex...",
  "citations": [
    {"position": 1, "url": "https://www.youtube.com/watch?v=mdLBr9IMmgI", "domain": "youtube.com"},
    {"position": 4, "url": "https://realpython.com/python-markitdown/", "domain": "realpython.com"}
  ],
  "citationCount": 7
}]
Enter fullscreen mode Exit fullscreen mode

For that query, none of the brands I asked it to track were mentioned; the AI Overview leaned on open-source tool names instead. That's a useful, honest result in itself: it tells you the AI answer for that query is currently dominated by a different set of names, which is exactly the kind of gap analysis you can't get from a rank tracker.

Checking AI Mode, not just AI Overviews

AI Mode is Google's more conversational surface and behaves a little differently: longer answers, different citation patterns. The Actor treats it as a separate engine value, so you can request either or both in the same call. I tested AI Mode with an unrelated query to confirm it returns a distinct, well-formed answer:

curl -s "https://api.apify.com/v2/acts/magenta_waterwheel~google-ai-overviews-tracker/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": ["is apify safe to use"],
    "engines": ["google_ai_mode"],
    "brand": "Apify",
    "domain": "apify.com"
  }'
Enter fullscreen mode Exit fullscreen mode

The real response came back with "engine": "google_ai_mode" and a multi-paragraph answer citing Trustpilot and a third-party docs site, with aiAnswerPresent: true. If you want both surfaces in one pass, just pass "engines": ["google_aio", "google_ai_mode"]; each prompt gets checked against each engine as its own dataset row.

A Python version for batch jobs

Most real tracking setups aren't one-off curl calls; they're a cron job or a step in a pipeline. Here's the Python version I tested with requests (no SDK required, since it's a plain REST endpoint):

import os
import requests

TOKEN = os.environ["APIFY_TOKEN"]
URL = "https://api.apify.com/v2/acts/magenta_waterwheel~google-ai-overviews-tracker/run-sync-get-dataset-items"

payload = {
    "prompts": ["best free keyword research tool"],
    "engines": ["google_aio"],
    "brand": "Magenta Waterwheel",
    "domain": "magentawaterwheel.com",
    "competitors": ["Ahrefs", "Semrush", "Ubersuggest"],
}

resp = requests.post(URL, params={"token": TOKEN}, json=payload, timeout=120)
resp.raise_for_status()
items = resp.json()

for item in items:
    print(item["prompt"], "-> present:", item["aiAnswerPresent"],
          "brand mentioned:", item.get("brandMentioned"),
          "citations:", item.get("citationCount"))
Enter fullscreen mode Exit fullscreen mode

Running it against the live Actor printed:

best free keyword research tool -> present: True brand mentioned: False citations: 3
Enter fullscreen mode Exit fullscreen mode

To scale this to a real tracking sheet, loop over a list of prompts (the Actor dedupes duplicates automatically), write promptIndex, engine, aiAnswerPresent, brandMentioned, competitors[].mentioned, and citations[].domain to a spreadsheet or warehouse table, and diff the result against yesterday's run. The dataset schema gives you brand rank among competitors too (brandRank, 1 = mentioned first), which is the closest thing to a "position" metric this surface has.

What this does and doesn't give you

To be direct about the limits, because a tool like this is easy to oversell:

  • It's pay-per-check, and you pay even on a miss. Each AI Overview check is billed whether or not Google actually shows an AI Overview for that query, because the search still runs. Budget accordingly if you're tracking hundreds of prompts daily: at $0.02/check for AI Overviews and $0.03/check for AI Mode, a 200-prompt daily job against both engines is about $10/day.
  • AI Overviews are inconsistent by nature. The same query can show an AI Overview today and not tomorrow, and results vary by location and account personalization. A single run is a snapshot, not a verdict; the value is in trending scheduled runs, not one-off checks.
  • This tracks Google's AI surfaces only. If you also care about ChatGPT, Perplexity, or Gemini mentioning your brand, that's a different surface with different mechanics. Our AI visibility tracker covers that side, and it's worth treating as a separate tracking job rather than bolting onto this one.
  • It's a page-render scrape, not an official Google API, because Google doesn't publish one for AI Overview content. That means it can break if Google changes the result page markup, same risk any scraping-based tool carries.

If you want to try a single query before wiring up a script, there's a free, no-signup AI Overview checker that runs one check in the browser. The full version with brand/competitor tracking, scheduling, and webhooks is the Google AI Overviews & AI Mode Tracker page, or go straight to the Apify Store listing to read the full input/output schema and pricing.

Closing thought

AI Overviews and AI Mode are still young enough that most teams are tracking them manually, if at all. A scripted check that returns structured JSON (answer text, citations, brand/competitor mentions, rank) turns "did we get mentioned?" from a Tuesday-afternoon manual search into a number you can plot over four weeks. That's really the whole point: not a fancier dashboard, just data you can actually trend.

Top comments (0)