SEO: AI visibility

Claude API answer with citations

Asks a Claude model through its API (not the consumer app) and returns its answer with citations: the result[0].items[] element with type: "message" holds the answer in sections[].text and its citations in sections[].annotations[] (each with url and title). Token counts are on result[0]. Numbers measured this way are API answers, which can differ from what the Claude app shows. A live answer can take up to 95 seconds; one that runs longer fails with an error and is not charged. An answer with no sources is a valid answer, not an error.

post/v1/data/seo/claude-api-answer

Request

  • Base URL: https://api.superagnt.com
  • URL: https://api.superagnt.com/v1/data/seo/claude-api-answer
  • Auth: API key in header Authorization

Request body

user_promptstring required

The question to ask the model.

model_name'claude-haiku-4-5' | 'claude-sonnet-4-5'

The model to ask: claude-haiku-4-5, claude-sonnet-4-5 (default claude-haiku-4-5).

max_output_tokensinteger

Cap on the answer's length in tokens, 16-2048 (default 1024). Web search can push a model slightly past it.

web_searchboolean

Let the model search the web and cite sources (default true). Citations are still not guaranteed.

force_web_searchboolean

Push the model to search the web before answering. Needs web_search; citations are still not guaranteed.

web_search_country_iso_codestring

Two-letter country code the web search runs from, e.g. 'US'.

Response

The Claude model's answer in result[0].items[] (type: "message"), with citations in its sections[].annotations[].

object required

Changes

No recorded changes to this operation across all 1 revision of this API.