ChatGPT AI Visibility API v1
Ask ChatGPT — or Bing’s AI overview — a prompt and find out what it answered, which brands it recommended and which pages it cited, from https://api.fetchlayer.dev/chatgpt. These are the answers people see, not API completions — no OpenAI key, just your FetchLayer key. FetchLayer is not affiliated with, endorsed by, or sponsored by OpenAI or Microsoft.
ChatGPT AI Visibility API at a glance
This is the reference: every endpoint, its parameters and the fields it returns. The essentials first.
- Returns
- AI visibility: mentions, citations and rank, as typed JSON.
- Endpoints
- 5 endpoints, grouped as AI visibility, Answers, Prompt research and Share of voice. See them all
- Request
POST https://api.fetchlayer.dev/chatgpt/<endpoint>with a JSON body.- Auth
- Your FetchLayer API key as a Bearer token. One key works for every platform we support. Authentication
- Cost
- 1 credit per page of results a call returns; the exact figure is on every response. Credits are $1.99 per 1,000 pay-as-you-go, plans start at $25 a month, and new accounts get 30 free requests.
- MCP
- Also on our MCP server for AI agents, with the same key and the same billing. Connect an agent
What teams use it for, with worked examples: ChatGPT AI Visibility API
Available endpoints
/mentions POST Track where a brand ranks in ChatGPT answers /ai-rank POST Ask ChatGPT and get the answer with its sources /ask POST Find the prompts and searches that lead to a topic /prompt-discovery POST Share of voice across prompts and brands /visibility-report ChatGPT, Bing, Duck.ai, Gemini, Google AI Overviews, Meta AI, and more assistants coming
Every route takes provider: chatgpt (the default), bing, the AI overview Bing shows above its search results, duck_ai, Duck.ai, gemini, Google’s Gemini, google_ai_overviews, the AI Overview Google shows above its search results (not AI Mode, and not Gemini), or meta_ai, Meta AI, which runs on Muse Spark, the same Meta model as Muse. Mentions, ranks, discovery and reports work the same for all six. Send providers instead — a list such as ["chatgpt", "bing"] — to ask several at once: the response then has multiProvider: true and one entry per assistant in results, each { provider, ok, result, error } with result shaped exactly like that assistant’s own response. One assistant failing does not fail the others, and the bill is the sum of the answers actually produced. Without providers, responses are the single-assistant shape documented here, unchanged.
Bing does not show an overview for every prompt, and it can come and go for the same prompt. When it shows none, the response is still a 200 with answer.answerShown: false, an empty answer, and mentions and ranks null — never “not mentioned”. Aggregates count those runs in runsWithoutAnswer and leave them out of every rate. It is billed as one answer. Bing’s model is always null, its prompts are at most 500 characters, and its overview may not be specific to the country you ask for (notes says so outside the US).
Duck.ai lets you choose the model: model is one of gpt-luna (the default), claude-haiku, gpt-mini, mistral-small (no web search), gpt-oss or gemma, and answer.model is the model that answered, as Duck.ai names it. It searches the web on every answer, except with mistral-small, which answers from its own knowledge (answer.usedWebSearch false, no sources); webSearch "on" with a no-web-search model is a 400 that costs nothing. Its answers are not tailored to the country you ask for (notes says so outside the US), and answer.suggestedFollowUps carries the related searches it shows. One credit per answer, as everywhere. A busy Duck.ai answers a retryable 503 (service_busy, with Retry-After), never billed.
Gemini reports the model that wrote each answer in answer.model (for example “3.5 Flash-Lite”); it cannot be chosen, so model with it is a 400. Citations come with some answers only: Gemini searches the web for most prompts but links its sources on few, so sources can be empty while retrievedPages is filled — read both. searchQueries is always null, servedCountry is the location Gemini itself states (or null), the answer’s language and currency follow the prompt, and answer.suggestedFollowUps carries the follow-up prompts it offers. webSearch is auto only — Gemini decides when to search, and on is a 400 that costs nothing. One credit per answer.
Google AI Overviews is the AI Overview Google shows above its search results — not AI Mode, and not Gemini. The overview comes back as Markdown with each citation at the end of the passage it follows, and the pages it cites. Like Bing, Google does not show an overview for every search: then the response is a 200 with answer.answerShown: false, mentions and ranks null, and a note, billed as one answer; an overview that did not finish loading is a retryable 503 instead. model, searchQueries and retrievedPages are null. servedCountry is the country Google served the results for, which can differ from the one you asked for; the overview follows it. A citation such as “Investopedia +1” stands for more pages than it links, and only the linked pages are listed. Prompts are at most 2,048 characters.
Meta AI and Muse both run on Muse Spark, Meta’s model. Its answers are tailored to the country you ask for — local examples, prices and providers — and servedCountry is that country. Recommendation prompts (what to buy, use or choose) usually come with several sources, with inlineCitations and the searchQueries behind them. Factual or explanatory prompts are usually answered without searching, so sources is empty and searchQueries is []; retrievedPages lists the pages it looked at, cited or not. answer.model is null and cannot be chosen, webSearch is auto only (on is a 400 that costs nothing), and prompts can be up to 4,000 characters. An answer takes about 20–40 seconds; one credit per answer.
Coming soon: Perplexity, Google AI Mode, Copilot, Grok and DeepSeek. Their ids are already accepted, and naming one today is a 400 that lists the assistants available, which costs nothing. GET https://api.fetchlayer.dev/chatgpt/providers lists every assistant with its status (available or coming soon, as coming_soon) and what its answers include; it is free and needs no key.
Mentioned and cited are two different things
This is the distinction the whole API is built around, and most AI brand monitoring collapses it. An AI answer can name your brand in its prose while none of your pages are among the sources it links, and it can cite one of your pages without recommending you at all. They are separate outcomes with separate fixes: being named is a reputation and consensus problem, being cited is a retrievability problem.
So every route reports both. /mentions returns mentioned beside citedAsSource with the exact source positions, and /ai-rank keeps two rankings apart: rank among the options the answer recommends, and citationRank among the pages it cites. There is a third state worth watching too — retrieved, meaning the assistant read one of your pages while searching and then cited someone else.
Answers vary, so tracking uses several of them
The same prompt gives a different answer minutes apart. That is a property of the thing being measured, not a fault in the measurement, and it is why /ai-rank takes a runs count and reports an aggregate: mentionRate, averageRank, bestRank, worstRank, citationRate and averageCitationRank. Read the aggregate, not any single run, and keep the prompt, country and webSearch mode fixed when comparing over time.
A single answer is still useful for reading why a number moved — /ask returns the answer with its sources, its inline citations, the searches it ran and every page it read but did not cite.
One credit per answer generated
Billing follows answers, not routes. /ask and /mentions cost 1 credit each; /ai-rank costs its runs; /prompt-discovery costs one per prompt asked plus one more while it also asks for suggested prompts; /visibility-report costs prompts × runs. Matching, ranking and aggregation cost nothing extra, and an answer that could not be produced is never billed. Every response states it as pagesScraped, beside answersGenerated, which is the same number.
Comparing more brands is free: /mentions and /visibility-report read every target out of the same answers, so widening the brand list costs nothing while lengthening the prompt list does.
Sizing a request
A request's answers are generated alongside each other rather than one after the other, so asking for more answers costs credits but not proportionally more time. The caps are the ones the service enforces: up to 5 runs on a rank check, up to 5 discovery prompts, and a report bounded by answers — prompts × runs must be at most 10, so 10 prompts at 1 run each is fine while 4 prompts at 3 runs each is a 400.
For tracking wider than one request allows, run several smaller requests on a schedule and store the results, rather than trying to fit everything into one call.
How long a request takes
These routes take seconds to minutes, not milliseconds. Typical times from live traffic:
/askand/mentions(one answer): usually 20–45 seconds. With a country other than the US, and on Meta AI and Gemini, usually 40–100 seconds, and up to about 3 minutes./ai-rankand/prompt-discovery(several answers): 30–55 seconds for a 2-run rank check, a little longer with more answers, and up to about 3 minutes with a country other than the US, or on Meta AI and Gemini./visibility-report(up to 10 answers): 40–80 seconds, and longer when demand is high or with a country other than the US, or on Meta AI and Gemini: up to about 3 minutes.- Several assistants in one request (
providers): longer than one, up to about 3 minutes with a country other than the US, or with Meta AI or Gemini among them.
These routes take no timeout parameter, so set your HTTP client timeout instead: at least 210 seconds for /ask and /mentions, 230 seconds for /ai-rank and /prompt-discovery, and 230 seconds for /visibility-report. Many HTTP clients and serverless platforms default to 30 seconds or less, which cuts off a normal answer. One API key runs 4 requests here at once, whichever assistants they ask; more than that wait their turn for as long as the request's own time limit (about 250 seconds) leaves room for the answer, so a burst gets slower answers, not errors. When you send more than 4 at once, set your client timeout to 250 seconds so a waiting request is not cut off; one whose limit runs out while waiting gets a 503 time_limit, not billed.
Every response carries a notes array. It is where a country that could not be served, runs that could not be completed, or details the answer did not show announce themselves.
What this API does not return
- A way to turn web search off. The assistants offer no such setting, so
webSearchisautooron(some takeautoonly). The exception is a Duck.ai model marked no web search, which never searches. ReadusedWebSearchfor what it actually did. - A temperature or system prompt to pick, or a model except on Duck.ai. These are the answers people see, not API completions; only Duck.ai lets you choose the model, with
model.modelreports what the answer stated, and is null when it stated nothing — it is never guessed. - The searches behind every answer. Most answers list them; some do not, and then
searchQueriesandretrievedPagesare null rather than empty, andnotessays so. - Reproducibility. The same prompt gives different answers minutes apart. Use runs and the aggregate figures instead.
- Traffic, spend or click data. Nothing here measures how many people saw an answer; it measures what the assistants answer.
Alongside the search engines
Where you rank in AI answers is a different question from where you rank in search results, and the two move independently. For the classic side, the SERP API covers Google, Bing and DuckDuckGo with rank checks at one credit a check.