Graph

Get knowledge graph

Changed on

Returns the full knowledge graph for the workspace, including CRM entity nodes, relationship edges, context edges (from ingested text), insight triplet edges (AI-extracted subject-predicate-object relationships), insight nodes, and insight link edges (semantic relationships between insights). Supports an optional limit query parameter to control the maximum number of entity nodes returned (default 1000, max 5000). Set Accept: text/html or ?format=html to receive an interactive visualization.

get/v1/graph

Request

  • Base URL
    https://app.nex.ai/api/developers
  • Auth
    API key in header Authorization

Query parameters

limitinteger

Maximum number of entity nodes to return

format'json' | 'html'

Response format. Use html to receive an interactive graph visualization instead of JSON.

Response

Knowledge graph data

insightsobject

Per-entity insight summaries, keyed by entity ID

total_nodesinteger

Total number of entity nodes in the workspace (may exceed the returned count due to the limit parameter)

total_edgesinteger

Total number of CRM relationship edges in the workspace

total_context_edgesinteger

Total number of context edges returned (includes all edge types)

Example response

{
  "nodes": [
    {
      "id": "12345",
      "name": "John Smith",
      "type": "person",
      "definition_slug": "person"
    }
  ],
  "edges": [
    {
      "label": "works_at"
    }
  ],
  "context_edges": [
    {
      "id": "tri_42",
      "source": "12345",
      "target": "67890",
      "label": "works_with"
    }
  ],
  "insight_nodes": [
    {
      "id": "ei:42",
      "content": "John prefers email communication over phone calls",
      "type": "preference"
    }
  ]
}

Changes