Skip to main content
Reducto allows you to specify which pages of a document to process using the page_range parameter in settings. You can specify a single range or multiple ranges.

Single Range

For processing a continuous range of pages, specify start and end page numbers:
result = client.parse.run(
    input=upload.file_id,
    settings={
        "page_range": {"start": 1, "end": 10}
    }
)
This processes pages 1 through 10.

Multiple Ranges

For non-contiguous pages, provide an array of range objects:
result = client.parse.run(
    input=upload.file_id,
    settings={
        "page_range": [
            {"start": 1, "end": 5},
            {"start": 10, "end": 15}
        ]
    }
)
This processes pages 1-5 and 10-15.

Notes

  • Page numbers are 1-indexed (first page is page 1)
  • Both start and end are inclusive
  • If no page range is specified, the entire document is processed
  • The end page must be greater than or equal to start
  • Ranges do not need to be in order
  • Overlapping ranges are processed only once
  • If end exceeds the document length, processing stops at the last page

With Split Endpoint

For the Split endpoint, page_range is nested under parsing.settings:
result = client.split.run(
    input=upload.file_id,
    split_description=[...],
    parsing={
        "settings": {
            "page_range": {"start": 40, "end": 80}
        }
    }
)