A GEO visibility agent is the automation layer under a question your rank tracker cannot answer: when a buyer asks ChatGPT, Perplexity, or Google AI Mode about your category, does the answer cite you? This playbook is the DIY build — an MCP-wired agent that runs a weekly prompt panel through the answer engines, classifies citations, scores them against a published formula, and reports the delta.
The strategy case is already made. We published the AI share-of-voice framework this agent automates — a weekly, disclosed-methodology panel of 100–200 prompts as the minimum viable measurement system — and the AISVS formula the agent should compute. This post assumes you have read both, or will click through. It re-explains neither.
What it adds is the piece none of those posts deliver: working architecture. Which APIs actually exist, which MCP servers to wire, how to schedule a run that does not depend on a laptop staying open, and what a week of API spend actually costs — line-item math included. If you would rather buy this as a managed product, Profound’s own agent, Aim, ships it as one — the build path below is for teams who want to own the pipeline.
- 01Only Perplexity has a citation-native public API.The Sonar API returns a citations array plus per-source search_results metadata on every response. ChatGPT can be approximated through the OpenAI Responses API web-search tool; Google AI Mode has no public API at all as of July 9, 2026.
- 02Design around three coverage tiers, not one checklist.Tier 1: Perplexity, native API, high confidence. Tier 2: ChatGPT via the Responses API web-search proxy, medium confidence. Tier 3: Google AI Mode, Gemini-API proxy or browser automation only — report it as directional.
- 03MCP is the integration layer, not the product.The agent composes existing MCP servers — Perplexity ships an official one with four tools — over stdio locally or Streamable HTTP remotely. We’ve already covered building a server from scratch; this post only wires them together.
- 04Schedule for a weekly, laptop-independent cadence.Claude Code’s session-scoped cron tools die with the terminal. For production, pick GitHub Actions’ native schedule trigger (zero infra) or Claude Code Routines (cloud-hosted, 1-hour minimum interval, announced April 14, 2026).
- 05API spend is small; engineering time is the real cost.At a 150-prompt weekly panel, the sourced line items sum to roughly $3.26 per week plus OpenAI’s per-call web-search tool fee. The build-vs-buy decision hinges on maintenance hours, not the API bill.
01 — The ProblemThree engines, three structurally different engineering problems.
The macro shift is documented: Search Engine Land’s February 2026 GEO guide cites Gartner’s prediction that traditional search volume drops 25% in 2026, with Google AI Overviews reaching over two billion monthly users and ChatGPT serving 800 million weekly users. If buyers increasingly get answers instead of links, brand visibility inside those answers becomes a metric someone on your team owns — and it moves fast. In active categories we’ve measured 40–60% month-over-month citation drift, which is exactly why the framework post lands on a weekly panel rather than a quarterly audit.
Here is the part most tutorials skip. “Track ChatGPT, Perplexity, and Google AI Mode” reads like a uniform three-item checklist. It is not. It is three structurally different engineering problems with three different confidence levels, and any agent that pretends otherwise will produce numbers you cannot defend. The table below sets the scope for everything that follows.
| Engine | Public API for the answer surface? | What you actually query | Confidence label for your report |
|---|---|---|---|
| Tier 1 — native citation API | |||
| Perplexity | Yes — Sonar API, with a native citations array and per-source search_results metadata on every response | The same answer-plus-sources product surface Perplexity serves, via sonar / sonar-pro models | High — report as measured |
| Tier 2 — API proxy for the consumer surface | |||
| ChatGPT | Partial — the Responses API web_search tool returns url_citation annotations plus a sources list, but it is the API’s search tool, not the consumer ChatGPT app | OpenAI’s API-level web-search grounding — a citation-rich proxy for how ChatGPT cites, not an instrumented read of it | Medium — label explicitly as a proxy |
| Tier 3 — no public API | |||
| Google AI Mode | No — no public, documented API returns the synthesized answer plus citations as of July 9, 2026 | Gemini API as an imperfect proxy, or browser automation against the real UI (fragile, terms-of-service risk) | Low — directional only, disclose the method |
| Claude.ai | No — Anthropic exposes no consumer-search citation API either | Nothing programmatic that mirrors the consumer surface; exclude, or spot-check manually | Low — exclude or manual sample |
This is a disclosure most vendors avoid making. As we documented in our comparison of the AI visibility tools, incumbent products overwhelmingly rely on UI and browser simulation for the engines that lack an API — one vendor’s method is described outright as UI scraping to simulate real interactions. A DIY agent that states its tiers plainly is more credible than a dashboard that implies uniform API coverage, because the confidence labels travel with every number it reports.
02 — ArchitectureThe agent loop: four stages, one weekly pass.
The whole system is a scheduled pipeline with four stages. A scheduler fires once a week. A query layer pushes the prompt panel through each engine at its honest tier. A scoring layer classifies every response for brand mentions and citations, then computes the four AISVS sub-metrics. A report stage writes the weekly delta somewhere humans look. No stage is exotic; the discipline is in keeping the tiers labeled and the panel stable so week-over-week numbers stay comparable.
Scheduler
Fires the run on a fixed weekly slot so persistence math stays clean. GitHub Actions schedule:, Claude Code Routines, or Vercel Cron — the decision matrix is in Section 05.
Query layer
Runs the 100–200 prompt panel through Perplexity’s official MCP server (Tier 1), the OpenAI Responses API web_search tool (Tier 2), and a disclosed Google AI Mode proxy (Tier 3). Persists raw responses plus citation arrays.
Classify + score
A cheap model handles the high-volume yes/no work — brand mentioned, brand cited, position in the source list. A stronger model computes AISVS sub-metrics and writes the narrative summary.
Weekly report
One artifact per week: the composite score, the four sub-metrics, biggest gains and losses by prompt, and verbatim answer excerpts for the losses worth investigating.
Why MCP for the query layer instead of hand-rolling each HTTP client? When Anthropic open-sourced the Model Context Protocol on November 25, 2024, it framed the protocol as the answer to what it called the M×N problem — M models times N tools means M×N bespoke integrations unless a shared standard sits between them — and shipped Python and TypeScript SDKs plus reference servers for Google Drive, Slack, GitHub, Git, Postgres, and Puppeteer on day one. For this agent the payoff is practical: the Perplexity integration is a maintained server you install, not a client you write, and every future engine that ships an MCP server slots into the same loop without touching the pipeline code.
One deliberate simplification: the model doing classification does not need to be the model orchestrating the loop. Treat stage 03 as plain API calls with structured outputs. Any capable model works — the pricing examples later in this post use Claude Haiku 4.5 for bulk classification and Claude Sonnet 5 for scoring, but that is an illustration, not a mandate. Pick whatever your stack already runs.
03 — MCP WiringThe citation-native component: Perplexity’s official server.
The flagship component is Perplexity’s official MCP server, published at perplexityai/modelcontextprotocol on GitHub. It exposes four tools: perplexity_search (the raw Search API), perplexity_ask (conversational, backed by sonar-pro), perplexity_research (sonar-deep-research), and perplexity_reason (sonar-reasoning-pro). It runs over stdio for local clients or HTTP (port 8080 by default) for shared cloud deployment, and needs a Perplexity API key. For the weekly sweep, perplexity_ask against the sonar models is the workhorse — every response carries the citations array your scorer consumes.
The protocol mechanics — JSON-RPC 2.0 message flow, tool registration, the stdio versus Streamable HTTP transport choice — are deliberately out of scope here: we’ve already covered building an MCP server from scratch, including the transport decision table. Two deployment facts do matter for this build. First, if you deploy the agent’s MCP servers remotely rather than as local stdio processes, the current 2025-11-25 spec requires OAuth 2.1 with PKCE and RFC 9728 protected-resource metadata — remote MCP is not unauthenticated by design, whatever older posts imply. Second, when tool calls misbehave during development, MCP Inspector is the debugger: its UI runs on port 6274 and its proxy on 6277.
Perplexity MCP tools
perplexity_search, perplexity_ask, perplexity_research, perplexity_reason. Stdio for local clients, HTTP on port 8080 for shared deployment. Requires a Perplexity API key.
servers tracked, Apr 2026
Third-party registries counted roughly 10,000+ MCP servers by April 2026, up from ~6,800 at year-end 2025 — a registry-tracker figure, not an official spec metric, but a fair signal of integration surface.
MCP Inspector UI port
@modelcontextprotocol/inspector runs its UI on 6274 and its proxy on 6277. Point it at your query layer to watch tool calls and citation payloads during development.
04 — The Honest PartThe ChatGPT proxy and the Google AI Mode wall.
Tier 2: ChatGPT, approximated. OpenAI’s Responses API web_search tool is the closest programmatic surface to how ChatGPT cites. Each response carries url_citation annotations — url, title, and start/end indexes marking exactly where in the answer text each citation applies — plus a broader sources field listing every URL the search consulted, which is wider than the inline citations shown. That index-level anchoring is genuinely useful for position scoring. But be precise about what it is: the API’s web-search grounding tool, not an instrumented read of the consumer ChatGPT app your buyers actually use. When a stakeholder asks “does ChatGPT recommend us,” this data answers a nearby question, and your report should say so in those words.
On cost, one binding caveat: OpenAI bills web-search invocations as a separate per-call tool fee on top of standard token pricing. The fee exists; the current rate lives on OpenAI’s pricing page and changes — verify it there before budgeting rather than trusting any hardcoded number, including one in a July 2026 blog post.
Tier 3: Google AI Mode, walled off. As of July 9, 2026, no public, documented API lets a developer route a query through AI Mode and retrieve the synthesized answer with its citations. That is not an oversight you can engineer around cleanly; 2026 industry coverage describes AI Mode as completely walled off from programmatic access. Your two imperfect options: query the Gemini API as a related-but-distinct proxy and label it as such, or run browser automation against the real AI Mode UI — which is fragile, breaks on redesigns, and carries terms-of-service risk you should evaluate deliberately. The commercial tools face the same wall; they just disclose it less prominently. Whichever path you choose, the weekly report marks AI Mode numbers as directional.
Why does Perplexity sit alone in Tier 1? Because citations are its product, not a bolt-on — and that has been true since the Sonar API launched. The integration case was made early by Zoom, which wired Sonar Pro into its AI Companion for real-time, citation-backed answers.
"Perplexity opens Zoom to knowledge beyond its four walls."— Will Siegelin, Senior Product Manager of AI Products & Responsible AI, Zoom, on integrating the Sonar Pro API (January 2025)
05 — SchedulingFour schedulers, one weekly requirement.
The scheduling requirement is modest — one reliable trigger per week that does not depend on a laptop staying open — which is exactly why it is easy to over-build. Four realistic options, each with a sharp edge worth knowing before you commit.
Claude Code scheduled tasks
Native /loop plus CronCreate, CronList, and CronDelete tools (v2.1.72+): standard 5-field cron, 1-minute granularity, capped at 50 tasks per session, recurring tasks auto-expire after 7 days — and everything dies when the session ends. Ideal for iterating on the agent; wrong for production.
Claude Code Routines
Research preview announced April 14, 2026: scheduled Claude Code jobs on Anthropic-managed cloud, triggered by cron (1-hour minimum interval), an API call, or a GitHub event — configured as a saved prompt, one or more repos, and MCP connectors. The natural always-on home for an agent that reasons during its run.
Vercel Cron Jobs
Included on all plans, capped at 100 cron jobs per project, billed as ordinary Function usage. The tier split matters: Hobby fires at most once per day inside a ±59-minute precision window; Pro and Enterprise get per-minute scheduling with per-minute precision. Fine for a weekly job if the pipeline already lives on Vercel.
GitHub Actions schedule:
A native cron trigger in workflow YAML — stable, boring, no additional infrastructure, and effectively the cheapest possible option for a weekly run. The pipeline runs as a workflow job; secrets live in the repo’s encrypted store.
Our recommendation for a weekly GEO agent: GitHub Actions if the pipeline is a script that calls APIs and writes a report — the schedule trigger is free, versioned next to the code, and nobody has to keep a machine awake. Choose Claude Code Routines when the run itself is agentic — when you want the model reading the raw answers, deciding what changed, and drafting the narrative inside the scheduled job. Anthropic’s launch post describes the packaging plainly: a routine is a saved configuration of “a prompt, one or more repositories, and a set of connectors packaged once and run automatically.” Worth noting for completeness: Anthropic’s separate Managed Agents product added cron scheduling and credential vaults in public beta on June 9–10, 2026 — a more general-purpose hosted-agent home if your automation outgrows the repo-centric shape. The 1-hour minimum interval on Routines is irrelevant at a weekly cadence.
06 — Panel & ScoringWiring the panel to the published formula.
The prompt panel is not new methodology — it is the same 100–200-prompt, disclosed-methodology panel the framework post establishes, held stable week over week so drift measures the engines rather than your own churn. The agent’s job is mechanical: run every prompt through each tier’s query path, persist the raw answer text and citation arrays with a run timestamp, and never edit the panel mid-quarter without versioning it.
Scoring is where the wiring earns its keep. Each response passes through two model calls. The bulk pass is cheap classification — was the brand mentioned, was a brand domain cited, at what position in the source list, in what sentiment frame — a few hundred yes/no-shaped calls that a small model like Haiku 4.5 handles at $1 per million input tokens and $5 per million output. The scoring pass then aggregates those labels into the four published AISVS sub-metrics — Citation Rate weighted 0.35, Position Score 0.25, Answer Share 0.25, Persistence 0.15 — using the exact formula in the metric spec, which this post deliberately does not re-derive. Compute the composite per engine tier, then report tiers separately before any blended number: a high-confidence Perplexity score averaged with a directional AI Mode estimate is neither.
One pre-flight check before the first run, because it produces the most misleading failure mode this agent has: if your site blocks the AI crawlers in robots.txt, the agent will faithfully report zero citations for reasons that have nothing to do with content quality. Run the 100-point audit before your first agent run — it covers structured data, freshness, and crawler access as a one-time gate, distinct from the weekly loop. And if the weekly report keeps surfacing losses you do not have capacity to act on, that is the point where our agentic SEO service picks up the remediation side of the loop.
07 — Cost & Build-vs-BuyThe weekly bill, line by line.
No public source publishes an all-in cost model for a DIY GEO tracking agent — vendor tools quote flat subscriptions precisely to avoid this line-item view. So here is ours, at a 150-prompt weekly panel, with the arithmetic shown so you can rerun it against your own panel size and the live pricing pages. Perplexity prices Sonar as a hybrid: tokens ($1 per million in and out on Sonar; $3 in / $15 out on Sonar Pro) plus a per-1,000-request fee that steps with search-context size ($5/$8/$12 on Sonar, $6/$10/$14 on Sonar Pro). The estimates below assume medium context, roughly 1,200 combined tokens per Sonar call, and a Sonar Pro deep-dive on a 30-prompt subset. All prices as retrieved July 9, 2026.
| Line item | Calls / week (150-prompt panel) | Unit price (Jul 9, 2026) | Weekly subtotal (math shown) |
|---|---|---|---|
| Query layer | |||
| Perplexity Sonar — broad sweep | 150 requests | $8 per 1,000 requests (medium context) + $1/M tokens in and out | 150 × $0.008 = $1.20 + ~180K tokens × $1/M ≈ $0.18 → ≈ $1.38 |
| Perplexity Sonar Pro — deep-dive subset | 30 requests | $10 per 1,000 requests (medium) + $3/M in, $15/M out | 30 × $0.01 = $0.30 + (15K in × $3/M ≈ $0.05) + (30K out × $15/M = $0.45) → ≈ $0.80 |
| OpenAI Responses API — web_search (ChatGPT proxy) | 150 calls | Per-call tool fee (verify the live pricing page) + standard token pricing | 150 × current tool-call rate + tokens — fee-dependent |
| Scoring layer (example models) | |||
| Claude Haiku 4.5 — bulk classification | ~330 calls (all tiers’ answers) | $1/M input · $5/M output tokens | ~495K in × $1/M ≈ $0.50 + ~66K out × $5/M ≈ $0.33 → ≈ $0.83 |
| Claude Sonnet 5 — AISVS scoring + report | 1 aggregation run | $2/M input · $10/M output (intro pricing through Aug 31, 2026; $3/$15 after) | ~100K in × $2/M = $0.20 + ~5K out × $10/M = $0.05 → ≈ $0.25 |
| Infrastructure | |||
| Scheduler — GitHub Actions schedule: | 1 trigger | $0 marginal | $0 |
| Total (sourced line items) | — | — | $1.38 + $0.80 + $0.83 + $0.25 + $0 = ≈ $3.26/week + the OpenAI tool-call fee |
Read the total honestly: at these assumptions the sourced API spend lands in the low single digits per week, and even doubling the panel and token estimates keeps it in the low tens of dollars once the OpenAI tool fee is added. The real cost is engineering time — building the pipeline, then maintaining it as vendor APIs, prices, and the Tier 3 workaround drift underneath you. That maintenance line is the honest build-vs-buy pivot: a subscription tool amortizes exactly that burden across its customer base.
Our projection for where this goes: the tier structure, not the prices, is the durable part of this post. Perplexity has committed to citation-native APIs as product strategy; OpenAI’s API surface keeps converging toward what the consumer app does; Google has every incentive to keep AI Mode walled while it monetizes the surface directly. Expect Tier 2 to firm up and Tier 3 to stay closed longer than anyone hopes — which means an agent designed around explicit confidence tiers degrades gracefully, while one that assumed uniform coverage breaks silently. When the weekly maintenance exceeds a couple of hours, buy: the tools roundup covers the managed options, and Profound’s Aim is the closest packaged equivalent of the loop described here.
08 — ConclusionShip the honest version.
One native API, one proxy, one wall — design the agent around that truth.
The build itself is a week of focused work: Perplexity’s official MCP server as the citation-native core, the OpenAI Responses API web-search tool as a clearly-labeled ChatGPT proxy, a disclosed and hedged path for Google AI Mode, a two-model scoring pass that computes the published AISVS formula, and a GitHub Actions or Claude Code Routines trigger so the whole loop runs weekly without a human or a laptop in the loop.
What makes the output defensible is not the pipeline — it is the confidence tiers traveling with every number. A measured Perplexity citation rate, a proxied ChatGPT estimate, and a directional AI Mode signal are three different classes of evidence, and a report that labels them as such will survive scrutiny that a blended dashboard number will not.
Start with the pre-flight audit, run the panel for four weeks before drawing conclusions, and re-check every price in Section 07 against the live pages when you budget. The engines will keep moving; the agent’s job is to notice — on schedule, with its uncertainty printed on the label.