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

# Quickstart

export const AgentPromptCard = ({title, description, agents, children}) => {
  const marks = {
    claude: <svg key="claude" role="img" aria-label="Claude" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#D97757" className="h-5 w-5"><path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" /></svg>,
    cursor: <svg key="cursor" role="img" aria-label="Cursor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fillRule="evenodd" className="h-5 w-5"><path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z" /></svg>,
    chatgpt: <svg key="chatgpt" role="img" aria-label="ChatGPT" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fillRule="evenodd" className="h-5 w-5"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z" /></svg>
  };
  const shown = (agents === undefined ? ['claude', 'cursor', 'chatgpt'] : agents).map(key => marks[key]).filter(Boolean);
  const headerPad = shown.length ? `${1.75 * shown.length + 1.25}rem` : '0';
  return <div className="relative mt-4 rounded-xl border border-zinc-950/10 dark:border-white/10 bg-zinc-50/60 dark:bg-white/[0.03] px-4 pt-3 pb-1">
      {shown.length > 0 && <div className="absolute top-3.5 right-4 flex items-center gap-2 text-zinc-900 dark:text-zinc-100">
          {shown}
        </div>}
      <div className="text-sm font-semibold text-zinc-900 dark:text-zinc-100" style={{
    paddingRight: headerPad
  }}>{title}</div>
      <div className="mt-1 text-sm text-zinc-600 dark:text-zinc-400" style={{
    paddingRight: headerPad
  }}>{description}</div>
      <div style={{
    marginTop: '-2px',
    marginBottom: '-14px'
  }}>
        {children}
      </div>
    </div>;
};

export const WhyTakoCTA = ({description, href}) => <p className="mt-2 text-lg prose prose-gray dark:prose-invert [&>*]:[overflow-wrap:anywhere]">
    {description ? `${description} ` : null}<a href={href}>Why do developers use Tako? →</a>
  </p>;

<WhyTakoCTA description="Get a Tako API key and build with Tako's four core APIs — Agent, Answer, Search, and Contents — over real-time, source-grounded data." href="/documentation/getting-started/what-is-tako/overview" />

<Note>
  For AI agents: Use [llms.txt](https://docs.tako.com/llms.txt) for a full index of all documentation.
</Note>

## Add Tako to your agent

The fastest way to build with Tako. Paste one prompt into your coding agent to wire Tako into an existing project, or create a new Tako agent from the console.

<div className="agent-start-tabs">
  <Tabs>
    <Tab title="Build a Tako agent from scratch">
      <Card title="Create a Tako-powered agent" icon="wand-magic-sparkles" href="https://tako.com/console/build" horizontal>
        Follow the agent quickstart in the console. It generates a prompt for your coding agent in seconds to build with the Tako APIs.
      </Card>
    </Tab>

    <Tab title="Add to your agent">
      <AgentPromptCard title="Add Tako to an existing agent" description="Paste this prompt into Claude Code, Cursor, or any coding agent. It reads the docs, asks you the right questions, evaluates where Tako fits in your stack, and wires it in with best practices.">
        ```text theme={null}
        I want to integrate Tako into this project. Tako serves live financial, macroeconomic, sports, and company data as citation-backed answers and interactive charts. Its surfaces: Search (ranked knowledge cards with charts), Answer (one grounded, written answer), Contents (full data rows / page text), a deep-research Agent, a Data Graph (free coverage checks), and chart creation from my own data.

        Step 1: Read the docs before changing anything.
        - Fetch https://docs.tako.com/llms.txt. It indexes every documentation page.
        - From that index, read the quickstart plus the pages that match my stack and use case: the integration guide for my framework (OpenAI Responses, Anthropic tool calling, Vercel AI SDK, OpenAI-compatible), the MCP server page, and the relevant per-feature "for coding agents" references.

        Step 2: Ask me these questions one at a time and wait for my answers.
        1. What does this project/agent do, and what kinds of data questions should Tako handle for it? (financial, macro, sports, company, web traffic…)
        2. What framework or runtime is it built on? (Vercel AI SDK, OpenAI Agents SDK / Responses API, Anthropic API, LangChain, raw MCP client, plain backend, something else)
        3. Quick answers or deep research? Single grounded answers and searches are one call; the Agent API dispatches long-running multi-step research.
        4. Is a search or data tool already wired in (Exa, Tavily, Brave, built-in web search)? Should Tako replace it or run alongside it?
        5. Do I need the data itself (full rows, CSV export via Contents) or charts built from my own data?
        6. Where do secrets live in this project? Assume the key is TAKO_API_KEY unless I say otherwise.

        Step 3: Evaluate and propose before writing code.
        - Recommend the integration surface that fits my answers, and say why: the hosted MCP server (https://mcp.tako.com/mcp: zero glue code, connection-level auth, opt-in tools via ?tools=) vs. the Python/TypeScript SDKs or REST API (typed control, streaming, retries) vs. a provider-native tool-calling guide from the docs. Prefer the simplest surface that covers the use case.
        - Show me a short plan first (files to change, tools to expose, prompts to update) and wait for my OK.

        Step 4: Integrate with best practices.
        - Wire Tako in the idiomatic way for my framework. Never hardcode the key. Read it from the environment.
        - Add tool-choice guidance to the agent's system prompt: Answer for one specific data question that needs a conclusion; Search fanned out in parallel, one entity + one metric per query, when the agent needs the evidence; the Data Graph / available-data check as a free pre-check of what coverage exists; Contents for the full rows behind an exportable result; the Agent API for questions that need figuring out.
        - Do not remove or rename existing tools unless I chose to replace one. If Tako replaces a provider, migrate its call sites and prompts, and tell me exactly what changed.

        Step 5: Verify.
        - Make one free coverage-check call (available data / Data Graph) and one real search, show me the results, and summarize what you integrated and why.

        If TAKO_API_KEY is not set, tell me to sign up at https://tako.com (free credits included) and create a key at https://tako.com/console/api-keys.
        ```
      </AgentPromptCard>
    </Tab>
  </Tabs>
</div>

## Installation

Tako ships official SDKs for **Python** and **TypeScript / JavaScript**. Every endpoint is also a single `POST`, so any other language works over the [REST API](#make-your-first-request) directly.

<CodeGroup>
  ```bash Python theme={null}
  pip install tako-sdk
  ```

  ```bash TypeScript / JavaScript theme={null}
  npm install tako-sdk
  ```

  ```bash Vercel AI SDK theme={null}
  npm install @takoviz/ai-sdk ai @ai-sdk/openai
  ```

  ```bash MCP theme={null}
  https://mcp.tako.com/mcp
  ```
</CodeGroup>

For one-click MCP setup in Cursor, VS Code, and Kiro, see the [MCP server](/documentation/integrations/mcp-server) page. For ChatGPT and Codex, install from the [OpenAI plugin directory](/documentation/integrations/chatgpt).

## Get your API key

<Steps>
  <Step title="Sign up for free credits">
    New to Tako? [Sign up](https://tako.com) and get free credits to start building.
  </Step>

  <Step title="Create an API key">
    Create an API key from your [Tako console](https://tako.com/console/api-keys).
  </Step>

  <Step title="Store it as an environment variable">
    Store it as an environment variable — for example `TAKO_API_KEY` — rather than hardcoding it.
  </Step>
</Steps>

## Pick the right tool

Each API is a single call over the same curated, real-time data. Here's what each one is for.

<CardGroup cols={2}>
  <Card title="Answer" icon="comment" href="/documentation/integrating-tako/answer/overview">
    You want the question answered, not the data.

    `"Should I wear a jacket in New York this week?"`

    **Returns** — a written answer, with the sources behind it.
  </Card>

  <Card title="Search" icon="magnifying-glass" href="/documentation/integrating-tako/search/overview">
    You want the data itself, and you'll do the rest.

    `"Nvidia quarterly revenue"`

    **Returns** — knowledge cards and web results, no LLM in the loop.
  </Card>

  <Card title="Contents" icon="table" href="/documentation/integrating-tako/contents/overview">
    You have a result already, and you need what's under it.

    `"https://tako.com/card/…"`

    **Returns** — that card's rows as CSV, or a web page as clean text.
  </Card>

  <Card title="Agent" icon="robot" href="/documentation/integrating-tako/agent/overview">
    The question needs real work before anything can answer it.

    `"Which of the 20 largest US semiconductor companies grew revenue fastest since 2015?"`

    **Returns** — a cited brief from an asynchronous research job.
  </Card>
</CardGroup>

Already have your own data? **[Thin-Viz](/documentation/integrating-tako/chart-creation/overview)** turns it into interactive, embeddable Tako cards.

Want to see what data is available? The **[Data Graph](/documentation/integrating-tako/data-graph/overview)** lets you explore the entities and metrics Tako covers, then pin exactly what you find into Search. It consumes no credits, so it's the cheapest way to find out what Tako has before you query it.

## Make your first request

Pick the use case closest to what you're building. Each is a single call over the same real-time data — the code and the live result below both change to match.

<Tabs>
  <Tab title="Stock prices">
    **Search** returns fast, structured knowledge cards for a query — no LLM in the loop. Ideal for pulling live prices you render or compute on yourself.

    <Accordion title="Code" defaultOpen={true}>
      <CodeGroup>
        ```bash cURL theme={null}
        curl -X POST https://tako.com/api/v3/search \
          -H "X-API-Key: $TAKO_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "query": "What are today'\''s top performing stocks?"
          }'
        ```

        ```python 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)

        results = client.search(SearchRequest(query="What are today's top performing stocks?"))
        for card in results.cards or []:
            print(card.title, card.webpage_url)
        ```

        ```typescript TypeScript theme={null}
        import { Tako } from "tako-sdk";

        const tako = new Tako({ apiKey: process.env.TAKO_API_KEY! });

        const results = await tako.search({ query: "What are today's top performing stocks?" });
        for (const card of results.cards ?? []) {
          console.log(card.title, card.webpage_url);
        }
        ```
      </CodeGroup>
    </Accordion>

    <Accordion title="Result" defaultOpen={true}>
      <p>A knowledge card — a full data series with its sources, ready to render or compute on.</p>

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

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

  <Tab title="Sports">
    **Answer** returns one written, source-attributed answer plus the Tako cards that back it — in a single call, no retrieval to wire up.

    <Accordion title="Code" defaultOpen={true}>
      <CodeGroup>
        ```bash cURL theme={null}
        curl -X POST https://tako.com/api/v1/answer \
          -H "X-API-Key: $TAKO_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "query": "How has Luka Dončić'\''s points per game trended this season?"
          }'
        ```

        ```python 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 has Luka Dončić's points per game trended this season?"))
        print(response.answer)
        for card in response.cards or []:
            print(card.title, card.webpage_url)
        ```

        ```typescript TypeScript theme={null}
        import { Tako } from "tako-sdk";

        const tako = new Tako({ apiKey: process.env.TAKO_API_KEY! });

        const response = await tako.answer({ query: "How has Luka Dončić's points per game trended this season?" });
        console.log(response.answer);
        for (const card of response.cards ?? []) {
          console.log(card.title, card.webpage_url);
        }
        ```
      </CodeGroup>
    </Accordion>

    <Accordion title="Result" defaultOpen={true}>
      <p>
        <strong>Answer:</strong> Luka Dončić is averaging 33.5 points per game this season. His monthly PPG has fluctuated — 38.2 in October, 32.5 in November, 31.0 in December, 34.0 in January, 27.0 in February, and back up to 37.5 in March.
      </p>

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

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

  <Tab title="Research">
    The **[Answer Agent](/documentation/integrating-tako/agent/answer)** is an asynchronous deep-research agent for multi-step questions — resolving a cohort, then ranking it across many entities — returning cited prose. Dispatch a run, then poll until it's done. Want the cards rather than the write-up? Use the **[Retrieval Agent](/documentation/integrating-tako/agent/retrieval)** (`/v1/agent/retrieval/runs`) instead.

    <Accordion title="Code" defaultOpen={true}>
      <CodeGroup>
        ```bash cURL theme={null}
        # 1. Dispatch — returns 202 with {"run_id": "...", "status": "queued"}.
        curl -X POST https://tako.com/api/v1/agent/answer/runs \
          -H "X-API-Key: $TAKO_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "query": "Which of the Magnificent Seven tech companies has grown revenue the fastest over the past five years?"
          }'

        # 2. Poll with the run_id until status is "completed" or "failed".
        curl https://tako.com/api/v1/agent/answer/runs/RUN_ID \
          -H "X-API-Key: $TAKO_API_KEY"
        ```

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

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

        run = client.agent.answer.run(
            AnswerAgentRunRequest(query="Which of the Magnificent Seven tech companies has grown revenue the fastest over the past five years?")
        )

        # Runs can take minutes — poll on a short interval until terminal.
        while run.status not in ("completed", "failed"):
            time.sleep(3)
            run = client.agent.answer.get(run.run_id)

        print(run.result.answer)
        ```

        ```typescript TypeScript theme={null}
        import { Tako } from "tako-sdk";

        const tako = new Tako({ apiKey: process.env.TAKO_API_KEY! });

        let run = await tako.agent.answer.run({
          query: "Which of the Magnificent Seven tech companies has grown revenue the fastest over the past five years?",
        });

        // Runs can take minutes — poll on a short interval until terminal.
        while (run.status !== "completed" && run.status !== "failed") {
          await new Promise((r) => setTimeout(r, 3000));
          run = await tako.agent.answer.get(run.run_id);
        }

        console.log(run.result?.answer);
        ```
      </CodeGroup>
    </Accordion>

    <Accordion title="Result" defaultOpen={true}>
      <p>
        <strong>Answer:</strong> NVIDIA grew revenue the fastest over the past five years — from \$16.7B in 2020 to \$215.9B in 2025, a five-year CAGR of 66.9%. The rest of the Magnificent Seven trailed well behind: Tesla at 24.6%, Meta at 18.5%, Alphabet at 17.2%, Microsoft at 14.5%, Amazon at 13.2%, and Apple at 8.7%.
      </p>

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

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

  <Tab title="Build an agent">
    Prime an agent with **exact, source-grounded numbers**: **Search** finds the card, then **Contents** downloads the exact series behind it as CSV — so your agent computes on real values instead of prose. Those two calls are the whole loop.

    Resolving through the **Data Graph** first is an optional upgrade, shown as step 1 below. It trades one extra call for deterministic retrieval: instead of hoping a text query lands on the right card, you resolve the entity and metric to node ids and pin them, so Search can only return cards built from exactly those nodes. Graph calls consume no credits.

    <Note>
      **Want to skip it?** Start at step 2 and send just the query — `{"query": "Palantir federal contract obligations"}` finds this same card without any graph calls. Drop the whole `sources` block when you do: `strict: true` requires a non-empty `node_ids` list and returns a `400` on its own.
    </Note>

    <Accordion title="Code" defaultOpen={true}>
      <CodeGroup>
        ```bash cURL theme={null}
        # 1. OPTIONAL: resolve the entity and the metric to graph node ids (no credits).
        ENTITY_ID=$(curl -s -G https://tako.com/api/v1/graph/search \
          -H "X-API-Key: $TAKO_API_KEY" \
          --data-urlencode "q=Palantir Technologies" \
          --data-urlencode "types=entity" | jq -r '.results[0].id')

        METRIC_ID=$(curl -s -G https://tako.com/api/v1/graph/search \
          -H "X-API-Key: $TAKO_API_KEY" \
          --data-urlencode "q=federal contract obligations" \
          --data-urlencode "types=metric" | jq -r '.results[0].id')

        # 2. Pin both ids into Search. strict returns only cards matching a pinned node.
        CARD_URL=$(curl -s -X POST https://tako.com/api/v3/search \
          -H "X-API-Key: $TAKO_API_KEY" \
          -H "Content-Type: application/json" \
          -d "{
            \"query\": \"Palantir federal contract obligations\",
            \"sources\": {\"data\": {\"node_ids\": [\"$ENTITY_ID\", \"$METRIC_ID\"], \"strict\": true}}
          }" | jq -r '.cards[0].webpage_url')

        # 3. Contents downloads the exact numbers behind the card.
        curl -X POST https://tako.com/api/v1/contents \
          -H "X-API-Key: $TAKO_API_KEY" \
          -H "Content-Type: application/json" \
          -d "{\"url\": \"$CARD_URL\", \"mode\": \"inline\"}"
        ```

        ```python Python theme={null}
        import os
        from tako import Configuration, SearchRequest, Sources, DataSourceSettings, ContentsRequest, GraphNodeType
        from tako.lib import Tako

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

        # 1. OPTIONAL: resolve the entity and the metric to graph node ids (no credits).
        entity = client.graph_search("Palantir Technologies", types=[GraphNodeType.ENTITY]).results[0]
        metric = client.graph_search("federal contract obligations", types=[GraphNodeType.METRIC]).results[0]

        # 2. Pin both ids into Search. strict returns only cards matching a pinned node.
        results = client.search(
            SearchRequest(
                query="Palantir federal contract obligations",
                sources=Sources(
                    data=DataSourceSettings(node_ids=[entity.id, metric.id], strict=True)
                ),
            )
        )
        card = results.cards[0]

        # 3. Contents downloads the exact numbers behind it — feed the CSV to your agent.
        contents = client.contents(ContentsRequest(url=card.webpage_url, mode="inline"))
        print(contents.contents[0].data)
        ```

        ```typescript TypeScript theme={null}
        import { Tako, GraphNodeType } from "tako-sdk";

        const tako = new Tako({ apiKey: process.env.TAKO_API_KEY! });

        // 1. OPTIONAL: resolve the entity and the metric to graph node ids (no credits).
        const entity = (await tako.graphSearch({ q: "Palantir Technologies", types: [GraphNodeType.Entity] })).results[0];
        const metric = (await tako.graphSearch({ q: "federal contract obligations", types: [GraphNodeType.Metric] })).results[0];

        // 2. Pin both ids into Search. strict returns only cards matching a pinned node.
        const results = await tako.search({
          query: "Palantir federal contract obligations",
          sources: { data: { node_ids: [entity.id, metric.id], strict: true } },
        });
        const card = results.cards![0];

        // 3. Contents downloads the exact numbers behind it — feed the CSV to your agent.
        const contents = await tako.contents({ url: card.webpage_url!, mode: "inline" });
        console.log(contents.contents![0].data);
        ```
      </CodeGroup>
    </Accordion>

    <Note>
      If you do pin, resolve the ids at request time as above — never hardcode them. Ids are not durable across knowledge-graph rebuilds; Search silently skips one that no longer resolves, and with `strict: true` that leaves you with no cards.
    </Note>

    <Accordion title="Result" defaultOpen={true}>
      <p><strong>Step 1, optional</strong> — <strong>Graph Search</strong> resolves each name to a node: an <code>ent::</code> id for the company, an <code>mt::</code> id for the metric. Two calls, one <code>results\[0]</code> each:</p>

      ```json theme={null}
      // q=Palantir Technologies&types=entity
      {"id": "ent::palantir_technologie::1d41d233", "type": "entity", "name": "Palantir Technologies Inc.", "subtype": "Companies", "label": "ORG"}

      // q=federal contract obligations&types=metric
      {"id": "mt::federal_contract_obl::1e937180", "type": "metric", "name": "Federal Contract Obligations", "label": "METRIC"}
      ```

      <p><strong>Search</strong>, pinned to those two nodes, returns the card they describe — Palantir's federal contract obligations by fiscal year. The plain query returns this same card; pinning is what guarantees it:</p>

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

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

      <p><strong>Contents</strong> hands your agent the exact series behind it, as CSV — ready to compute on:</p>

      ```csv theme={null}
      Timestamp,Federal Contract Obligations (USD)
      2008-10-01 00:00:00+00:00,135211.06
      2009-10-01 00:00:00+00:00,4378216.96
      2010-10-01 00:00:00+00:00,5801023.5
      ...
      2024-10-01 00:00:00+00:00,541197885.14
      2025-10-01 00:00:00+00:00,1020566208.97
      2026-10-01 00:00:00+00:00,896657523.63
      ```
    </Accordion>
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Developer Playground" href="https://tako.com/playground">
    No setup required. Try a simple query like “Nvidia earnings” or a long-form prompt to see what Tako returns.
  </Card>

  <Card title="What is Tako?" href="/documentation/getting-started/what-is-tako/overview">
    Learn more about Tako’s key concepts and functionality.
  </Card>
</CardGroup>


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