Skip to content
unlob
GET

/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

GET /relatedbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/related?id=p:8f2c9a&hops=2&limit=15"
ParameterTypeDescription
idrequiredstringSeed passage id.
hopsinteger

default: 1

Traversal depth. Bounded breadth-first.
limitinteger

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.

mcp: relatedjson
// 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.