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

# Split

> Find the pages of a parse that belong to each topic you name.

Split finds which pages of a parsed document belong to each topic you name, such as the financial statements or the leadership section of an annual report. Use it when sections need different handling and move from one document to the next. If a section is always on the same pages, skip Split and send those pages as the next step's `page_range`.

## Split a parse

This request finds the pages of two topics in a completed parse and waits for the result. `client` comes from [SDKs](https://docs.runpulse.com/v2/sdks.md), and `parse_id` from a [parse](https://docs.runpulse.com/v2/parse.md).

```python Python theme={null}
job = client.split.run(
    parse_id=parse_id,
    config={"topics": [
        {"name": "Financials", "description": "Financial statements and their notes"},
        {"name": "Leadership"},
    ]},
)
topics = {t.name: t.pages for t in client.split.get_result(job.split_id).topics}
```

```typescript TypeScript theme={null}
const { splitId } = await client.split.run({
  parseId,
  config: { topics: [
    { name: "Financials", description: "Financial statements and their notes" },
    { name: "Leadership" },
  ] },
});
const { topics } = await client.split.getResult({ splitId });
```

Each topic has a `name`, which the result returns exactly as you sent it, and an optional `description` of what belongs to it. Add a description when a name could mean more than one thing. You can send up to 200 topics.

For a long parse, send `async: true` and poll the job instead: see [Jobs and results](https://docs.runpulse.com/v2/jobs.md). An expired or deleted parse is refused with a `410` (`RESULT_EXPIRED`).

## The result

`GET /split/{split_id}/result` (`client.split.get_result`) returns each topic you sent, in your order, with its `pages`:

```json theme={null}
{
  "split_id": "split-5d7e9f1a-2b3c-4d5e-8f9a-0b1c2d3e4f5a",
  "topics": [
    { "name": "Financials", "pages": [5, 6, 7, 8, 9] },
    { "name": "Leadership", "pages": [3, 11] }
  ],
  "usage": {
    "request": { "pages_processed": 12, "credits_used": 12.0 }
  },
  "history": {
    "file_name": "annual-report.pdf",
    "previous_step": "parse-3f6c1a2e-8d4b-4f7a-9c2e-5b1d0e7a4c93"
  }
}
```

* `pages` lists a topic's pages in ascending order, numbered as in the parse's result, not as printed in the document.
* A page can belong to several topics.
* A topic's `pages` is empty when no page matches it.

## Send each topic to the next step

A topic's pages become the `page_range` of the next step on the same parse:

```mermaid theme={null}
%%{init: {"themeVariables": {"fontSize": "14px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 32, "padding": 8}}}%%
flowchart LR
    parse["/parse"] -->|parse_id| split["/split + topics"]
    split -->|"topics[].pages"| extract["/extract + page_range"]
    parse -->|same parse_id| extract
```

Join a topic's pages with commas to make the range, such as `"5,6,7,8,9"`, and skip a topic whose `pages` is empty. [Split, then extract](https://docs.runpulse.com/v2/cookbooks/split-then-extract.md) runs a schema on each section of a 10-K this way.

## Pages and effort

Split reads every page of the parse and takes no `page_range`, so to split part of a document, parse only that part. `effort: "high"` reads more carefully than the default, `"low"`. Split costs 1 credit per page of the parse, or 6 credits per page with `effort: "high"` ([Pricing](https://docs.runpulse.com/v2/pricing.md)).

## Next steps

> [card] [Split, then extract](https://docs.runpulse.com/v2/cookbooks/split-then-extract.md)
>
> Find each section's pages, then run a schema on each.

> [card] [Saved configs](https://docs.runpulse.com/v2/saved-configs.md)
>
> Save a list of topics, then send its `config_id`.

> [card] [Split API reference](https://docs.runpulse.com/api-reference/v2/split/run-split.md)
>
> Every option, field and limit.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.