Skip to main content
Process directories of documents with the SDK or CLI. Both handle rate limiting and retries automatically.

SDK Batch Processing

Process multiple files using Python’s async capabilities:

Async Batch Processing

For higher throughput:

CLI Batch Processing

The CLI handles directory processing automatically:
See CLI Reference for all options.

REST API Batch Processing

For raw API usage, implement parallel requests with retry handling:

Rate Limits

  • Request rate limit: 200 requests per minute per account (429 on exceed)
  • Concurrent request limit: 400 concurrent requests (429 on exceed)
  • Page concurrency limit: 5,000 pages in flight across all requests — this is enforced during processing, not at submission. Results return with success: false if exceeded. Always check the success field when polling for results.
  • The SDK and CLI handle request rate limiting and retries automatically
  • For higher limits, contact support@datalab.to
See API Limits for details.

Tips

  1. Use async for high throughput - Async processing handles many concurrent requests efficiently
  2. Limit concurrency - Start with 5-10 concurrent requests and adjust based on your rate limits
  3. Handle failures gracefully - Use return_exceptions=True with asyncio.gather to continue processing on errors
  4. Save progress - Write results incrementally to avoid losing work on long batches

Next Steps

Document Conversion

Learn more about Marker’s conversion API and output formats.

API Limits

Understand rate limits and how to optimize throughput.

Pipelines

Chain processors into versioned, reusable pipelines.

Webhooks

Get notified when batch conversions complete via webhooks.