Browse documentation
Full text of one passage
Fetch the full cleaned text of a passage by its id (from a web_search hit), with its metadata.
get
/doc/{id} Request
curl \
-H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/doc/<id>" Behaviour
Snippets in search results are the passage text, so most questions need no call here. Reach for it when you need the whole document rather than the matching passage.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Passage id from a search hit. |
Responses
| Status | Meaning |
|---|---|
200 | The document, with its full cleaned text. |
401 | Missing, unknown or revoked key. A key minted moments ago can answer 401 until it propagates to the serving fleet. |
404 | No such passage id. |
429 | Over the per-minute rate, or past a hard-capped monthly quota. `retry-after` is present on the rate-limit case only. |
Response body
WebHit
| Name | Type | Description |
|---|---|---|
authority | string | — |
centrality | number | Graph centrality — how central this passage is to the corpus |
community_id | string | — |
content_type | string | — |
fetched_atrequired | integer | Unix seconds when this passage was crawled |
group_size | integer | Present when collapse grouped rows: how many were folded in |
hostrequired | string | — |
host_rankrequired | number | Host trust prior, 0..1 |
idrequired | string | Passage id (page:no) — pass to get_document, similar, related, corroborate, path |
in_degree | integer | — |
independent_sources | integer | Distinct hosts asserting this story |
published_at | integer | — |
qualityrequired | integer | — |
safety | string | — |
scorerequired | number | — |
snippetrequired | string | The passage text — often enough to answer without get_document |
sourcerequired | string | cc | delta |
story_idrequired | string | Near-dup cluster this passage belongs to |
titlerequired | string | — |
tld | string | — |
topics | string[] | — |
urlrequired | string | — |
verticalrequired | string | — |
word_count | integer | — |
The same call over MCP is a tool with these parameter names unchanged. See Errors for what to do with each status.