> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tako.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Answer

export const CodingAgentCTA = ({description, href}) => <p className="mt-2 text-lg prose prose-gray dark:prose-invert [&>*]:[overflow-wrap:anywhere]">
    {description} Building with a coding agent?{" "}
    <a href={href}>Give your agent the full reference →</a>
  </p>;

export const PlaygroundButton = ({href = "https://tako.com/playground", label = "Try in Playground"}) => <div className="float-right not-prose ml-4 -mt-12">
    <a href={href} target="_blank" rel="noopener noreferrer" className="inline-flex items-center gap-1.5 rounded-full border border-gray-200 dark:border-white/15 bg-white dark:bg-white/5 px-3 py-1.5 text-sm font-medium text-gray-700 dark:text-gray-200 no-underline transition-colors hover:border-gray-300 hover:bg-gray-50 dark:hover:bg-white/10">
      <svg viewBox="0 0 24 24" aria-hidden="true" className="h-3.5 w-3.5 fill-current">
        <path d="M8 5v14l11-7z" />
      </svg>
      {label}
    </a>
  </div>;

<CodingAgentCTA description="One synthesized, source-attributed answer — the best of Tako's curated data and the live web — with the cards and web results that back it." href="/documentation/integrating-tako/answer/for-coding-agent" />

## Capabilities

Answer is the **fastest way to get a written, source-attributed answer** from Tako. It runs the same retrieval as [Search](/documentation/integrating-tako/search/overview) — Tako's structured knowledge cards **and** the live web — and **synthesizes the best answer from both** into one response, returned in a single synchronous call you can use inline.

<CardGroup cols={1}>
  <Card title="One fast, synchronous call" icon="bolt">
    A single request returns a finished `answer` — no dispatching, polling, or retrieval to orchestrate. Fast enough to drop inline into a chat, an assistant, or an agentic loop.
  </Card>

  <Card title="Built on Tako Search" icon="magnifying-glass">
    Answer grounds on the same retrieval as [Search](/documentation/integrating-tako/search/overview) — structured knowledge cards plus the live web — then writes the answer over them, so you get prose *and* the results that produced it in one call.
  </Card>

  <Card title="Ready to show, with receipts" icon="circle-check">
    Every answer ships with the Tako `cards` **and web results** that back it — named sources and methodology — so it's citable, auditable, and safe to drop straight into a user-facing surface.
  </Card>
</CardGroup>

Choosing between Tako's surfaces (see the [full comparison](/documentation/integrating-tako/agent/overview#choosing-a-tako-surface)):

| Surface                                                          | What it's for                                                                 |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **[Answer](/api-reference/answer)**                              | A written, source-attributed answer in one call.                              |
| **[Search](/documentation/integrating-tako/search/overview)**    | Fast, parallel retrieval of structured data and cards, no synthesized answer. |
| **[Answer Agent](/documentation/integrating-tako/agent/answer)** | Deep research synthesizing a cited answer backed by visualizations.           |
| **[Search Agent](/documentation/integrating-tako/agent/search)** | Multi-step research returning schema-defined structured data and cards.       |

## Example

<PlaygroundButton />

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://tako.com/api/v1/answer \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "How have Nvidia and AMD headcount changed since 2013?"
      }'
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip install tako-sdk
    ```

    ```python theme={null}
    import os
    from tako import Configuration, SearchRequest
    from tako.lib import Tako

    config = Configuration()
    config.api_key["apiKey"] = os.environ["TAKO_API_KEY"]
    client = Tako(config)

    response = client.answer(SearchRequest(query="How have Nvidia and AMD headcount changed since 2013?"))
    print(response.answer)
    for card in response.cards or []:
        print(card.title, card.webpage_url)
    ```
  </Tab>
</Tabs>

<Accordion title="Example Result" defaultOpen={true}>
  <p>
    Answer: "Nvidia has grown to about 36,000 full-time employees as of the end of 2024 — up roughly 309% from about 8,800 in 2013. AMD reached about 28,000 over the same period, giving Nvidia both the larger workforce and the faster growth of the two."
  </p>

  <iframe width="100%" style={{backgroundColor: '#ffffff'}} src="https://tako.com/embed/geYufvSx04pyWX7GpHeR/?dark_mode=false" scrolling="no" frameborder="0" className="dark:hidden" />

  <iframe width="100%" style={{backgroundColor: '#1A1D1F'}} src="https://tako.com/embed/geYufvSx04pyWX7GpHeR/?dark_mode=true" scrolling="no" frameborder="0" className="hidden dark:block" />
</Accordion>

## Use cases

<AccordionGroup>
  <Accordion title="Answering questions in a chat assistant">
    Return one synthesized, source-attributed answer in a single call.

    ```python theme={null}
    response = client.answer(SearchRequest(query="What is the weather in San Francisco?"))
    print(response.answer)
    ```
  </Accordion>

  <Accordion title="Keeping generated content current">
    Re-run the same query to refresh prose that stays grounded in live data.

    ```python theme={null}
    response = client.answer(SearchRequest(query="Latest US CPI, year over year"))
    print(response.answer)
    ```
  </Accordion>

  <Accordion title="Attributing every claim">
    Use the backing cards' sources and methodology to cite the answer.

    ```python theme={null}
    response = client.answer(SearchRequest(query="Nvidia revenue growth"))
    for card in response.cards or []:
        print(card.title, card.sources)
    ```
  </Accordion>

  <Accordion title="Grounding in curated data only">
    Limit the answer to Tako's authoritative sources, skipping the web.

    ```python theme={null}
    response = client.answer(SearchRequest(query="Global military spending in 2024", sources={"data": {}}))
    ```
  </Accordion>
</AccordionGroup>

<Note>
  **Want the data behind a card as CSV?** Pass a card's URL to [Contents](/documentation/integrating-tako/contents/overview) to download its underlying data — or inline it here with `include_contents`.
</Note>

<Check>
  By consuming the answer and its grounding information, you can keep your content always up to date and accurate.
</Check>
