Esta página solo está en inglés.
AI visibility API
Ask AI answer engines a question and see whether a brand is mentioned and cited, at what position and in what tone, next to which competitors, and which URLs they cite.
How it works
POST /v1/checkwith a question, a brand and the engines to ask. The price is taken from your balance up front and you get a check id (202).- Poll
GET /v1/checks/{id}until it finishes. Each engine answerssamplestimes; failed answers are refunded automatically. - Read the rates per engine. Every rate comes with its sample count, and the mention rate with a Wilson 95% interval.
Base URL https://api.sagbot.app, token as Authorization: Bearer sgb_… (get a token). GET /v1/engines and GET /v1/health need no token.
Engines and prices
You pay per answer: one engine, one sample. A check costs the sum of price × samples over its engines. Without engines, a check asks the five default engines: chatgpt, google_aio, gemini, google_ai_mode and perplexity.
| Engine id | Label | Surface | Per answer |
|---|---|---|---|
chatgpt | ChatGPT | ui | $0.035 |
google_aio | Google AI Overviews | ui | $0.035 |
gemini | Gemini | ui | $0.035 |
google_ai_mode | Google AI Mode | ui | $0.035 |
perplexity | Perplexity | api | $0.035 |
claude | Claude | api | $0.06 |
chatgpt_api | ChatGPT (API) | api | $0.06 |
gemini_api | Gemini (API) | api | $0.06 |
ui: the answer a logged-out user sees in the product. api: the model through its API, with web search on.
GET /v1/enginesno token
The live catalog, sorted by share of AI referral traffic: id, label, surface (ui: what a logged-out user sees in the product; api: the model through its API with web search on), vendor, price_usd, traffic_rank, default, status (ok, degraded or off) and supports (country, language, citations, fan-out, sponsored).
curl https://api.sagbot.app/v1/enginesCreate a check
POST /v1/check202, or 200 for a dry run
| Field | Type | Description |
|---|---|---|
query | string, required | The question, 1 to 300 characters |
brand.name | string, required | 1 to 100 characters |
brand.domain | string | A host such as sagbot.app; citations on it or its subdomains count as cited |
brand.aliases | string[] | Other names of the brand, up to 10 |
competitors | string[] | Up to 10 names, each reported with its own rates |
engines | string[] | Distinct engine ids. Default: the five default engines |
country | string | ISO 3166-1 alpha-2, default US. The list is in openapi.yaml |
language | string | ISO 639-1, optionally with a region (en, pt-BR). Default en |
samples | integer | 1 to 5, default 1. More samples give a mention rate with a narrower interval |
include | string[] | ["raw"] adds each answer's text to the result |
dry_run | boolean | true returns the price and charges nothing |
Send an Idempotency-Key header (1 to 64 characters, your own id for this check) to retry safely: a repeat with the same key returns the same check, id and cost, and is never charged twice. After a 402, top up and use a new key.
curl https://api.sagbot.app/v1/check \
-H "Authorization: Bearer $SAGBOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: weekly-2026-11-17-sagbot" \
-d '{
"query": "best tool to check if my website is ready for ai agents",
"brand": { "name": "SagBot", "domain": "sagbot.app" },
"competitors": ["Acme Audit"],
"engines": ["chatgpt", "perplexity"],
"samples": 3
}'202: charged and queued. X-Cost-USD and X-Balance-USD show the price and your balance after paying.
{ "id": "chk_0f8e6c1d2b3a49e8a7c6b5d4e3f2a1b0", "status": "queued", "cost_usd": 0.21 }With "dry_run": true: 200 and the price, line by line.
{
"cost_usd": 0.21,
"lines": [
{ "engine": "chatgpt", "samples": 3, "unit_usd": 0.035, "usd": 0.105 },
{ "engine": "perplexity", "samples": 3, "unit_usd": 0.035, "usd": 0.105 }
]
}Get a check
GET /v1/checks/{id}
Poll until status is done, partial (some answers failed and were refunded) or failed; before that it is queued or running and results is null. Only the token's owner can read a check; anyone else gets 404.
curl https://api.sagbot.app/v1/checks/chk_0f8e6c1d2b3a49e8a7c6b5d4e3f2a1b0 \
-H "Authorization: Bearer $SAGBOT_TOKEN"{
"id": "chk_0f8e6c1d2b3a49e8a7c6b5d4e3f2a1b0",
"status": "done",
"created_at": "2026-11-17T09:41:07.000Z",
"finished_at": "2026-11-17T09:42:31.000Z",
"cost_usd": 0.21,
"refunded_usd": 0,
"request": {
"query": "best tool to check if my website is ready for ai agents",
"brand": { "name": "SagBot", "domain": "sagbot.app", "aliases": [] },
"competitors": ["Acme Audit"],
"engines": ["chatgpt", "perplexity"],
"country": "US",
"language": "en",
"samples": 3,
"include": []
},
"results": [
{
"engine": "chatgpt",
"surface": "ui",
"model": "chatgpt",
"samples": 3,
"samples_ok": 3,
"mentioned_rate": 0.67,
"ci95": [0.21, 0.94],
"cited_rate": 0.33,
"avg_position": 1,
"surface_present_rate": 1,
"web_search_rate": null,
"sample_flags": [
{ "sample": 1, "no_web_search": false, "no_citations": false,
"sentiment": { "brand": "positive", "competitors": [null] } },
{ "sample": 2, "no_web_search": false, "no_citations": false,
"sentiment": { "brand": "neutral", "competitors": ["neutral"] } },
{ "sample": 3, "no_web_search": false, "no_citations": true, "sentiment": null }
],
"fan_out": ["ai agent readiness checker website"],
"competitors": [{ "name": "Acme Audit", "mentioned_rate": 0.33, "avg_position": 2 }],
"sentiment": {
"brand": { "positive": 1, "neutral": 1, "negative": 0 },
"competitors": [{ "positive": 0, "neutral": 1, "negative": 0 }]
},
"citations": [
{ "url": "https://sagbot.app/", "title": "SagBot", "domain": "sagbot.app", "count": 1, "brand": true }
],
"errors": []
}
]
}Result fields
One entry per engine in results. Rates are over the answers that succeeded (samples_ok), and null when none did.
| Field | Description |
|---|---|
surface | ui or api, as in the engine catalog |
model | The model the supplier reported (or the engine id); null only when no answer succeeded |
samples, samples_ok | Answers asked for, and answers that came back |
mentioned_rate | Share of answers that mention the brand (or an alias) |
ci95 | Wilson 95% interval of mentioned_rate |
cited_rate | Share of answers citing brand.domain |
avg_position | Mean rank of the brand's first mention among brand and competitors; 1 = first |
surface_present_rate | Share of answers where the surface appeared at all (Google shows no AI Overview for many queries) |
web_search_rate | Share of answers where the model searched the web; null when the supplier doesn't say (UI engines) |
sample_flags | Per answer: no_web_search and no_citations, so "not cited" is never read as "didn't search"; sentiment: the answer's tone toward the brand and each competitor (below), null when it names none of them or the tone couldn't be read |
fan_out | The web searches the engine ran to answer; empty when it doesn't report them |
competitors | name, mentioned_rate, avg_position per competitor |
sentiment | How the answers talk about the brand and each competitor (request order): counts of positive (recommends or praises), neutral (lists or describes) and negative (criticises or warns against). Only answers whose tone was read count; a missing label is null (unknown), never neutral. Included in the price per answer; absent on older checks |
citations | Cited URLs, most cited first: url, title, domain, count (answers citing it), brand (on brand.domain) |
errors | Failed answers: sample and code (timeout or upstream_error); each was refunded |
raw | Only with include: ["raw"]: each answer's text, null for failed ones |
AI citations lookup
Find the ChatGPT and Google AI Overviews answers that already cite or mention a page, a domain or a keyword. With several targets, an answer must match every target that isn't excluded, so to compare pages, run one lookup per page. Unlike a check, nothing is asked live: the answers were collected earlier for common questions, so a lookup returns in a few seconds, but the questions aren't yours to choose.
POST /v1/mentions200
| Field | Type | Description |
|---|---|---|
targets | object[], required | 1 to 10 targets, each with exactly one of url, domain or keyword. An answer must match all the targets without exclude |
targets[].url | string | An absolute http or https URL of a page, without user:password@ or a port |
targets[].include_subpaths | boolean | url only: every page under the URL's path. The URL then has no query string |
targets[].domain | string | A domain such as sagbot.app, up to 63 characters |
targets[].include_subdomains | boolean | domain only: its subdomains too |
targets[].keyword | string | A brand or product name, 1 to 250 characters, matched as a whole word |
targets[].exclude | boolean | Leave out answers that match this target. At least one target is not excluded |
country | string | ISO 3166-1 alpha-2, default US; the same list as checks |
language | string | ISO 639-1, two letters, not case-sensitive, default en |
dry_run | boolean | true returns the price and charges nothing |
A lookup costs $0.49 from your balance. Your first lookup is free. When nothing is found, a paid lookup gets $0.24 back, so it costs $0.25 (a free one still counts as used). ChatGPT data covers the United States in English only: other countries and languages return Google AI Overviews answers only, and counts.chatgpt is null.
You get up to 100 answers, most-asked questions first (by AI search volume), ChatGPT answers before Google ones: 50 from each for US and en, otherwise 100 from Google AI Overviews. A site hidden by its owner or SagBot is refused (403, not charged) unless you are its verified owner; so is a domain that is a public suffix (such as github.io) and a keyword that is a hidden site's host. The same Idempotency-Key rules as checks apply.
curl https://api.sagbot.app/v1/mentions \
-H "Authorization: Bearer $SAGBOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: citations-2026-11-24-blog" \
-d '{
"targets": [
{ "url": "https://sagbot.app/blog/", "include_subpaths": true },
{ "domain": "acme-audit.com", "include_subdomains": true }
],
"country": "US",
"language": "en"
}'200: X-Cost-USD is what you paid after any refund; X-Balance-USD your balance after paying.
{
"id": "mnt_5b0c6f1e2d3a4b5c6d7e8f9a0b1c2d3e",
"created_at": "2026-11-24T12:00:00.000Z",
"cost_usd": 0.49,
"free": false,
"refunded_usd": 0,
"request": {
"targets": [
{ "url": "https://sagbot.app/blog/", "include_subpaths": true },
{ "domain": "acme-audit.com", "include_subdomains": true }
],
"country": "US",
"language": "en"
},
"counts": {
"chatgpt": { "returned": 12, "total": 12 },
"google_aio": { "returned": 50, "total": 214 },
"by_target": [9, 55]
},
"mentions": [
{
"platform": "chatgpt",
"question": "how do I check if my website is ready for ai agents",
"answer": "A few tools check this for you …",
"cited_urls": ["https://sagbot.app/blog/ai-agent-readiness"],
"matched_targets": [0],
"ai_search_volume": 320,
"first_seen": "2026-10-02",
"last_seen": "2026-11-20"
}
]
}| Field | Description |
|---|---|
cost_usd, free, refunded_usd | The price taken (0 for the free lookup) and the refund when nothing was found |
counts.chatgpt, counts.google_aio | returned answers and the total that matched; returned under total means the list was cut. null when not asked |
counts.by_target | Per target, in request order: how many returned answers match it (0 for excluded targets) |
mentions[].platform | chatgpt or google_aio, the engine ids of checks |
mentions[].question, answer | The question asked and the full answer (Markdown) |
mentions[].cited_urls | The URLs the answer cites |
mentions[].matched_targets | Indexes into request.targets this answer matches, computed by SagBot: a cited URL equal to the target (or under its path with include_subpaths), a cited domain (or subdomain), or the keyword in the question or answer |
mentions[].ai_search_volume | How often the question is asked of AI; null when unknown |
mentions[].first_seen, last_seen | Dates (YYYY-MM-DD) the answer was first and last seen, or null |
With "dry_run": true: 200 and what this lookup would cost; free: true while your first lookup is unused.
{ "cost_usd": 0, "free": true }GET /v1/mentions/{id}
The stored lookup, same body as the 200 above. Only the token's owner can read it; anyone else gets 404.
curl https://api.sagbot.app/v1/mentions/mnt_5b0c6f1e2d3a4b5c6d7e8f9a0b1c2d3e \
-H "Authorization: Bearer $SAGBOT_TOKEN"Usage and balance
GET /v1/usage?days=30
What you spent on AI visibility per day and engine; refunded answers are not counted. days is 1 to 90, default 30. AI citations lookups aren't included.
curl "https://api.sagbot.app/v1/usage?days=30" -H "Authorization: Bearer $SAGBOT_TOKEN"
{
"days": 30,
"total_usd": 0.21,
"rows": [
{ "day": "2026-11-17", "engine": "chatgpt", "samples": 3, "usd": 0.105 },
{ "day": "2026-11-17", "engine": "perplexity", "samples": 3, "usd": 0.105 }
]
}GET /v1/balancefree
Your prepaid balance, also in X-Balance-USD. Never charged: read it before a paid check or lookup. The MCP tool get_balance does the same.
curl https://api.sagbot.app/v1/balance -H "Authorization: Bearer $SAGBOT_TOKEN"
{ "balance_usd": 9.89 }Engine health
GET /v1/healthno token
Success rate and p95 latency (successful answers only) per engine over the last 24 hours, one entry per engine. Cached for 60 seconds.
curl https://api.sagbot.app/v1/health
{
"window_hours": 24,
"engines": [
{ "engine": "chatgpt", "status": "ok", "success_rate": 0.98, "p95_ms": 41000 }
]
}Errors and limits
Errors use the shared shape { "error": { "code", "message", "request_id" } }, plus top_up_url on a 402.
| Status | code | When |
|---|---|---|
| 400 | invalid_request | Bad body, parameter or Idempotency-Key, or a lookup url with user:password@ or a port; the message says which |
| 401 | unauthorized | Missing, unknown or revoked token |
| 402 | insufficient_balance | The check or lookup costs more than your balance; top up at top_up_url and retry with a new Idempotency-Key |
| 403 | site_hidden | A lookup target is on a site hidden by its owner or SagBot and you aren't its verified owner, or is a public suffix such as github.io; not charged |
| 404 | not_found | Unknown check or lookup id, or one that isn't yours |
| 409 | in_progress | A lookup with the same Idempotency-Key is still running; retry in a few seconds |
| 413 | body_too_large | Body over 16 KB |
| 429 | rate_limited | Too many requests, or too many lookups on your account; wait a minute |
| 502 | upstream_failed | The lookup couldn't read the AI answers; nothing charged (refunded, or the free lookup given back). Retry with a new Idempotency-Key |
Limits: 10 paid checks a minute per token (dry runs don't count), 10 lookups a minute per account, and 60 authenticated requests a minute per IP address.