Skip to main content
GET
/
v1
/
graph
Get knowledge graph
curl --request GET \
  --url https://app.nex.ai/api/developers/v1/graph \
  --header 'Authorization: <api-key>'
{
  "nodes": [
    {
      "id": "12345",
      "name": "John Smith",
      "type": "person",
      "definition_slug": "person",
      "primary_attribute": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "edges": [
    {
      "id": "<string>",
      "source": "<string>",
      "target": "<string>",
      "label": "works_at",
      "definition_id": "<string>"
    }
  ],
  "relationship_definitions": [
    {
      "id": "<string>",
      "name": "<string>",
      "entity_1_to_2": "<string>",
      "entity_2_to_1": "<string>"
    }
  ],
  "context_edges": [
    {
      "id": "tri_42",
      "source": "12345",
      "target": "67890",
      "label": "works_with",
      "edge_type": "context",
      "confidence": 0.5
    }
  ],
  "insight_nodes": [
    {
      "id": "ei:42",
      "content": "John prefers email communication over phone calls",
      "type": "preference",
      "confidence": 0.5,
      "source": "entity_insight"
    }
  ],
  "insights": {},
  "total_nodes": 123,
  "total_edges": 123,
  "total_context_edges": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.nex.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key for authentication (format: "Bearer YOUR_API_KEY")

Query Parameters

limit
integer
default:1000

Maximum number of entity nodes to return

Required range: 1 <= x <= 5000
format
enum<string>

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

Available options:
json,
html

Response

Knowledge graph data

Complete knowledge graph for the workspace

nodes
object[]

CRM entity nodes (people, companies, custom objects) and ghost nodes (entities mentioned in context but not yet resolved to a CRM record)

edges
object[]

CRM relationship edges between entity nodes (e.g., person works_at company)

relationship_definitions
object[]

Definitions of relationship types in the workspace

context_edges
object[]

Edges derived from ingested context, AI-extracted triplets, insight-entity links, and insight-to-insight semantic relationships. Each edge has an edge_type indicating its source.

insight_nodes
object[]

Insight nodes representing AI-extracted knowledge (entity insights and workspace-level knowledge insights)

insights
object

Per-entity insight summaries, keyed by entity ID

total_nodes
integer

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

total_edges
integer

Total number of CRM relationship edges in the workspace

total_context_edges
integer

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

Last modified on April 28, 2026