AnswerScan is an AI visibility audit engine. It queries multiple AI search engines with the same prompt and returns web-grounded answers side by side, so you can see how your brand or product appears across different AI platforms.
This phase proves that 4 AI engines can be queried in parallel with a single prompt and return real, web-grounded answers.
Engines:
- Claude (Anthropic) —
claude-sonnet-4-5withweb_search_20250305tool - OpenAI —
gpt-4.1via Responses API withweb_search_previewtool - Grok (xAI) —
grok-4via Agent Tools API (/v1/responses+web_searchtool) - Gemini (Google) —
gemini-2.5-flashwithgoogleSearchgrounding
Edit .env.local in the project root and replace the placeholders:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
XAI_API_KEY=xai-...
GEMINI_API_KEY=AIza...
FIRECRAWL_API_KEY=fc-...
.env.localis git-ignored and will never be committed.
npm installnpm run test:enginesThis runs scripts/test-engines.ts which:
- Sends the test prompt to all 4 engines in parallel
- Prints each engine's response to the terminal
- Logs total elapsed time
- Writes the full JSON result (including raw API responses) to
output/test-run-<timestamp>.json
A successful run shows:
- 4 engine blocks each labeled
[CLAUDE],[OPENAI],[GROK],[GEMINI] - Real brand names — e.g. "Weave", "Podium", "Luma", "Arini" for dental AI receptionists
- Evidence of web search — citations, recent product names, or "as of 2024/2025" references
- No
ERROR:prefixes — if you see one, check the relevant API key in.env.local
npm run audit -- example.com "attribute1,attribute2,attribute3"Example:
npm run audit -- linear.app "issue tracking,project management,fast,developer-focused,keyboard shortcuts"The audit pipeline:
- Scrapes the brand's homepage via Firecrawl
- Detects 5 direct competitors using Claude + web search
- Generates 50 buyer prompts across 5 buckets (Category, Feature, Comparison, Use-case, Problem)
- Runs all 50 prompts × 4 engines = 200 queries in parallel (concurrency 20)
- Classifies each response: cited / position / quality
- Computes an overall AI visibility score (0–100)
- Prints a terminal summary and writes full JSON to
output/audit-<domain>-<timestamp>.json
| Component | Weight | Description |
|---|---|---|
| Citation rate | 40% | % of prompts where brand was mentioned |
| Quality score | 40% | Weighted by citation quality (a–d) and position (1–4) |
| Engine coverage | 20% | Harmonic mean of per-engine citation rates |
| Score | Label |
|---|---|
| 80+ | Dominant |
| 60–79 | Strong |
| 40–59 | Visible |
| 20–39 | Spotty |
| < 20 | Invisible |
answerscan/
├── lib/
│ ├── engines.ts # 4 engine query functions
│ ├── scrape.ts # Firecrawl homepage scraper
│ ├── competitors.ts # Claude-powered competitor detection
│ ├── prompts.ts # 50-prompt generator (5 buckets)
│ ├── classifier.ts # Haiku citation classifier
│ └── scoring.ts # Score computation
├── scripts/
│ ├── test-engines.ts # Quick engine smoke test
│ └── audit.ts # Full audit pipeline
├── output/ # JSON results (git-ignored)
├── app/ # Next.js App Router (UI — future phases)
└── .env.local # API keys (git-ignored)