unlob Docs
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

NameTypeDescription
idrequiredstringPassage id from a search hit.

Responses

StatusMeaning
200The document, with its full cleaned text.
401Missing, unknown or revoked key. A key minted moments ago can answer 401 until it propagates to the serving fleet.
404No such passage id.
429Over the per-minute rate, or past a hard-capped monthly quota. `retry-after` is present on the rate-limit case only.

Response body

WebHit

NameTypeDescription
authoritystring
centralitynumberGraph centrality — how central this passage is to the corpus
community_idstring
content_typestring
fetched_atrequiredintegerUnix seconds when this passage was crawled
group_sizeintegerPresent when collapse grouped rows: how many were folded in
hostrequiredstring
host_rankrequirednumberHost trust prior, 0..1
idrequiredstringPassage id (page:no) — pass to get_document, similar, related, corroborate, path
in_degreeinteger
independent_sourcesintegerDistinct hosts asserting this story
published_atinteger
qualityrequiredinteger
safetystring
scorerequirednumber
snippetrequiredstringThe passage text — often enough to answer without get_document
sourcerequiredstringcc | delta
story_idrequiredstringNear-dup cluster this passage belongs to
titlerequiredstring
tldstring
topicsstring[]
urlrequiredstring
verticalrequiredstring
word_countinteger

The same call over MCP is a tool with these parameter names unchanged. See Errors for what to do with each status.