GET
/doc/:id
Fetches the full cleaned text of one passage by id — the only endpoint that returns page content.
Search deliberately returns metadata. This is the other half of that decision: when the agent has decided which passage it actually wants, it fetches exactly that one.
The text is the cleaned extraction, not raw HTML — no navigation, no cookie banners, no footer. That is the difference between spending 800 tokens on a page and spending 6,000.
Request
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/doc/p:8f2c9a"| Parameter | Type | Description |
|---|---|---|
idrequired | string | Passage id, as a path segment. |
Response
{ id, url, host, title, text, published_at, fetched_at, word_count }
From an agent
This endpoint is also exposed as the MCP tool get_document, so an agent can call it without any HTTP code.
// Read the tokio documentation page you just found.
{ "id": "p:8f2c9a" }Try this endpoint
Every endpoint is available on the free tier. Get a key and run the example above unchanged.