Programmatic SEO AI agent for tracking Grok citations
Where Grok's citations come from, how to tell Grok fetches from referrals in your logs, and how to sample citations across thousands of templated pages.
If you run a directory, marketplace or comparison site, Grok is one more AI agent that reads your pages and may or may not send anyone back. For a programmatic SEO site, two questions matter once you’ve decided whether to let xAI’s fetchers in. Does Grok cite templated pages at all? How would you know if it did? This post covers where Grok’s citations actually come from, how to separate real Grok visits from fetcher hits, how to sample citations across thousands of URLs, and when to ignore Grok completely.
Is SEO dead now with AI?
No. SE Ranking studied 101,574 sites from January 2025 to April 2026. AI platforms sent 0.32% of all website traffic, and ChatGPT accounted for 74.78% of those AI referrals. Grok peaked at 0.0019% of total traffic in August 2025 and then “returned to near-zero.”
Google’s position hasn’t changed either. Its AI features documentation says: “There are no additional requirements to appear in AI Overviews or AI Mode… The best practices for SEO remain relevant.”
Does programmatic SEO still work?
Yes, when each page carries data or usefulness the next page doesn’t. Templates that only swap keywords, or that are filled with AI text, are the ones losing. In Glenn Gabe’s August 2026 spam update case studies, the programmatic sites that lost included:
- a 100% AI-generated YMYL site that lost 200K+ queries
- an Amazon affiliate site that lost 14K+ queries
- a site with 1.5M+ indexed URLs, about 85% programmatic, hit sitewide
- a 250K-URL site that lost about 25K queries
I covered the update timeline in Is programmatic SEO dead?. The same rule holds for Grok: the large template sites it cites are built on real data.
Does Grok cite directory, marketplace or comparison pages, or mostly X posts and Reddit?
Grok does cite marketplace and directory pages, but mostly the giants. There is also no single answer to how much of Grok’s sourcing comes from X.
Presenc AI sampled 4,400 prompts hourly in March and April 2026. It found about 45% of citations were X posts and 55% web sources. MaxAEO found 47% across 6,400 answers for B2B SaaS brands. Ahrefs Brand Radar puts x.com at only 1.4% of Grok’s top-50 cited domains in June 2026. Grok shows X posts and web sources in separate panes, according to ContextBolt, so the studies may simply be counting different things. The share also moves with product changes. Goodie reports that Grok cut X citations in May 2026, partly restored them in July and cut them again in August. Read the X share as anywhere from roughly 0% to 50%, depending on the period, the query type and the method.
On the web side, Ahrefs’ June 2026 top 50 looks like this:
| Domain | Share of top-50 citations |
|---|---|
| 16.3% | |
| YouTube | 15.1% |
| 13.9% | |
| Amazon | 5.0% |
| eBay, Walmart | 1.5% each |
| Yelp | 1.0% |
| Tripadvisor | 0.9% |
| Trustpilot | 0.8% |
| KBB | 0.8% |
| Edmunds | 0.7% |
| NerdWallet | 0.6% |
G2 and Capterra are not in the top 50. Reddit, YouTube and Facebook together take about 45%. The marketplaces and listing sites that do appear are programmatic templates at enormous scale, and they are all incumbents.
Presenc’s web breakdown points the same way. News takes 22%, high-authority pages such as Wikipedia and government sites take 17%, brand sites take 9%, and “Reddit, forums, niche aggregators” together take 2%. Goodie puts brand-owned sites at “less than 1%” of the pages Grok cites. No study I found measures how often niche directories or comparison pages get cited.
Does ranking on Google help a page get cited by Grok?
Possibly a little, but nobody has proven it. ContextBolt says normal ranking factors apply to Grok’s web tool, and Peec says Grok also uses Google Search. Ahrefs found that only 12% of AI-cited URLs rank in Google’s top 10, but that study didn’t test Grok. The Grok-specific overlap figures that circulate in search snippets could not be traced to a primary source.
Freshness is a clearer difference. MaxAEO reports the median cited web page is about 6 days old for Grok, compared with about 130 days for Google AI Overviews. A page that has ranked for years is competing in a different pool.
How do I tell Grok referral visits apart from xAI crawler hits?
Start with what you can’t rely on. Bot names like GrokBot, xAI-Grok and Grok-DeepSearch appear in many guides. StackFox says xAI documents some of them but has never seen them in logs. ContextBolt says “xAI publishes no crawler documentation for site owners.” No source confirmed an xAI-SearchBot token.
What StackFox did see, in a February 2026 test: one Grok prompt produced 30 requests in under 1 second from 2 IPs. One IP belonged to M247 (AS9009, a datacenter range) and the other to Datacamp (AS212238, a rotating-proxy provider). The requests used a stale Chrome/139 user agent, plus some Go-http-client/1.1 and iPhone Safari strings, and Grok never checked robots.txt. The crawl moved from the homepage to categories to articles.
Referrals are harder. Patrick Stox at Ahrefs tested this in May 2025 and wrote: “Grok doesn’t seem to pass the referrer at all.” GA4’s AI Assistant channel lists Grok, but it matches on referrer or on medium = “ai-assistant”, and Google doesn’t publish its referrer list. Expect most Grok clicks to land in Direct. The evidence on referrers is old and conflicting, so I’d test it yourself: click a link from grok.com and from Grok on X, then check what your logs record.
flowchart TD
A[Request in logs] --> B{Runs analytics JS?}
B -- yes --> C{Referrer is grok.com?}
C -- yes --> D[Grok referral]
C -- no --> E[Direct or other]
B -- no --> F{Burst from proxy ASN?}
F -- yes --> G[Likely Grok fetch]
F -- no --> H[Other or unknown]To catch the bursts, enrich your logs with ASN and group requests by IP and second. The threshold below is my suggestion, not a figure from any source:
-- Flag IPs that sent many requests within one second
SELECT ip, asn, date_trunc('second', ts) AS sec, count(*) AS hits
FROM access_logs
WHERE ts > now() - interval '7 days'
GROUP BY ip, asn, sec
HAVING count(*) >= 10
ORDER BY hits DESC;
How do I track how often Grok cites my templated pages across thousands of URLs?
You have two practical options.
Third-party panels. Ahrefs added Grok to Brand Radar in April 2026. It shows domain-level citation share without any work on your side.
Build a small programmatic SEO AI agent to sample prompts
The xAI API has a server-side web_search tool that returns citations. It accepts allowed_domains or excluded_domains, up to 5 each, but not both in one request. The approach:

- Take your keyword pattern, for example “best {service} in {city}”, whether you found it in LowFruits or Ahrefs.
- Generate a few hundred real prompts per template, not per URL.
- Run each prompt twice: once unrestricted to see who Grok cites, and once with your domain in
allowed_domainsto see which of your pages it would use. - Parse
citations, map each URL back to its template, and record the share per template. - Re-run on a schedule, because Grok’s sources shift within weeks.
API results may differ from the consumer app. Citations can also point to the wrong URL: in a Columbia Tow Center test from March 2025, reported secondhand by Zahra Mirzaei, Grok-3 identified the correct source in about 6% of cases. Treat the numbers as directional. I keep these results next to other channel data, as described in the measurement hub.
What changes to a programmatic template raise the chance of a Grok citation?
All of the evidence here comes from vendors that sell AEO tooling, so treat it as hypotheses to test.
- Freshness. With a median cited page age of about 6 days, a visible “updated” date backed by data that actually changes has the best case. Fixed text with a new timestamp is not the same thing.
- Self-contained blocks. MaxAEO recommends lists, comparison tables and tight definitions that answer the question without the rest of the page. Presenc found definitional answers carry 3.1 citations on average, against 6.3 for current events, so fewer slots are available on evergreen queries.
- Sharing on X. Presenc found posts with 5,000 to 50,000 likes were cited 4.6x as often as posts with 500 to 5,000 likes, and posts under 50 likes at 0.04x. A link posted from an account nobody follows does almost nothing. The effect of verification is disputed: Presenc reports a 2.8x multiplier, while Goodie says there is “no public evidence” it matters.
- Statistics. Nobody has tested whether adding stats specifically helps with Grok.
The data block is the part of the template that matters most. I wrote about separating it from shared boilerplate in shared blocks vs unique page data.
When is optimizing programmatic pages for Grok not worth the effort?
I would skip Grok, or put it last, when:
- Giants already own your category. If Amazon, Yelp, Reddit or Tripadvisor already appear for your pattern, Grok’s long tail is already taken.
- Your referral data is flat. Grok’s peak share of traffic was 0.0019%. Goodie’s B2B panel reportedly saw “effectively zero outbound referrals,” though that figure is secondhand.
- You have no presence on X. Most of the controllable levers depend on posts that get real engagement.
- Your pages are thin. Fix the template for Google first. The August spam update cases show that risk is much larger than anything Grok can send.
Grok is worth a monthly sample run if you publish fresh, data-heavy pages and have an X audience that shares them. For most directory and Zapier-style integration templates, I’d spend the time on unique data and indexing instead, and check Grok once a quarter to see if that has changed.