Skip to main content
POST
Read as Markdown

Read Document as Markdown

Extract document content as markdown text. Your agent should use this to read documents before editing and verify changes after edits are applied.

Path Parameters

string
required
The unique identifier of the document (UUID)

Request Body

string
required
Client-provided UUID for idempotency and tracking. Generate a new UUID for each read request.

Response

string
required
The UUID of the read operation (same as request)
string
required
Markdown representation of the document content
number
required
Time taken to generate the markdown in seconds
string
required
Name of the document
string
required
UUID of the document

Code Examples

Example Response

Use Cases

Content Extraction

Extract document content for search indexing or data processing

AI Integration

Feed document content to LLMs for analysis or summarization

Version Control

Track document changes in markdown-friendly version control systems

Web Display

Display document content on websites using markdown renderers

Processing Markdown Content

Here’s how to use the markdown output in different scenarios:

Markdown Formatting

The markdown output preserves document structure including:
  • Headings: Converted to markdown headers (# ## ###)
  • Lists: Bullet points and numbered lists
  • Tables: Formatted as markdown tables
  • Bold/Italic: Text formatting preserved
  • Links: Hyperlinks maintained
  • Images: Image references with descriptions (if available)

Example Conversion

A Word document with:
  • Heading: “Financial Report”
  • Bold text: “Q4 Results”
  • Table with revenue data
  • Bulleted list of achievements

Alternative: Get Markdown During Upload

You can also request markdown when uploading a document by setting return_markdown=true:

Queue Processing

Like edits, markdown read operations are queued per document to ensure consistency:

Error Responses

Markdown generation typically takes 1-5 seconds depending on document complexity.