/graph

The Graph endpoint computes the data necessary to visualise a relationship network.

Table of Contents #

GET /graph #

Get data to build a graph.

NOTE The v1/network endpoint is preferred over /graph as it is both faster (much faster, actually) and gives a higher level of control of the result.

Request

GET /graph
GET /graph/{query}
GET /graph/{query}/{types}
GET /graph?q=barack%20obama&types=keyphrase,person,company&type=json

Parameters

q : They query that the graph is based on.

types : Filter which type of entities should be included. Expects a comma separated list of strings. Valid types are:

noNodes : The maximum number of nodes that should be used to create the graph data. Default is 20.

graphEntities : To resolve graph entities that was part of the original graph

entityTypeLimits : The maximum number of entities for each type that will be included in the graph. Expects a comma separated list of integers. The amount of entityTypeLimits must be the same as the amount of types.

expandEntities : A comma separated list of itemRefs that must be included in the graph result. It will look for related entities mapped to these itemRefs.

includeEntities : A comma separated list of itemRefs that must be included in the graph result.

Response

Example: The query https://api.silobreaker.com/graph?q=barack%20obama&types=keyphrase,person,company&noNodes=3&type=json will produce a response similar to

{
   Nodes: [
      {
         EntityReference: "obamacare-11_21286512",
         Id: "11_21286512",
         Description: "Obamacare",
         Type: "Keyphrase",
         LocalizedType: "Keyphrase",
         LastUpdated: "0001-01-01T00:00:00"
      },
      {
         EntityReference: "barack-obama-11_240886",
         Id: "11_240886",
         Description: "Barack Obama",
         Type: "Person",
         LocalizedType: "Person",
         LastUpdated: "0001-01-01T00:00:00"
      },
      {
         EntityReference: "health-care-11_303265",
         Id: "11_303265",
         Description: "Health Care",
         Type: "Keyphrase",
         LocalizedType: "Keyphrase",
         LastUpdated: "0001-01-01T00:00:00"
      }
   ],
   Connections: [
      {
         FromId: "11_21286512",
         ToId: "11_240886",
         Strength: 0.08312332630157471
      },
      {
         FromId: "11_21286512",
         ToId: "11_303265",
         Strength: 0.04497871175408363
      },
      {
         FromId: "11_240886",
         ToId: "11_303265",
         Strength: 0.13945697247982025
      }
   ],
   LastUpdated: "0001-01-01T00:00:00"
}

Documentation generated by mdoc.