Skip to main content
Convert PDFs, Word documents, spreadsheets, and images to machine-readable formats. Marker handles complex layouts, tables, math, and images. Before you begin, make sure you have:
  1. A Datalab account with an API key (new accounts include $5 in free credits)
  2. Python 3.10+ installed
  3. The Datalab SDK: pip install datalab-python-sdk
  4. Your DATALAB_API_KEY environment variable set
Building for production? Use Pipelines to chain processors, version your configuration, and deploy with a single API call.

Quick Start

The SDK handles polling automatically. For the REST API, you submit a request and poll the request_check_url until the status is complete. See SDK Conversion for complete SDK documentation.
File limits: Maximum file size is 200 MB, with up to 7,000 pages per request. See API Limits for the full list.

Parameters

Core Parameters

Which output format should I use?
  • LLM/RAG pipelinesmarkdown (default, most compatible)
  • Web displayhtml (preserves visual structure)
  • Programmatic access to blocksjson (includes bounding boxes and block types)
  • Embedding and searchchunks (pre-chunked for vector databases)

Processing Modes

Which mode should I use?
  • Most use casesbalanced (recommended default)
  • Simple, clean PDFs at high throughput → fast
  • Scanned documents, complex tables, or dense layoutsaccurate

Page Control

Image Handling

Advanced Options

For structured extraction, use the Extract API. For document segmentation, use the Segment API.
The track_changes extra is supported on this endpoint. You can also use the dedicated Track Changes endpoint.

Bounding Box Add-ons

Three add-ons annotate HTML output with spatial coordinates and confidence scores. All are billed at $0.30 per 1K pages each (additive on top of the base conversion rate) and require the html output format to expose the attributes.
table_cell_bboxes and list_item_bboxes do not automatically enable word_bboxes. To also receive per-word bounding boxes, set word_bboxes=True explicitly alongside the structural extra. Each add-on is billed independently.

Additional Config Options

Pass as JSON string in additional_config: Example:

Response Fields

Examples

Convert with High Accuracy

HTML with Block IDs for Citations

Process Specific Pages

Process Specific Sheets from a Spreadsheet

For spreadsheet files, page_range filters by sheet index (0-based):

Extract Track Changes from Word Documents

Parse Quality Score

Every conversion response includes a parse_quality_score (0-5) that indicates how well the document was parsed: Use quality scores to build automated quality gates:
Use quality scores to gate pipeline execution or route documents to different processing configurations.

Checkpoints

Save a processing checkpoint to reuse parsed results for extraction or segmentation without re-processing:
Checkpoints save time and cost when you need to run multiple operations (extraction, segmentation) on the same document.
Results are deleted from Datalab servers one hour after processing completes. Retrieve your results promptly.

Next Steps

Structured Extraction

Extract structured data from documents using JSON schemas

Batch Processing

Process multiple documents concurrently

Document Segmentation

Split multi-document PDFs into segments

Webhooks

Get notified when conversions complete