Citation analysis
CitationAnalyzer, added in 0.8.0, mines a MeasurementReport's raw responses to show where AI engines learned about your brand — own domain vs. review sites, news, forums, and more — plus which sources cite your competitors but never mention you.
The nine source types
| Type | Examples |
|---|---|
own-domain | yourbrand.com |
review-site | G2, Capterra, Trustpilot, TrustRadius, GetApp, Software Advice |
comparison-site | Versus, AlternativeTo, Slant, StackShare, Comparably |
news | ~30 known tech/business outlets — TechCrunch, Forbes, Bloomberg, Reuters, and more |
forum | Reddit, Quora, Stack Overflow, Hacker News |
social | X/Twitter, LinkedIn, Facebook, YouTube |
documentation | docs.*, developer.*, wiki subdomains, Wikipedia |
marketplace | Product Hunt, WordPress.org, shopify.com/app-store specifically |
other | Everything that doesn't match a pattern above |
Classification is plain domain-pattern matching — no AI/NLP — the same "deliberately simple heuristics" approach as the measurement statistics. URLs are extracted from a response's citedUrlsplus new markdown-link and known-domain bare-mention extraction — "according to G2" with no URL still resolves to g2.com.
CitationAnalyzer.analyze()
import { CitationAnalyzer } from "ai-visibility/citations";
const report = CitationAnalyzer.analyze(measurementReport, "acmecrm.com");
report.sources // CitationSource[] — domain, mentions, type, mentionsBrand, mentionsCompetitors
report.sourcesByType // Record<SourceType, CitationSource[]>
report.domainCoverage // 0-1: share of all source mentions that are your own domain
report.thirdPartyCoverage // 0-1: share that are third-party sources
report.topCompetitorSources // sources citing a competitor but never you, sorted by mentions descA low domainCoveragealongside a healthy overall mention rate is a specific, actionable pattern: AI engines know your brand exists, but aren't pulling detail from your own site — usually because third-party sources (review sites, comparison sites) currently carry more citable detail about you than your own pages do.
CLI: citations
npx ai-visibility citations --domain acmecrm.com --from report.jsonPrints a source table (domain, mentions, type), your-domain vs. third-party coverage split, and sources citing competitors but not you. --domain is required; --verbose shows every source instead of just the top 10. --from <file> loads a previously saved measure --json report instead of re-querying engines — see the full report pipeline for why that matters for repeated runs.
Pairs directly with competitor gap analysis, which uses the same citation data as one of its seven evidence sources for why a competitor is outranking you, and with the full report pipeline, which runs this alongside audit, discovery, measurement, and comparison in one command.