Skip to main content
GET
/
beta
/
graph
/
search
Search the data graph
curl --request GET \
  --url https://tako.com/api/beta/graph/search
import requests

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

response = requests.get(url)

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

fetch('https://tako.com/api/beta/graph/search', 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/search",
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/search"

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/search")
.asString();
require 'uri'
require 'net/http'

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

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
{
  "results": [
    {
      "id": "<string>",
      "name": "<string>",
      "aliases": [
        "<string>"
      ],
      "description": "<string>"
    }
  ],
  "inferred_labels": []
}
{
"error_message": "<string>"
}
{
"error_message": "<string>"
}

Notes

  • Public and unauthenticated — no API key required.
  • Use graph search to discover and confirm what data exists before you query it. Resolve the metric and the entity you care about here, then ask Search (/v3/search) or Answer (/v1/answer) for that specific entity + metric combination.
  • Each result is a GraphNode whose id you can pass straight to Graph Related to explore what it connects to.
This endpoint is in beta. A returned metric or entity is a guide, not a guarantee — it does not promise that a specific entity + metric combination exists, or that data is available for it. Use it to steer what you ask Search or Answer for, and confirm coverage there.

Scoping with types

types is a comma-separated list of facets to return. Omit it to search both:
  • metric — a measure (e.g. “GDP”, “stock price”).
  • entity — a thing the metric is tracked for (e.g. a country, a company).

Disambiguating with subtype

Many names are homonyms — “China” is both a country and several U.S. towns. Pass subtype to scope results to a single entity class so the canonical entity wins:
# The country, not "China, TX"
curl "https://tako.com/api/beta/graph/search?q=china&subtype=Countries"
  • subtype implies entity-only results. Passing it alongside an explicit non-entity types (e.g. types=metric) is a 400.
  • The full set of classes is the subtype enum in the schema (e.g. Countries, Companies, Cities, People).
  • Each entity result echoes its resolved class back in subtype, so you can confirm the match.
A short response does not mean “no more matches.” When subtype is set, results are drawn from a bounded candidate window (min(limit*5, 200)) before filtering. A response shorter than limit does not imply the catalog is exhausted — narrow q instead.

Example response

{
  "results": [
    {
      "id": "china-9f2a1b",
      "type": "entity",
      "name": "China",
      "aliases": ["People's Republic of China", "PRC"],
      "description": "Country in East Asia",
      "subtype": "Countries"
    }
  ]
}

Query Parameters

q
string
required

Search text (min 2 chars).

types
string

Comma-separated facets: metric,entity.

limit
integer

Max results (default 20, max 50).

label
enum<string>

Prefer results with this NER label (boost, not a filter — matching nodes rank higher; others still return). 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. Default true.

Response

Matching metrics and entities

results
GraphNode · object[]
required
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