- A Datalab account with an API key
- Python 3.11+ installed
- The Datalab SDK:
pip install datalab-python-sdk - Your
DATALAB_API_KEYenvironment variable set
Building for production? Use Pipelines to chain processors, version your configuration, and deploy with a single API call.
Quick Start
request_check_url. A status of complete means processing has ended; check success before reading the output. Failed jobs can return status="complete" with success=false and an error message.
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.
Regional Result Downloads
Convert, Extract, and Segment requests processed in the EU return a signedresult_url when complete. Document content is downloaded from that URL instead of being included inline in the polling response. Check for result_url regardless of the requested region.
The Python requests example above handles both forms. Download the URL without an X-API-Key header: the URL itself authorizes access. expires_in gives its lifetime in seconds; poll request_check_url again for a fresh URL if needed while the result remains retained.
Downloaded extraction results can contain extraction_schema_json as an object, while the API response encodes it as a JSON string. Decode it with json.loads() only when it is a string.
Keep the non-null fields from the polling response when combining it with the downloaded JSON, since billing and confidence scores can be updated after the document result was stored. Continue polling request_check_url, rather than the download URL, for these updates.
Parameters
Core Parameters
Processing Modes
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. At standard rates, word prediction costs $2 per 1K pages. Table cell and list item boxes are free: they run word prediction, which is charged once. These charges are added to conversion. Usehtml output to expose the attributes. A request for table cell or list item boxes alone does not return word boxes; set word_bboxes=True to get them.
Regional and account pricing can change these rates; see Billing.
Additional Config Options
Pass as JSON string inadditional_config:
Page headers and footers. Running headers, footers, and letterheads (page numbers, reference numbers, document IDs, addresses) are left out of
markdown and html output by default, so they don’t repeat on every page of your text. They are always returned in json and chunks output as PageHeader and PageFooter blocks, so you can keep or filter them by block type. Structured extraction always reads them, so schema fields printed only in a header or footer are still extracted. Set keep_pageheader_in_output or keep_pagefooter_in_output to include them in markdown and html.PDF Bookmarks
Useextras="extract_bookmarks" to read the PDF’s stored outline. metadata.pdf_bookmarks is a tree of objects with title, page, and children. page is an original, 0-indexed page number, or null when the destination cannot be resolved. These are the PDF’s authored bookmarks, not headings inferred from its content.
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
Parse Quality Score
Every conversion response includes aparse_quality_score (0-5) that indicates how well the document was parsed:
Use quality scores to build automated quality gates:
Checkpoints
Save a processing checkpoint to reuse parsed results for extraction or segmentation without re-processing: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