Skip to main content
When you need to process many documents, batch processing lets you run multiple requests concurrently. This is faster than processing documents sequentially and more suitable for immediate results than webhooks.
Save 20% on bulk parsing: for non-urgent workloads, submit jobs through the batch queue (queue_priority: "batch") for a 20% credit discount with a 12-hour completion guarantee.

When to use batch processing

Use AsyncReducto with asyncio for the best performance. The semaphore controls concurrency to avoid overwhelming the API.

Processing URLs

If your documents are already hosted (S3, web server, etc.), process URLs directly:

Processing local files

For local files, upload first then parse:

With progress bar

With error handling

Some documents may fail (corrupt files, unsupported formats). Handle errors gracefully to avoid losing all results:

Sync Python with threading

If you can’t use async, use ThreadPoolExecutor with the synchronous client:

Batch extraction

The same patterns work for extraction. Define your schema once and apply it to all documents:

JavaScript / TypeScript

Saving results

Save results as you process to avoid losing work:

Concurrency limits

Higher concurrency means faster processing but may hit rate limits. Start with lower values and increase as needed.

What about cURL?

Batch processing requires programming constructs (loops, concurrency control, error handling) that aren’t practical in cURL. For single-document processing via cURL, see the API reference. For batch workflows without writing code, consider:

Best practices

  1. Use async when possible: AsyncReducto is more efficient than threading
  2. Handle errors gracefully: Don’t let one failure stop the entire batch
  3. Save incrementally: Write results to disk as they complete
  4. Monitor progress: Use tqdm or logging to track progress
  5. Set reasonable concurrency: Start low (20-50) and increase if stable
For very large batches or long-running documents, consider webhooks instead. They’re better suited for fire-and-forget processing where you don’t need immediate results.