This is a small, shareable command-line tool for testing AI visibility with your own DataForSEO or SerpApi credentials.
It is intentionally conservative. It does not pretend to measure "true AI visibility." It helps you run a repeatable prompt set, repeat each prompt, capture raw provider responses, extract brand mentions and cited domains, and export the results for review.
--dry-run mode without API credentials.Use it as a learning and audit aid, not as a source of false certainty.
cd ai-visibility-audit-lite
npm install
No external npm packages are required. Node 18+ is enough.
Export credentials in your shell:
export DATAFORSEO_LOGIN="your-login"
export DATAFORSEO_PASSWORD="your-password"
export SERPAPI_KEY="your-serpapi-key"
Or copy .env.example to .env and source it yourself:
set -a
source .env
set +a
npm run dry-run
This writes sample output without calling any paid API.
node bin/ai-visibility-audit.mjs \
--provider serpapi \
--brand "YourBrand" \
--competitors "CompetitorA,CompetitorB" \
--prompts prompts.example.json \
--runs 5 \
--out reports/yourbrand-serpapi
node bin/ai-visibility-audit.mjs \
--provider dataforseo \
--brand "YourBrand" \
--competitors "CompetitorA,CompetitorB" \
--prompts prompts.example.json \
--runs 5 \
--location "United States" \
--language en \
--out reports/yourbrand-dataforseo
The tool writes:
<out>.json: full raw audit data.<out>.csv: one row per prompt run.The CSV includes prompt, provider, run number, brand mention, competitor mentions, citation domains, response length, and any API error.
Do not rely on one prompt and one run.
Start with at least:
For high-stakes reporting, use larger prompt sets and compare against first-party evidence such as Bing Webmaster Tools AI Performance, server logs, AI referrals, branded search, and conversion data.
DataForSEO Google AI Mode ignores user preferences, search history, and other personalized factors in order to emulate a clean localized result. That is useful for controlled testing, but it is not the same as a real user's personalized session.
SerpApi Google AI Mode can return a subsequent_request_token for follow-up questions. This CLI does not use multi-turn conversations by default because the goal is to keep each prompt run auditable and independent.
MIT. Use it, fork it, and improve it. Please keep the caveats visible.