Developer Docs · For agent builders

Answer Gateway API reference

One POST returns a verified, excerpt-cited answer from any page at 95–99% fewer tokens than scraping — and it cannot hallucinate. Five questions a day to evaluate; $0.01 per answered question over x402; only answered ever bills.

← All docs · Scanner reference →

Quick start

Every IP gets five answered questions a day to evaluate — no key needed, and only answered counts. Past that, pay per answer over x402 (login-less) or use a key. (Or try it in the browser on the product page.)

curl -X POST https://botvisibility.com/api/answer \ -H "Content-Type: application/json" \ -d '{"url": "https://stripe.com/docs/webhooks", "question": "how many times are failed webhook deliveries retried?"}'

Request fields: url (required, https), question (required, ≤500 chars), max_tokens (optional, 1–2000, default 800), freshness (optional: 1h | 24h | 7d | any — how stale a cached snapshot may be).

One response shape, five terminal states

Every outcome is HTTP 200 with the same JSON shape, distinguished by state — an agent parses one contract:

stateMeaning
answeredGrounded answer (confidence: high) or verified excerpts only (medium). The ONLY state that ever bills or spends quota.
not_foundThe answer isn't in the source — with a not_found_reason saying why (see below). Never a guess.
already_efficientThe page is already token-lean; fetch it yourself via the returned direct_url.
payment_requiredThe page returned HTTP 402 — a price, not a block. The x402 quote comes back in payment and source_cost_usd.
unreachablePolicy block (robots/no-AI signals), HTTP error, or timeout — with a reason.

A not_found always says why via not_found_reason, and returns sources showing exactly which page was read:

not_found_reasonMeaning
content_thinThe page had almost no readable text — usually a JavaScript-rendered SPA (the gateway doesn't execute JS). Try a docs/markdown URL for the same content.
unverifiableThe extractor proposed excerpts but none survived verbatim verification — rejected rather than risk a fabrication.
not_in_contentThe page had substantial readable content and it simply doesn't answer the question. Point the gateway at a different page of the site.

The receipt

Every response carries a token-economics receipt — audit what the page would have cost raw, what was delivered, what you saved, what you paid, and what the source itself charged:

receipt.*Meaning
raw_tokens_at_sourceWhat the page would cost an agent to fetch raw.
tokens_deliveredWhat the gateway actually returned.
reductionPercentage saved, source → delivered.
est_tax_avoided_usdThe saving in dollars at the published reference rate (price_basis).
fee_usdWhat you paid the gateway for this call — $0.01 on the paid route's answered responses, 0 otherwise.
source_cost_usdWhat the SOURCE page itself charged (x402 402 quote or settled payment) — the paid web, itemized.
routeHow the page was read: llms_txt | markdown_negotiation | openapi | html_distill.
cacheanswer_hit | snapshot_hit | miss — repeats are served from cache at near-zero cost.

Aggregated, these receipts are the Agent Tax Index — the public record of what the web costs agents to read.

Endpoints

MethodPathDescription
POST/api/answerThe direct endpoint. JSON body {"url","question"} → a grounded, excerpt-verified answer with a token receipt. Five answered questions/day per IP to evaluate, or a Bearer key. Returns 402 with x402 requirements when the allowance is spent.
POSTpay.botvisibility.com/api/v1/answer-gatewayPay per answer — $0.01 USDC over x402 on Solana. HTTP 200 only for state=answered (that settles the payment); every other state returns 422 with the full result body and does NOT settle.
POSTpay.botvisibility.com/api/v1/answer-keysBuy a prepaid key — $5.00 USDC once → a bvag_ Bearer key with 1,000 answered-question credits ($0.005/answer). The raw key is shown exactly once.

Authentication & billing

Three tiers, one rule — only answered ever bills: a question the source can't answer costs nothing, on every tier.

# Evaluate: five answered questions/day per IP — no credentials curl -X POST https://botvisibility.com/api/answer -d '{...}' # Keyed: Bearer key (daily quota, or prepaid credits from /api/v1/answer-keys) curl -X POST https://botvisibility.com/api/answer \ -H "Authorization: Bearer bvag_…" -d '{...}' # Pay per answer: any x402 client against the pay.sh gateway — $0.01/answer pay curl -X POST https://pay.botvisibility.com/api/v1/answer-gateway -d '{...}'

When the daily allowance is spent, POST /api/answer returns HTTP 402 with a machine-readable x402 challenge (accepts[] + a key_offer) pointing at both paid paths. The billing rule is enforced by the protocol, not promised: the paid route returns 200 only for answered, and an x402 settlement completes only on 200.

The grounding guarantee

A deterministic verifier checks every excerpt is a character-for-character span of the fetched page and that the composed answer stays inside what the excerpts support — including negation. Verification failure returns not_found, never a guess. A 40-case golden set gates every deploy at 100% grounded, zero fabrications — read the grounding report.

Try it in the browser — no key, no signup.

Ask any page a question