/related
Coverage graph traversal: the connected neighbourhood of a passage, up to k hops — the edges are what to read next.
A search API hands back a list and leaves the agent to work out how the results relate. The relationships already exist in the index: which host published what, which passages belong to the same story, which topics and entities they touch, who links to whom.
related exposes them. One call gives an agent a bounded neighbourhood to follow, instead of a search per hop with the agent guessing the query terms each time.
Request
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/related?id=p:8f2c9a&hops=2&limit=15"| Parameter | Type | Description |
|---|---|---|
idrequired | string | Seed passage id. |
hops | integer default: 1 | Traversal depth. Bounded breadth-first. |
limit | integer default: 10 | Maximum neighbours returned. |
Response
Connected passages with the edge type that linked them.
From an agent
This endpoint is also exposed as the MCP tool related, so an agent can call it without any HTTP code.
// What else is connected to this article?
{ "id": "p:8f2c9a", "hops": 2, "limit": 15 }Try this endpoint
Every endpoint is available on the free tier. Get a key and run the example above unchanged.