> ## 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={<>A synthesized response, supported by proprietary licensed partners and the web to answer any question. Returns a written response as well as the data retrieval you would get from <a href="/documentation/integrating-tako/search/overview">search</a>.</>} 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. |
| **[Retrieval Agent](/documentation/integrating-tako/agent/retrieval)** | 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

Each of these is the same call shown above with a different query. Only the last one takes a parameter you haven't seen yet.

**Answer a question mid-conversation.** A support bot or assistant hits a data question it can't answer from its own context, and one call returns finished prose plus the cards that back it — no retrieval to orchestrate.

`"How did the S&P 500 do this week?"`

**Keep generated content current.** Re-run the same query on a schedule and the prose refreshes with the data, so a page's words and its numbers never drift apart.

`"Latest US CPI, year over year"`

**Attribute every claim.** Read `card.sources` and `card.methodologies` on each returned card to cite the answer, so a reader can check it rather than trust it.

`"Nvidia revenue growth"`

**Ground in curated data only.** Pass `sources` to skip the web and answer from Tako's licensed data alone — the right choice when a web result would weaken an answer rather than strengthen it.

```python theme={null}
response = client.answer(SearchRequest(query="United States military expenditure", sources={"data": {}}))
```

<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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.