Skip to main content
GET
/
beta
/
graph
/
related
Get a graph node's related nodes
curl --request GET \
  --url https://tako.com/api/beta/graph/related
import requests

url = "https://tako.com/api/beta/graph/related"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://tako.com/api/beta/graph/related', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://tako.com/api/beta/graph/related",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://tako.com/api/beta/graph/related"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://tako.com/api/beta/graph/related")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tako.com/api/beta/graph/related")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "node": {
    "id": "<string>",
    "name": "<string>",
    "aliases": [
      "<string>"
    ],
    "description": "<string>"
  },
  "relations": [
    {
      "key": "<string>",
      "label": "<string>",
      "items": [
        {
          "id": "<string>",
          "name": "<string>",
          "aliases": [
            "<string>"
          ],
          "description": "<string>"
        }
      ],
      "total": 123,
      "total_capped": false
    }
  ],
  "relation": {
    "key": "<string>",
    "label": "<string>",
    "items": [
      {
        "id": "<string>",
        "name": "<string>",
        "aliases": [
          "<string>"
        ],
        "description": "<string>"
      }
    ],
    "total": 123,
    "total_capped": false,
    "next_cursor": "<string>"
  },
  "inferred_labels": []
}
{
"error_message": "<string>"
}
{
"error_message": "<string>"
}
{
"error_message": "<string>"
}

Notes

  • Public and unauthenticated — no API key required.
  • Start from a node_id returned by Graph Search, then use graph related to find which entity + metric combinations Tako actually covers. Once you’ve found a covered combination, query Search (/v3/search) or Answer (/v1/answer) for it.
  • Related is symmetric — for any node, the response groups everything it connects to into metrics and entities (from the tables the node belongs to). An entity, for example, returns the metrics tracked for it and other entities that appear in the same tables.

Response shape: overview vs. one facet

The response always includes the resolved node. The rest depends on whether you paginate:
  • No relation_typerelated holds a grouped overview: metrics and entities, each with its own items and total. Use this to see everything a node connects to at a glance.
  • relation_type set (metric / entity) → relation holds a single paginated GraphRelationPage for that one facet, with items, total, and a next_cursor. Pass next_cursor back as cursor to page through.

Narrowing with q

The optional q is a case-insensitive substring filter on related nodes’ name/aliases. It filters every facet of the overview, or the single paginated facet when relation_type is set:
# Metrics available for an entity, matching "gdp"
curl "https://tako.com/api/beta/graph/related?node_id=china-9f2a1b&relation_type=metric&q=gdp"
A 404 means the node does not exist or has no exportable data.

Example response (overview)

{
  "node": {
    "id": "china-9f2a1b",
    "type": "entity",
    "name": "China",
    "subtype": "Countries"
  },
  "related": {
    "metrics": { "items": [/* ... */], "total": 184 },
    "entities": { "items": [], "total": 0 }
  }
}

Query Parameters

node_id
string
required

Opaque public id of the node.

relation
string

Relation key to paginate, e.g. rel:competes_with, metrics, entities, siblings, or members.

relation_type
string

Deprecated: use relation. Legacy facet (metric/entity/sibling/member) mapped to a key.

q
string

Optional case-insensitive substring filter on the related nodes' name/aliases. Filters every group of the overview, or the single paginated group when relation is set.

cursor
string

Opaque pagination cursor.

limit
integer

Page size (default 50, max 100).

label
enum<string>

Prefer related nodes with this NER label (boost, not a filter — matching nodes rank higher within each relation; totals are unchanged). Supplying label disables inference.

Available options:
PERSON,
ORG,
GPE,
LOC,
PRODUCT,
EVENT,
LANGUAGE,
MONEY,
METRIC,
STOCK_TICKER,
WEBSITE
infer_label
boolean

Infer label and grounded-node boosts from q via Tako NER; set false to disable. Ignored when label is supplied; applies only when q is present. Default true.

Response

A node's details plus related nodes by facet

node
GraphNode · object
required
relations
GraphRelation · object[] | null
relation
GraphRelationPage · object | null
inferred_labels
enum<string>[] | null

Labels inferred from q when infer_label ran (boost applied). Empty list: inference ran and found nothing. Absent: an explicit label was given, infer_label=false, or there was no q.

Available options:
PERSON,
ORG,
GPE,
LOC,
PRODUCT,
EVENT,
LANGUAGE,
MONEY,
METRIC,
STOCK_TICKER,
WEBSITE