Skip to main content
read_document_content Read a document’s raw TipTap JSON, for when you need node attributes; to read what a document says, use read_document_text. Reads the document’s content as TipTap JSON by connecting to the live collaboration server. Returns content (a doc node whose content holds this page of top-level blocks, with node types, attributes, marks, and text), totalBlocks (top-level blocks in the whole document) and page. Up to 100 top-level blocks per call, fewer when they are large; when page.nextOffset is present, more remains — pass page.nextOffset as offset to continue. Read only what you need: pass blockIds (from list_document_blocks) to get just those blocks and everything inside them, or read_document_text with a section for one clause. HTML blocks come back with their title only; pass includeHtml: true to get each one’s full HTML in attrs.html.

Parameters

string
required
ID of the document to read.
boolean
Also return each HTML block’s full HTML document in attrs.html (up to 512 KB each). Only when you need to change a widget.
array<string>
Read only these blocks (attrs.id, at any depth), each with its whole subtree, in document order. offset/limit then page through the matches. Ids not found come back in missingBlockIds.
integer
Block to start at. Pass the previous result’s page.nextOffset. Minimum: 0.
integer
Max blocks to return (default 100); fewer when blocks are large. Minimum: 1.