Skip to main content
POST
Answer

Notes

  • To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
  • Answer retrieves the same results as Search and adds a written answer grounded in them. It takes the same request body as Search — the response adds the synthesized answer alongside the cards and web results.
  • Use Answer when you want prose to show a user; use Search when you only need the underlying cards and web results.
Answer replaces the legacy Grounding endpoint. New integrations should use POST /v1/answer.

Choosing sources

sources controls where the answer is grounded — an object whose keys are the sources to ground in. A source is used only if its key is present; omit sources to use the default (both sources, 5 results each):
  • { "data": {} } — grounded in Tako’s curated knowledge graph.
  • { "web": {} } — grounded in the live web.
  • { "data": {}, "web": {} } — both (same as omitting sources).
The legacy value tako is accepted as a synonym for data. Each source takes optional per-source settings: count (1–20, default 5) and include_contents (inline the underlying data).

Authorizations

X-API-Key
string
header
required

Body

application/json

Request for POST /api/v1/answer.

query
string
required

Natural language search query.

Minimum string length: 1
Pattern: \S
Example:

"Intel vs Nvidia headcount since 2013"

effort
enum<string>
default:fast

Search effort level: 'fast', 'instant', or 'deep'.

Available options:
fast,
instant,
deep
sources
Sources · object

Per-source settings. The search includes an index only if its key is present. Omit it and Tako searches data and web with no counts set. Tako accepts the legacy key 'tako' as a synonym for 'data'.

location
GeoLocation · object | null

Optional coordinates of the end user. Resolves the location for implicit-location queries (for example, weather) and, when timezone is absent, the timezone Tako renders preview images in. An explicit location in the query overrides these coordinates.

country_code
string
default:US

ISO 3166-1 alpha-2 country code for localization.

locale
string
default:en-US

BCP-47 locale tag for language and formatting.

timezone
string | null

IANA timezone (for example, 'America/New_York') Tako renders preview images in. Defaults to the zone at location when you send coordinates. Card text keeps each surface's own timezone.

output_settings
AnswerOutputSettings · object | null

Settings that control the response shape.

Applies to POST /v3/search only. Return follow-up query suggestions in related. Omit this field to disable them. The value sets the maximum number of suggestions, from 1 to 20. POST /v1/answer accepts this field but ignores it: the answer response has no related field.

Required range: 1 <= x <= 20
output_schema
Output Schema · object | null

JSON Schema for structured output. Tako fills it from the same evidence it uses to write answer, and returns it in structured_output. Requires effort 'fast' or 'deep'; on 'instant' the request returns 400. Supported subset: the object, array, string, number, integer, and boolean types, plus items, enum, required, description, and additionalProperties: false. A type may be nullable as ["number", "null"], which is how you let Tako signal 'no evidence' rather than filling a zero. title, examples, format, and default are accepted and ignored — they constrain nothing. Caps: 16KB total, depth 5, 64 properties, 512 characters per description. Violations return 400. If Tako can't fill the schema, structured_output is absent and structured_output_error says why — the answer and the cards still return.

Response

Synthesized answer grounded in Tako results, web results, or both

Response for POST /api/v1/answer: the synthesized answer plus the retrieval behind it.

answer
string
required

Synthesized text answer.

request_id
string
required
cards
TakoCard · object[]

Tako cards backing the answer; cards[0] is the lead card — the best one to show alongside the answer.

web_results
WebResult · object[]
usage
Usage · object | null

Usage for one metered request. total_cost_usd is always present (the total quoted charge). compute and data are the additive breakdown; each appears only where it applies. total_cost_usd always equals the sum of the components that appear.

structured_output
Structured Output · object | null

Your output_schema, filled. Absent when the request carried no output_schema, or when Tako couldn't fill it — check structured_output_error.

structured_output_error
AnswerStructuredOutputError · object | null

Why structured_output is absent. Present only on a structured request that failed.