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

[Answer](/api-reference/answer) returns a written `answer` grounded in real-time, trusted data that's often not readily crawlable on the internet. It takes the [same request body as Search](/api-reference/search-v3) and adds a synthesized `answer` alongside the Tako cards and web results that back it. Use it to ground your other response sources and keep what you derive from LLMs or web search consistent with what's displayed in Tako cards — for example, grounding an Nvidia stock-price analysis with Tako's up-to-date pricing card.

<Tip>
  **Only need the underlying cards and web results?** Use [Search](/api-reference/search-v3) — the same request body, without the synthesized `answer`.
</Tip>

Each card in the response carries the information you need to ground and attribute the answer:

<div className="my-8 space-y-1">
  <div><b>Data Description:</b> A natural language description of the data and visual elements included in the card (including last data point)</div>
  <div><b>Sources:</b> A list of sources, including a description of the source</div>
  <div><b>Methodology:</b> Methodology information for data present in the card</div>
  <div><b>Static Image:</b> A link to a static image of the card</div>
</div>

## Example

<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": "What is the weather in San Francisco?"
      }'
    ```
  </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="What is the weather in San Francisco?"))
    print(response.answer)
    for card in response.cards or []:
        print(card.title, card.webpage_url)
    ```
  </Tab>
</Tabs>

<Accordion title="Example API Response">
  <p>
    The following is an example response for a Weather Card from Tako. `cards[0]` is the lead card — the best one to show alongside the answer.
  </p>

  ```json theme={null}
  {
    "answer": "It's currently 52°F in San Francisco and feels like 52°F, with partly cloudy skies. Today's high is 54°F and the low is 50°F; the rest of the week is expected to be mostly clear with highs around 53–55°F.",
    "cards": [
      {
        "card_id": "mA-C6b48zxyU3G33JJdO",
        "title": "San Francisco, CA Weather Metrics",
        "description": "This card displays the weather forecast for San Francisco, CA for today, June 20, 2026, 08:00 PM. Currently, it's 52°F and feels like 52°F. The high for today is 54°F and the low is 50°F. The weather is expected to be partly cloudy.",
        "webpage_url": "https://tako.com/card/mA-C6b48zxyU3G33JJdO/",
        "image_url": "https://tako.com/api/v1/get_image/mA-C6b48zxyU3G33JJdO/",
        "embed_url": "https://tako.com/embed/mA-C6b48zxyU3G33JJdO/",
        "sources": [
          {
            "source_name": "NOAA National Weather Service",
            "source_description": "The National Weather Service (NWS) is an agency of the United States federal government tasked with providing weather forecasts, warnings of hazardous weather, and other weather-related products. It is part of the National Oceanic and Atmospheric Administration (NOAA).",
            "source_index": "tako"
          }
        ],
        "methodologies": [
          {
            "methodology_name": "Data Collection",
            "methodology_description": "This weather visualization utilizes raw meteorological data from NOAA's National Weather Service (NWS), sourced directly from NWS APIs through their public-facing weather.gov data services. No statistical adjustments or data transformations were applied to the raw NWS datasets."
          }
        ],
        "source_indexes": [
          "tako"
        ]
      }
    ],
    "web_results": [],
    "request_id": "f20f965b-6bbd-40df-b50b-a8861f34df24"
  }
  ```
</Accordion>

## Choosing sources

By default Answer grounds in **both** Tako's curated knowledge graph and the live web. Pass `sources` to control this — 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):

* omit `sources` *(equivalent to `{ "data": {}, "web": {} }`)* — both (default).
* `{ "data": {} }` — grounded in Tako's curated knowledge graph only.
* `{ "web": {} }` — grounded in the live web only.

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 in the response). The curated-data source also supports `defer_data_retrieval`.

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