AI Visibility Audit Lite

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.

What It Can Do

What It Cannot Do

Use it as a learning and audit aid, not as a source of false certainty.

Install

cd ai-visibility-audit-lite
npm install

No external npm packages are required. Node 18+ is enough.

Configure Credentials

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

Dry Run

npm run dry-run

This writes sample output without calling any paid API.

Real Run With SerpApi

node bin/ai-visibility-audit.mjs \
  --provider serpapi \
  --brand "YourBrand" \
  --competitors "CompetitorA,CompetitorB" \
  --prompts prompts.example.json \
  --runs 5 \
  --out reports/yourbrand-serpapi

Real Run With DataForSEO

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

Output

The tool writes:

The CSV includes prompt, provider, run number, brand mention, competitor mentions, citation domains, response length, and any API error.

Methodology Rule

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.

Provider Notes

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.

License

MIT. Use it, fork it, and improve it. Please keep the caveats visible.