Skip to main content
method
POST
/query
Authentication: Required (if enabled) Retrieve the subgraph of nodes and edges reachable from a starting node up to a given depth.

Request

{
  "type": "related",
  "node_id": 0,
  "depth": 2
}
FieldTypeRequiredConstraintsDescription
typestringYes"related"
node_idinteger (u64)YesStarting node.
depthintegerYes0-100Maximum depth.

Response

{
  "success": true,
  "found": true,
  "path": [0, 1, 2],
  "edges": [
    {"from": 0, "to": 1, "weight": 10},
    {"from": 0, "to": 2, "weight": 7}
  ],
  "grounding": "inference",
  "error": null
}
When found is false, diagnostic explains why (e.g. node_not_found).

Example

curl -X POST http://localhost:8080/query \
     -H "Content-Type: application/json" \
     -d '{"type": "related", "node_id": 0, "depth": 2}'
Last modified on February 21, 2026