Markdown Header Text Splitter

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.

OPEN_SOURCEAIAGENTSApify

📄 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

  1. RAG Systems
    Split long documents into context-aware chunks for:

    • Vector database indexing
    • Context window optimization
    • Knowledge retrieval
  2. Documentation Processing
    Break technical docs into sections for:

    • Summarization
    • Translation
    • Search indexing
  3. Content Analysis
    Analyze/report on document structure (e.g., API reference parsing).


🛠️ Getting Started

Installation

  1. Create an Apify account at apify.com
  2. Navigate to Actor → Search for markdown-splitter
  3. 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

FieldTypeDescription
markdown_textstringMarkdown content to split (required)
headers_to_split_onarrayHeader levels to split on (default: ["#", "##", "###", "####", "#####", "######"])
strip_headersbooleanRemove 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

  1. Input: Technical documentation in Markdown
  2. Process:
    • Split into sections using ## headers
    • Strip headers to focus on content
  3. Output:
    • Chunks with hierarchy metadata → Embed with OpenAI/LLama
    • Store in your favorite vector database like : ChromaDB/Pinecone/Weaviate for retrieval

Frequently Asked Questions

Is it legal to scrape job listings or public data?

Yes, if you're scraping publicly available data for personal or internal use. Always review Websute's Terms of Service before large-scale use or redistribution.

Do I need to code to use this scraper?

No. This is a no-code tool — just enter a job title, location, and run the scraper directly from your dashboard or Apify actor page.

What data does it extract?

It extracts job titles, companies, salaries (if available), descriptions, locations, and post dates. You can export all of it to Excel or JSON.

Can I scrape multiple pages or filter by location?

Yes, you can scrape multiple pages and refine by job title, location, keyword, or more depending on the input settings you use.

How do I get started?

You can use the Try Now button on this page to go to the scraper. You’ll be guided to input a search term and get structured results. No setup needed!