Split Markdown into RAG Chunks - Heading-Aware Text Splitter avatar

Split Markdown into RAG Chunks - Heading-Aware Text Splitter

Pricing

from $0.10 / 1,000 chunk createds

Go to Apify Store
Split Markdown into RAG Chunks - Heading-Aware Text Splitter

Split Markdown into RAG Chunks - Heading-Aware Text Splitter

Split Markdown into heading-aware chunks for RAG. $0.0001 per chunk created. Empty input free. Works from Apify MCP and the API.

Pricing

from $0.10 / 1,000 chunk createds

Rating

0.0

(0)

Developer

Tidy Byte Tools

Tidy Byte Tools

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 days ago

Last modified

Features

Limited permissions

Share

Markdown Chunker for RAG - Heading-Aware Text Splitter

Split Markdown into chunks for RAG, vector databases and AI search. Keeps code blocks and tables whole. Each chunk has its heading path and line numbers. $0.0001 per chunk.

Also searched as: ES: dividir Markdown en chunks para RAG / PT: dividir Markdown em chunks / DE: Markdown in Chunks teilen / FR: découper du Markdown pour le RAG / JA: Markdownチャンク分割、RAG

Example

Input:

# Garden Guide
Welcome! This guide helps you start a small garden.
## Tools
You need a shovel, a rake and gloves.
## Planting
Plant tomatoes after the last frost. Give them sun.
```python
def water(plant):
return plant + " is wet"
```

Output from an actual run (3 chunks, with heading path, line numbers, and text):

{"heading_path": ["Garden Guide"], "start_line": 1, "end_line": 3, "text": "# Garden Guide\n\nWelcome! This guide helps you start a small garden."}
{"heading_path": ["Garden Guide", "Tools"], "start_line": 5, "end_line": 7, "text": "## Tools\n\nYou need a shovel, a rake and gloves."}
{"heading_path": ["Garden Guide", "Planting"], "start_line": 9, "end_line": 16, "text": "## Planting\n\nPlant tomatoes after the last frost. Give them sun.\n\n```python\ndef water(plant):\n return plant + \" is wet\"\n```"}

The free local tool is md-chunk-lite.

Website and local versions

What it does

  • Splits by headings first, so each chunk stays on one topic.
  • Never cuts a code block or table in the middle when it fits.
  • Gives each chunk an id, heading path, anchor and line numbers.
  • Optional overlap between chunks.
  • Ready for vector databases (one chunk per dataset row).

Price

You pay $0.0001 per chunk created (One chunk saved to the dataset.) There is no start fee from us. Apify adds its normal small platform cost. Set a max cost for the run and we stop there. We never charge for work we did not save.

How to use

  1. Add links or paste your data.
  2. Click Start.
  3. Get results in the Output tab, or download them as CSV, Excel or JSON.

Input

  • Markdown file links: Links to .md files (raw GitHub links work).
  • Or paste Markdown: Paste Markdown here.
  • Max characters per chunk: Chunks are never longer than this.
  • Overlap characters: Repeat this many characters from the last chunk. Up to half of max.
  • Put heading path at the top of each chunk: Adds 'Guide > Install' above the text. Helps search.

Example input

This is also the default sample, so a first run works if you just click Start.

{
"markdownText": "# Guide\n\nHello.\n\n## Install\n\n```bash\npip install tool\n```\n\n## Use\n\n| a | b |\n|---|---|\n| 1 | 2 |\n",
"maxChars": 1500,
"overlapChars": 0,
"prefixHeadingPath": false
}

FAQ

What is a heading path? It is the list of headings above a chunk, like Guide > Install. That helps search tools know what the chunk is about.

Will it cut a code block or a table in half? Not if the block fits in the max character size. If a single block is longer than the max, it has to be split.

Can I use a raw GitHub link? Yes. Paste a link that downloads the .md file itself (a raw GitHub link works). You can also paste the Markdown text.

Is there a free version? Yes. md-chunk-lite is free on GitHub and PyPI and runs on your own computer.

Do you keep my text? Your text is used only for your run. Results stay in your own Apify storage, under your storage retention settings.

What do I pay for? You pay $0.0001 for each chunk saved to the dataset. Apify also adds its small standard start fee per run.

Good to know

  • Files up to 50 MB each.
  • Your data is only used for your run.
  • Made by Tidy Byte Tools. Questions? Open an issue on this Actor's page.

More tools from Tidy Byte Tools

These Actors work well together:

Free local tools (no Apify account needed): pdf-table-pull-lite, doc2md-lite, link-check-lite, md-chunk-lite, json-shaper-lite.

Website: https://tidybytetools.github.io. All Actors: apify.com/tidybytetools.

Agent tip

Split Markdown into heading-aware chunks for RAG. $0.0001 per chunk created. Empty input free. Works from Apify MCP and the API.