web

Answer a question from live web search results, with the sources the answer was grounded in.

Searches the web for the question and returns an engine-written answer plus the source pages it was grounded in (title, url, passage). Not a result list — use web.search for that. include_domains / exclude_domains / time_range route to an engine that supports them.

Fixed price: 1.1 credits per successful call, whichever provider serves it.

post/v2/ops/web.answer

Request

  • Base URL
    https://api.agentkey.app
  • URL
    https://api.agentkey.app/v2/ops/web.answer
  • Auth
    HTTP bearer

Request body

countrystring

ISO 3166-1 alpha-2 country code to bias the search, e.g. US, CN.

exclude_domainsstring[]

Exclude sources from these domains (routes to an engine that supports it).

fieldsstring[]

Projection: keep only these dotted paths of data, e.g. ["items.id", "items.text"].

include_domainsstring[]

Restrict sources to these domains (routes to an engine that supports it).

include_rawboolean

Attach the raw upstream payload as raw (not a stable contract; truncated above 256 KB).

langstring

BCP 47 language tag for the answer and the sources, e.g. en, zh-Hans.

providerstring

Shorthand for routing.only = [provider].

querystring required

The question, in natural language.

time_range'day' | 'week' | 'month' | 'year' | 'all'

Only ground the answer in pages published within this window.

Response

Success envelope

credits_chargednumber required

Credits charged for this call (the method's fixed price).

opstring required

Method name.

op_versioninteger required

Method version that served the call.

providerstring required

Provider that actually served the call.

rawunknown
raw_truncatedboolean
request_idstring required

Correlation id; quote it in support requests.

took_msinteger required
unsupported_fieldsstring[] required

Output paths this provider structurally does not supply; such fields are null for a different reason than 'missing on this record'.

Changes

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