# How to measure AI visibility with confidence intervals

AI visibility is a rate: out of N answers to your customers' questions, how many mention your brand or cite your site. Because AI answers change from run to run, that rate needs an interval that says how precise it is. This guide shows the math, how much data it takes, and how to get it from a free API call.

## Why one answer misleads

Suppose an AI names your brand in 50% of its answers to a question. Ask once and you will see either 0% or 100%, never the truth. Ask twice and the two answers disagree 50% of the time. A screenshot of one answer is evidence of what happened once, not of how often it happens.

## How many runs buy how much precision

For a true rate of 50%, this is how wide the 95% Wilson interval is at each sample size. The numbers come from the formula, not from collected data:

| Answers | 95% interval at 50% | Width |
| --- | --- | --- |
| 3 | 13%–87% | 75 points |
| 10 | 24%–76% | 53 points |
| 30 | 33%–67% | 34 points |
| 100 | 40%–60% | 19 points |
| 300 | 44%–56% | 11 points |

Precision grows with the square root of the sample: four times the answers roughly halves the width. 30 answers is the minimum for reading a rate, not a standard for ranking brands; two brands whose intervals overlap cannot be ordered.

## Prompts matter more than runs

Runs of the same prompt tend to look alike, so 30 runs of one prompt usually say less than 3 runs each of 10 prompts. With several prompts, the report first computes each prompt's own rate, averages them with equal weight, and builds the interval by resampling prompts rather than answers (5,000 rounds, fixed seed 20261130, so the same data always gives the same result).

Resampling alone can claim false certainty. If 20 prompts all show 0%, every resample is also 0%. So when there are few prompts, or few prompts that differ from the rest, the interval is widened to treat each prompt as one sample: here the upper bound is **16%**, not 0%.

## When data counts as enough

| Condition | Threshold |
| --- | --- |
| Answers per group | At least 30 |
| Prompts, when several are combined | At least 10 |
| Failed or unfinished answers | At most 20% |
| Answers with an unknown result | At most 5% |

Below a threshold you still get the count, rate and interval, marked `enough: false`. Failed captures are never counted as “not mentioned”, and a missing brand or domain gives `null`, not 0%.

## Get intervals from the API

Collect answers first (a job can hold up to 500), then ask for the report. It is free, and one row comes back per engine and set of capture conditions: surfaces are never merged into one score.

```
curl https://api.askcrawl.com/v1/reports/visibility \
  -H "Authorization: Bearer $ASKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "job_ids": [
      "JOB_ID"
    ],
    "brand": "Acme",
    "domains": [
      "acme.com"
    ]
  }'
```

```
from askcrawl import AskCrawl

client = AskCrawl()
report = client.visibility([job_id], brand="Acme", domains=["acme.com"])  # free
for row in report["rows"]:
    for name in ("mention_rate", "citation_rate"):
        rate = row[name]
        print(row["engine"], name, f"{rate['count']} of {rate['sample_size']}", rate["value"], (rate["low"], rate["high"]), rate["method"], rate["enough"])

later = client.compare([before_job_id], [after_job_id], brand="Acme")  # free
for row in later["rows"]:
    print(row["engine"], row["metric"], row["difference"], (row["low"], row["high"]), row["verdict"])
```

Each rate carries `count`, `sample_size`, `prompt_count`, `value`, `low`, `high`, `method` (`wilson_95` or `cluster_bootstrap_95`) and `enough`. The [brand visibility report](https://www.askcrawl.com/products/visibility/) page shows it run on real public samples.

## Before and after

To see whether something changed, collect a second batch with the same prompt set and conditions and compare. These rows are **illustrative inputs** run through the same comparison code the API uses:

| Illustration | Before | After | Difference | 95% interval | Verdict |
| --- | --- | --- | --- | --- | --- |
| 12 prompts × 5 runs | 16 of 60 | 34 of 60 | +30 pts | +23 to +37 | Up |
| 12 prompts × 5 runs | 16 of 60 | 18 of 60 | +3 pts | −5 to +12 | Not clear |
| 8 prompts × 5 runs | 10 of 40 | 23 of 40 | +33 pts | — | Not enough data |

“Not clear” means the interval includes zero. It is not the same as “no change”, and an “up” verdict still does not prove what caused it.

```
curl https://api.askcrawl.com/v1/reports/compare \
  -H "Authorization: Bearer $ASKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "a": { "job_ids": ["BEFORE_JOB_ID"] },
    "b": { "job_ids": ["AFTER_JOB_ID"] },
    "brand": "Acme"
  }'
```

Up

[All guides](https://www.askcrawl.com/guides/)

Related

[Track brand mentions in ChatGPT](https://www.askcrawl.com/guides/track-brand-mentions-in-chatgpt/)

[Google AI Overview API](https://www.askcrawl.com/guides/google-ai-overview-api/)

Basis

[Methodology](https://www.askcrawl.com/methodology/)

[Sampling and intervals](https://www.askcrawl.com/docs/sampling/)

[Glossary](https://www.askcrawl.com/glossary/)

Next

[Sample planner](https://www.askcrawl.com/tools/sample-planner/)

[Brand visibility report](https://www.askcrawl.com/products/visibility/)

[Before-and-after comparison](https://www.askcrawl.com/products/compare/)

> Page: https://www.askcrawl.com/guides/measure-ai-visibility-with-confidence-intervals/ · Content date: 2026-12-02
