← Back to Journal
· 5 min read

Query Fan-Out Content Planning in Python: Map AI Search's Sub-Queries Before You Write

AI search engines don't answer the query you typed — Google AI Mode and AI Overviews expand one search into 8-12 sub-queries across different intent dimensions, then synthesize. If your article only answers the head query, you're invisible for every other branch of the fan-out. This post shows a zero-dependency Python CLI that enumerates the fan-out tree for any seed keyword: 7 intent dimensions, 55 sub-queries per seed, live autocomplete validation of which branches have real demand, and a gold-mine score that surfaces high-intent low-competition branches. Real output from live runs, the honest limits of the heuristics, and why the 'serendipitous queries' section of the report is where the actual edge lives.

TL;DR

TL;DR — Query fan-out is the mechanism behind Google AI Mode and AI Overviews: one user query gets expanded into 8-12 sub-queries across intent dimensions (pricing, alternatives, use cases, objections...), answered in parallel, then synthesized. Content that answers only the head query competes for one branch; content that covers the branches gets cited. The zens-ink package ships geo_fanout, a zero-dependency CLI that generates the sub-query tree for any seed: python3 -m zens_ink.geo_fanout "ai seo tools" --icp "solo developers". A live run produced 55 sub-queries, 23 scored as gold mines, and 38 validated against real autocomplete demand. The competition estimates are honest word-count proxies — pair them with SERP difficulty scoring before committing. The underrated output is the serendipity section: real autocomplete queries the templates missed, which is where actual content gaps hide.

Google’s AI Mode doesn’t answer the query you typed. Before it retrieves anything, it expands your query into a fan of related sub-queries — pricing branches, alternative branches, “is it safe” branches, “for my industry” branches — runs them all, and synthesizes the answers into one response. Google calls this query fan-out, and it’s the reason a page can rank for the head term and still never get cited by AI search: it answered one branch of the fan while competitors answered eight.

Most content planning still works like it’s 2019. You pick a head keyword, check its volume, write the best single article you can. Against a synthesis engine that asks twelve questions before answering one, that strategy competes for one-twelfth of the surface area.

Fan-out planning flips the order: enumerate the sub-queries first, then decide which branches deserve their own content. This post covers a CLI that does the enumeration, the live runs, and — more important than the tool itself — where its heuristics lie to you.

What the tool actually generates

The tool is geo_fanout from the zens-ink package (stdlib only, no dependencies, no API keys). The methodology is adapted from Span’s AI citation ranking factors and the GEO paper (arxiv:2311.09735) — the short version being that AI engines reward content that answers specific sub-questions with quotable structure.

It expands a seed keyword across seven intent dimensions, each with a commercial-intent weight:

  • ICP / Persona{kw} for developers, for small business, for agencies (high)
  • Use Case / Scenario{kw} workflow, use cases, examples (medium)
  • Pricing / Cost{kw} pricing, cost, free alternative, roi (very high)
  • Features{kw} api, integrations, open source (medium)
  • Competitors / Alternatives{kw} alternatives, best {kw}, review (very high)
  • Objections{kw} safe, worth it, is {kw} legit (medium)
  • Educationalwhat is {kw}, how does {kw} work (low)

That’s 55 candidate sub-queries per seed. Generation alone is instant and offline. The interesting part is what happens next: each sub-query gets checked against live Google autocomplete — ten throttled expansion calls against the public endpoint, no key required — to see whether real humans actually search it. A generated query with zero autocomplete footprint is a hypothesis; one with autocomplete confirmation is demand.

Each sub-query gets a gold-mine score: commercial intent weighted double, minus a competition penalty, plus a point for live-demand validation. Score 4+ makes the gold-mine list.

A real run

Seed: ai seo tools, ICP: solo developers. Command:

python3 -m zens_ink.geo_fanout "ai seo tools" --icp "solo developers"

Top of the report:

GEO Fan-out Report: "ai seo tools"

ICP: solo developers
Total sub-queries generated: 55
Gold mine opportunities: 23
Live search demand validated: 38 queries

GOLD MINE QUERIES (high intent + low competition)

Query                              Intent       Comp     Live
----------------------------------------------------------------
ai seo tools free alternative      very_high    low      ✓
ai seo tools vs free               very_high    low      ✓
ai seo tools vs competitors        very_high    low      ✓
ai seo tools pricing               very_high    medium   ✓
ai seo tools cost                  very_high    medium   ✓
cheapest ai seo tools              very_high    medium   ✓
ai seo tools roi                   very_high    medium   ✓
ai seo tools for solo developers   high         low      ✓
ai seo tools for small business    high         low      ✓
...

And the pillar-and-cluster plan it derives from the top gold mines:

PILLAR + CLUSTER CONTENT PLAN

Pillar: The Ultimate Guide to Ai Seo Tools

Cluster articles (10):
  1. ai seo tools free alternative
     → very_high commercial intent, low competition,
       validated by live search demand
  2. ai seo tools vs free
  3. ai seo tools vs competitors
  4. ai seo tools pricing
  5. ai seo tools cost
  ...

For comparison, the same seed with --no-live (pure offline generation, zero requests) produces the same 55 sub-queries but only 15 gold mines — the live-demand bonus is what separates confirmed demand from template output. That distinction is the difference between a content calendar and a wish list.

The section that actually matters

The gold-mine table looks like the payoff, but it’s table stakes — pricing and alternatives queries are what every content planner generates anyway. The highest-signal part of the report is at the bottom, and it’s easy to miss: serendipitous queries — real autocomplete suggestions that contain the seed but match none of the templates.

From the live run:

SERENDIPITOUS QUERIES (from live search, not in templates)

• ai seo tools 2026
• ai seo tools for marketing agencies
• ai seo tools for shopify
• ai seo tools for wordpress
• ai seo tools for youtube
• ai seo tools hostinger
• ai seo tools reddit
• best ai seo tools for early stage startups
• best ai seo tools for saas
• best ai seo tools for solo founders
• best ai seo tools reddit

Templates can’t produce ai seo tools hostinger. Only demand can. Platform-specific modifiers (for shopify, for wordpress, for youtube) and audience-specific ones (for solo founders, for early stage startups) are exactly the specificity signals AI synthesis rewards — and they arrived from the live endpoint, not from a guess. If you only take one thing from a fan-out report, take this section. The reddit suffix showing up twice is its own signal — it means searchers trust forums over vendors for this topic, which is a citation-source insight, not just a keyword. The Reddit keyword research pipeline covers how to mine that systematically.

Where the heuristics lie

Two honest limits, because using this naively will waste your writing budget:

Competition estimates are word-count proxies. Five-plus words = “low”, three-to-four = “medium”, shorter = “high”. Directionally fine for long-tail, but best project management software for construction is five words of DR-90 bloodbath. Treat the gold-mine score as a ranking within the report, never as a difficulty verdict. Before writing any shortlisted cluster article, run the real thing — the SERP difficulty scoring model scores actual page types and brand fingerprints against the live SERP, which is the only competition number worth planning around.

Live-demand matching is substring-based. The template ai seo tools free matches any suggestion containing or contained in that string, so a validation checkmark means “related autocomplete surface exists,” not “this exact string was suggested.” The signal is real but coarse. For exact-form demand, cross-check volumes through the Bing Webmaster volume pipeline on the final shortlist — that’s the workflow: fan out cheap, verify narrow.

Where this fits in the pipeline

Fan-out planning slots in between discovery and clustering:

  1. Discover seeds from autocomplete and GSC mining
  2. Expand each seed into its fan-out tree (this tool) — generative, includes branches with no existing content
  3. Cluster the combined keyword set into topics with clustering — retrospective grouping of observed demand
  4. Score the shortlist with SERP difficulty — real competition checks
  5. Publish with fan-out-aware structure: BLUF answers per sub-section, comparison tables, FAQ schema

Steps 2 and 3 get confused for each other constantly. They’re opposites in direction — clustering compresses demand you’ve seen; fan-out expands demand an AI engine will look for. You need both, in that order.

And since the whole point of covering branches is getting cited by synthesis engines, the post-publish half of the loop matters too: the GEO score methodology audits whether published pages are actually quotable (fact layer, structure, AI accessibility), the llms.txt guide covers exposing your content inventory to AI crawlers, and a periodic AI search visibility audit tells you whether any of it worked. Fan-out planning is the input side of that loop; the audits are the feedback.

The tool itself, alongside the rest of the pipeline, is in the open-source SEO tools overview. pip install zens-ink, stdlib only, works offline, and the autocomplete checks cost nothing but a second of politeness.

FAQ

What is query fan-out in AI search?

Query fan-out is the expansion step AI search engines run before answering. Instead of retrieving results for the exact query you typed, the system generates 8-12 related sub-queries covering different intent dimensions — pricing, alternatives, use cases, objections, educational basics — retrieves and ranks for each, then synthesizes one answer. Google describes this for AI Mode; Perplexity and ChatGPT Search run equivalent multi-query retrieval. For content strategy it means the unit of competition is no longer the head keyword but each branch of the fan-out tree.

How is fan-out planning different from keyword clustering?

Clustering groups keywords you already have (from GSC, autocomplete exports, competitor data) by shared meaning — it's retrospective, working from observed demand. Fan-out planning is generative: it enumerates the sub-queries an AI engine would expand a seed into, including branches nobody has written content for yet. The two compose — generate the fan-out tree first, then cluster and prioritize the output into a pillar-and-cluster content plan.

Does the tool need an API key or paid data source?

No. zens-ink's geo_fanout is pure Python stdlib. Template generation works fully offline (--no-live). Live-demand validation uses Google's public autocomplete endpoint with no key — the same free endpoint used in keyword research pipelines. The tool runs 10 autocomplete expansions per seed (about one second of polite, throttled requests) to check which generated sub-queries have real search demand.

How accurate are the competition estimates in the report?

They're a deliberate proxy: word count. Five-plus-word queries score low competition, three-to-four medium, shorter high. That directionally matches long-tail reality but is not a difficulty score — a five-word query dominated by DR-90 comparison pages is not easy. Use the gold-mine score to rank opportunities within the report, then run real SERP difficulty scoring on the shortlist before writing anything.

Want to run this analysis on your own site?

ZensInk Pro automates this pipeline. One command, from seed keywords to content plan.

Get Pro →