Skip to main content
This page is a complete, self-contained reference for building against Tako’s Data Graph — and for the agentic pattern it enables: discover what data Tako has, ground your searches on it, and report what’s missing. It is written for coding agents (and developers in a hurry): every example runs after you supply an API key, every parameter is grounded in the live API, and the common mistakes are called out explicitly. For the auto-generated schemas, see the API reference (Graph Search, Graph Related, Graph Node); for a narrative introduction, see the Overview.

What the Data Graph does

Tako serves live financial, macroeconomic, and company data as embeddable knowledge-card charts through POST /v3/search. The graph endpoints tell you what data Tako actually has before you search — so you compose queries that hit, pin the exact nodes you resolved, and honestly report gaps.
  • Base URL: https://tako.com/api/
  • Auth: every endpoint on this page — including the graph endpoints — takes your API key in the X-API-Key request header. Create a key in the Tako console.
  • Cost: graph calls consume no credits. They are bounded by rate limits only: 180/minute and 10,000/day per account. Back off on 429 with jittered exponential retry.
  • Endpoints: GET /beta/graph/search (resolve a name to nodes), GET /beta/graph/related (explore what a node connects to), GET /beta/graph/node/{id} (confirm what an id refers to — occasional use).
The graph endpoints are beta. A returned node is a guide, not a guarantee — see Knowing what you don’t know for how to report coverage honestly.

Minimal working example

Resolve an entity, read its metrics, then run a search pinned to the resolved node. Complete after you set TAKO_API_KEY — no SDK required, the graph is plain HTTP.

Graph Search — resolve a name to nodes

GET /beta/graph/search resolves free text to entity and metric nodes. Decide up front whether you’re resolving a thing (entity) or a measure (metric) and pass the matching types — don’t mix them in one lookup.

Labels: disambiguating without filtering

Ambiguous names (“air china”, “apple”) resolve to a pile of nodes across types — a company can share its name with a country or a fruit. A label biases the ranking toward one entity category (label=ORG floats Air China the airline above China the country). It is a boost, not a filter — matching nodes rank higher, but off-label nodes still return. Use it to steer the top result, not to guarantee exclusivity.
  • Values: PERSON, ORG, GPE, LOC, PRODUCT, EVENT, LANGUAGE, MONEY, METRIC, STOCK_TICKER, WEBSITE. Sports teams are ORG.
  • Auto-detection: with no explicit label, Tako infers the entities in q and applies the matching boost; the labels it found come back in inferred_labels (empty list = inference ran, found nothing; absent = didn’t run).

Response

Results are ordered by a relevance + popularity blend. Fields that are null are omitted from the response, not sent as null. GET /beta/graph/related takes a node_id from Graph Search and returns everything it connects to, grouped by relation.
An unknown relation key returns 200 with empty items, not an error — so a typo’d rel:* key reads as “no relation.” Relation keys are per-node: read the overview to discover them, then drill.

Overview response (no relation)

An ordered relations[] list — named semantic edges first, then membership, data co-reference, and siblings. Empty groups are dropped.
Groups by kind:

Drill response (relation=<key>)

Items are in relation.itemsnot results. A node with no relations returns 200 with empty groups, not a 404.
  • Always pass q on big entities. Unfiltered, a big entity returns hundreds of items (total caps at 250 with total_capped: true — render as “250+”). q=revenue narrows and floats the right metrics (“Revenues”, “Revenue Per Employee”) to the top. Pagination ends at the cap — narrow with q to reach the tail.
  • Items are ranked by popularity, blended with match strength when q is set — read the top few, not the tail.
  • Every item carries an id — use it to hop (metric → its entities → their relations…) and to pin into search.
  • Enumerating a cohort (“Nvidia’s competitors”, “all NBA teams”, “the Magnificent Seven”): resolve the anchor entity → read its overview → pick the group by its key (a rel:* edge or members) → drill with limit=100 if total exceeds the preview. Members arrive as full nodes — feed them straight into per-member searches, no re-resolution. This replaces LLM-recalled member lists — the usual source of hallucinated comparisons — with a database read. Don’t treat a capped siblings group as a cohort: it’s the class namespace, not curated peers.

Graph Node — confirm what an id refers to

GET /beta/graph/node/{id} resolves a single id (from a search card, or from the other graph endpoints) to its full name, aliases, and description. 404 when the id doesn’t resolve. You’ll rarely need it — mostly to verify that a card was built from the entity you meant before you rely on it.

Grounding /v3/search — two levers, use both

  1. Query text (wording drives retrieval). Compose queries from the resolved node’s name, aliases, and description — so a metric aliased “inflation” answers an inflation question even when the user said “CPI”. Keep queries short and data-shaped (subject + measure + time). Analytical/causal phrasing (“how has X affected Y”) retrieves nothing — collect the series, do the analysis in your synthesis step.
  2. Pinned node ids (deterministic candidacy). Pass resolved ids in the request body:
Use text alone when you resolved intent but not a specific node; add pinned ids whenever you did resolve the exact metric/entity and want to force it in. Enforce grounding in code, not just the prompt — let your LLM write the wording, but guard what it emits:
Don’t deterministically concatenate "{node} {metric}" as the primary composer — it misses alias-named metrics and reads templated. Let the model compose from names + aliases; keep the concat as the fallback.

The agentic loop

The full pattern for a data-question agent:
  1. Break a multi-part question into a few entities and/or metrics.
  2. Resolve each with Graph Search (types=entity OR types=metric; add label only to force disambiguation, else let inference run).
  3. Pick the node(s) — read subtype, label, and description.
  4. Explore their q-filtered relations, ranked by popularity and match strength; keep the top few. For cohorts, drill the named rel:* edge or members.
  5. Compose grounded /v3/search queries from the resolved names and aliases, and pin the resolved ids in sources.data.node_ids.
  6. Fetch concurrently; render each card’s embed_url as an iframe (embeds post their height via a tako::resize message — see Embedding Knowledge Cards); report gaps.
Any stage can come up empty — a valid, visible outcome, not a failure. Give your planner a validated output contract so the graph phase runs deterministically:
  • Models: question-breakdown and node-picking run fine on cheap/fast models; the compose step is the one that matters (wording drives hits) — give it your best model.
  • Latency/cost: several graph round-trips + a couple of LLM calls fire before the data search, so the loop is slower than a single /v3/search — but graph calls cost no credits and the LLM calls are small. The payoff is grounded searches that hit more often, plus an honest gaps report.
  • Caps are yours: a few entities, a few related metrics each, dedupe queries case-insensitively, bound total searches. Raise for research, lower for a chat sidebar.
Skip the wiring. If you’re building an agentic application that integrates Tako Search, the tako-graph-agent skill packages this whole loop — resolve, explore, compose, pin, report gaps — as one installable file. The one-command install is in the card at the top of this page.

Knowing what you don’t know

Report what the graph can’t ground as explicit gaps“Tako has X and Y, but not Z.” An empty result is a valid, honest answer; never invent data to fill a gap. Saying what Tako knows and doesn’t is the whole advantage over blind search. Two caveats keep the report honest:
  • “Related” is table-level, not entity-level. A node’s related metrics are the metrics in the datasets that cover that entity — strong evidence, not proof of that exact combination. /v3/search is the final validator.
  • The graph is not the whole index. It indexes what’s structured as metrics/entities — not everything search can return. Stock/share-price and market-quote data especially is usually not a graph metric, yet search almost always has it (same for rankings, screens, overviews). A thin graph result for an entity Tako obviously covers is a cue to run an entity-level /v3/search, not to declare a gap.

When to use — and when to decline

Use the graph-grounded loop for data/chart questions where Tako plausibly has coverage (public companies, macro indicators, indices, commodities, sports). Skip discovery when you already know the exact chart — a named chart or fully-qualified metric + entity goes straight to POST /v3/search. Decline advice/opinion/prediction asks (“should I buy X”, “will Y happen”) — the pipeline fetches data, it doesn’t forecast; serve the factual sub-question and decline the rest. Poor fit: purely qualitative/sentiment asks, coding, trivia.

Common mistakes

Avoid these — they are the patterns coding agents most often get wrong.

Errors

Failures return { "error_message": "...", "error_type": "..." }.