Browse documentation
Connect two passages — GET /path
Coverage Graph: the shortest chain of edges linking two passages — connect-the-dots retrieval.
/path Request
curl \
-H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/path?a=<a>&b=<b>" Behaviour
Returns the node chain between them: passages (p:), hosts (h:), stories (s:), topics (t:), entities (e:). `found: false` means no chain exists within the corpus, which is itself an answer — these two things are not connected in anything we hold.
Costs 2 credits; a call that runs and fails costs 1.
Parameters
| Name | Type | Description |
|---|---|---|
arequired | string | Start passage id. `from` is accepted as an alias, because a spec published elsewhere named it that way. |
brequired | string | Goal passage id. `to` is accepted as an alias. |
Responses
| Status | Meaning |
|---|---|
200 | The node chain, or found=false when none exists. |
401 | Missing, unknown or revoked key. A key minted moments ago can answer 401 until it propagates to the serving fleet. |
429 | Over the per-minute rate (spent in credits), or a hard-capped key without the credits this call costs. `retry-after` is present on the rate-limit case only. |
The same call over MCP
This capability is path on the
MCP server, taking the same parameters and returning the same body. A parity test
in the API fails the build if the two ever diverge, so you can read either
reference and use the other.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "path",
"arguments": {
"a": "<a>",
"b": "<b>"
}
}
} Most clients build that frame for you — see Connect a client.
See Errors for what to do with each status, and Retries and backoff for which are worth repeating.
FAQ
- What does 200 mean on GET /path?
- The node chain, or found=false when none exists.
- What does 401 mean on GET /path?
- Missing, unknown or revoked key. A key minted moments ago can answer 401 until it propagates to the serving fleet.
- What does 429 mean on GET /path?
- Over the per-minute rate (spent in credits), or a hard-capped key without the credits this call costs. `retry-after` is present on the rate-limit case only.