> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Chunk by Page strategy

> The Chunk by Page strategy preserves page boundaries, ensuring no chunk contains content from more than one page.

*Type*: `chunk`

*Subtype*: `chunk_by_page`

## Settings

<ParamField body="unstructured_api_url" type="string">
  If specified, overrides the default API URL used for chunker calls. Default: none (uses Unstructured's internal default).
</ParamField>

<ParamField body="unstructured_api_key" type="string">
  If specified, overrides the default API key used for chunker calls. Default: none (uses Unstructured's internal default).
</ParamField>

<ParamField body="include_orig_elements" type="boolean">
  If `true`, the elements used to form a chunk appear in `.metadata.orig_elements` for that chunk. Default: `false`.
</ParamField>

<ParamField body="new_after_n_chars" type="integer">
  Soft maximum length of a chunk in characters. Closes a section after reaching approximately this length. Default: none.
</ParamField>

<ParamField body="max_characters" type="integer">
  Hard maximum number of characters in a chunk. Default: none.
</ParamField>

<ParamField body="overlap" type="integer">
  Number of trailing characters from the prior text-split chunk to prepend to each subsequent chunk formed by splitting an oversized element. Default: none.
</ParamField>

<ParamField body="overlap_all" type="boolean">
  If `true`, applies overlap to chunks formed by combining whole elements, not just oversized ones. Use with caution — this can introduce noise into otherwise clean semantic units. Default: `false`.
</ParamField>

<ParamField body="contextual_chunking_strategy" type="string">
  If specified, prepends chunk-specific explanatory context to each chunk. Allowed value: `v1`. Default: none.
</ParamField>

<RequestExample>
  ```python Python SDK theme={null}
  chunk_by_page_chunker_workflow_node = WorkflowNode(
      name="Chunker",
      subtype="chunk_by_page",
      type="chunk",
      settings={
          "unstructured_api_url": None,
          "unstructured_api_key": None,
          "include_orig_elements": <True|False>,
          "new_after_n_chars": <new-after-n-chars>,
          "max_characters": <max-characters>,
          "overlap": <overlap>,
          "overlap_all": <True|False>,
          "contextual_chunking_strategy": "<contextual-chunking-strategy>"
      }
  )
  ```

  ```json cURL theme={null}
  {
      "name": "Chunker",
      "type": "chunk",
      "subtype": "chunk_by_page",
      "settings": {
          "unstructured_api_url": null,
          "unstructured_api_key": null,
          "include_orig_elements": <true|false>,
          "new_after_n_chars": <new-after-n-chars>,
          "max_characters": <max-characters>,
          "overlap": <overlap>,
          "overlap_all": <true|false>,
          "contextual_chunking_strategy": "<contextual-chunking-strategy>"
      }
  }
  ```
</RequestExample>
