Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve documents with get_document()
from surfacedocs import SurfaceDocs docs = SurfaceDocs() doc = docs.get_document("doc_abc123") print(doc.title) print(doc.url) for block in doc.blocks: print(f"[{block.type}] {block.content[:50]}")
document_id
str
Document
DocumentNotFoundError
doc.id # "doc_abc123" doc.url # "https://app.surfacedocs.dev/d/doc_abc123" doc.folder_id # "fld_xyz" doc.title # "My Document" doc.content_type # "markdown" doc.visibility # "private" doc.blocks # list[Block] doc.metadata # dict or None doc.created_at # "2024-01-01T00:00:00Z" doc.updated_at # "2024-01-02T00:00:00Z"
Block
block.id # "blk_abc123" block.order # 0 block.type # "heading", "paragraph", "code", etc. block.content # "Hello world" block.metadata # {"level": 1} or None