Skip to content
unlob
GET

/path

The shortest chain of edges linking two passages — reasoning-path retrieval, or connect-the-dots.

Given two things, how are they connected? Path answers it structurally: the shortest edge chain between two passages, with each intermediate node typed as a passage, host, story, topic or entity.

This is the investigative primitive. It is also the one that most obviously cannot be reconstructed from a ranked list, no matter how many searches an agent runs.

Request

GET /pathbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/path?from=p:8f2c9a&to=p:41ab7c"
ParameterTypeDescription
fromrequiredstringStart passage id.
torequiredstringEnd passage id.
max_hopsinteger

default: 4

Search depth ceiling.

Response

{ found, hops, nodes: [{ key, kind: passage | host | story | topic | entity, hit? }] }

From an agent

This endpoint is also exposed as the MCP tool path, so an agent can call it without any HTTP code.

mcp: pathjson
// How are these two articles connected?
{ "from": "p:8f2c9a", "to": "p:41ab7c", "max_hops": 4 }

Try this endpoint

Every endpoint is available on the free tier. Get a key and run the example above unchanged.