Get a graph neighbourhood
get_graph_neighborhoodEverything within N hops of a document, WITH the edges that connect them and the predicate on each. Useful for asking what a passage, person or theme is connected to without fetching each document.
Filter with type to ask a shaped question — the places near an event, the people in an epoch — and with predicate to keep only one kind of edge. Depth 1 is direct links; depth 3 gets large quickly and is capped. See get_vocabulary for what each predicate means.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Document path, e.g. "people/david" or "themes/faith" | |
| type | No | Keep only neighbours of this type: Person, Place, Theme, Lexeme, Commandment, Event, Epoch, Book, Chapter, Source, Dataset, Relation Vocabulary. | |
| depth | No | How many hops out from the starting document. Defaults to 1. Capped at 3 — the graph fans out fast. | |
| limit | No | Cap on nodes returned. Defaults to 200, capped at 600. The response sets `truncated` when it bites. | |
| offset | No | For paging the node list, in the walk order the response returns. Edges are those internal to the page, so one that spans a page boundary appears on neither — fetch the neighbourhood in a single call if you need the edges whole. | |
| predicate | No | Keep only edges with this predicate, e.g. "develops". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| root | Yes | ||
| count | Yes | ||
| depth | Yes | ||
| edges | Yes | ||
| nodes | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| licence | No | ||
| edgeCount | Yes | ||
| truncated | Yes |