Apinoa Docs

AI Answers API

What ChatGPT, Gemini, Google AI Overviews, Google AI Mode and Naver's AI answer to a prompt, with every citation, source, product card and brand mention, in one answer type.

View raw .mdx

The AI Answers API asks an AI engine a question and returns the answer people are shown: the text, the sources it cites, the product and place cards, and the brands the engine itself marked. Every engine returns the same type, so tracking what ChatGPT says about a brand works the same way as tracking Google AI Mode.

curl -X POST "https://gateway.apinoa.com/v1/chatgpt/answer" \
  -H "x-api-key: $APINOA_API_KEY" -H "content-type: application/json" \
  -d '{"prompt": "What are the best running shoes for beginners?", "country": "US"}'

Engines

Every engine has one operation, answer.

EngineCountriesConversationPhotosUsually under
ChatGPTUS DE GB AT KR AU JP CA FR IT✓✓30 s
GeminiUS DE GB AT KR AU JP CA FR IT✓15 s
Google AI ModeUS✓35 s
Google AI OverviewsUS10 s
Naver AI TabKR✓40 s
Naver AI BriefingKR10 s

An answer takes seconds, not milliseconds. Allow up to 120 seconds per call.

Inputs

InputMeaning
promptthe question, as a person would type it (required)
countrythe market it is asked from. Each engine lists its countries above, and the first is the default
languagethe language to answer in (Google engines). The other engines answer in the prompt's language
conversationan earlier answer's conversation.id, to ask a follow-up in the same conversation
photosup to four photos to ask about, as https URLs or data:image/…;base64, URLs (ChatGPT)
includepage: also return the answer as a self-contained HTML page

Send the inputs as a JSON body with POST. An input an engine does not take is refused with 400 INVALID_PARAMS, and the message gives the reason. It is never silently ignored.

Outcomes

outcome says what the engine did:

  • answered: it answered.
  • noAnswer: it showed no answer for this prompt. Google shows an AI Overview for only some searches, and Naver shows a briefing for only some. The surrounding results are still returned in results, and the call is billed, because the page was read.
  • refused: it declined; its words are in text.
  • partial: it stopped early, with some text.

What Is the Same Everywhere

  • One type. Every engine returns an Answer. Facts only one engine has are in ext.
  • Text, markdown and blocks agree. text and markdown are rendered from blocks, and citations point at character ranges of text.
  • Sources, cited or not. sources lists everything the engine showed. cited tells the sources the answer links to from the ones it only read.
  • Mentions are the engine's own. mentions are the brands, products and places the engine itself marked. They are never guessed from the text.
  • Price. $0.0012 per answer.

Errors

The AI Answers API uses the same envelope and codes as the rest of the API. See Errors. An engine that does not answer in time returns 502 UPSTREAM_TIMEOUT. Failed calls are not billed.

Reference

  • Response Schema: every field of the answer
  • SERP API: the search engines, whose Google results carry the same AI Overview
  • Errors: every error code

On this page