
Markdown Header Text Splitter
Pricing
$20.00/month + usage

Markdown Header Text Splitter
Split Markdown into structured chunks using header hierarchy. Built with LangChain, it preserves metadata for RAG, documentation, and analysis. Configure headers, strip content, and integrate with vector databases. Ideal for AI workflows.
0.0 (0)
Pricing
$20.00/month + usage
0
Monthly users
2
Runs succeeded
>99%
Last modified
13 days ago
📄 Markdown Header Splitter Actor
Split Markdown content into structured chunks using header hierarchy
This actor intelligently splits Markdown documents into semantically meaningful chunks based on header hierarchy. Built with LangChain's MarkdownHeaderTextSplitter
, it preserves metadata and structure for downstream applications like RAG systems, documentation processing, and content analysis.
🚀 Key Features
✅ Header-Based Chunking
Split content at specified header levels (e.g., #
, ##
, ###
).
✅ Metadata Preservation
Each chunk includes hierarchical header metadata for context tracking.
✅ Flexible Configuration
- Choose which headers to split on
- Strip headers from content or retain them
- Works with any Markdown content
✅ RAG-Ready Output
Chunks are formatted for direct use in vector databases or LLM pipelines.
📝 Use Cases
-
RAG Systems
Split long documents into context-aware chunks for:- Vector database indexing
- Context window optimization
- Knowledge retrieval
-
Documentation Processing
Break technical docs into sections for:- Summarization
- Translation
- Search indexing
-
Content Analysis
Analyze/report on document structure (e.g., API reference parsing).
🛠️ Getting Started
Installation
- Create an Apify account at apify.com
- Navigate to Actor → Search for
markdown-splitter
- Run with Sample Input:
1{ 2 "markdown_text": "# Title\n## Section 1\nContent...\n## Section 2\nMore content...", 3 "headers_to_split_on": ["#", "##"], 4 "strip_headers": true 5}
Input Parameters
Field | Type | Description |
---|---|---|
markdown_text | string | Markdown content to split (required) |
headers_to_split_on | array | Header levels to split on (default: ["#", "##", "###", "####", "#####", "######"] ) |
strip_headers | boolean | Remove headers from chunk content (default: true ) |
Output Format
1{ 2 "chunks": [ 3 { 4 "content": "Section content here", 5 "metadata": { 6 "Header 1": "Title", 7 "Header 2": "Section 1" 8 } 9 }, 10 ... 11 ] 12}
📚 Example Workflow: RAG System Integration
- Input: Technical documentation in Markdown
- Process:
- Split into sections using
##
headers - Strip headers to focus on content
- Split into sections using
- Output:
- Chunks with hierarchy metadata → Embed with OpenAI/LLama
- Store in your favorite vector database like : ChromaDB/Pinecone/Weaviate for retrieval
Pricing
Pricing model
RentalTo use this Actor, you have to pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage.
Free trial
2 hours
Price
$20.00