ChimeraMiND Data
Home / Tools / RAG Text Chunker (Markdown to Chunks, Token Counts)
AI & LLM data

RAG Text Chunker (Markdown to Chunks, Token Counts)

Split Markdown or text into RAG-ready chunks with exact OpenAI token counts (o200k/cl100k): heading-aware, code blocks kept whole, sentence-boundary overlap, heading path on every chunk. Chunks any dataset from Website to Markdown, PDF to Markdown or your own texts.

Run RAG Text Chunker (Markdown to Chunks, Token Counts) on Apify →

Pricing

Apify planPer chunkPer 1,000
Free plan$0.0002$0.20
Starter$0.00016$0.16
Scale$0.00014$0.14
Business$0.00012$0.12
Enterprise$0.00012$0.12
Enterprise+$0.00012$0.12

Primary event rates from a catalog snapshot; this is not the total price of a run. Additional charge events and Actor Start fees may apply; start fees can scale with memory. Check the Actor's Pricing tab on Apify for all events, conditions and current plan-specific rates, and set a maximum run budget before starting.

Sample output

No recorded sample is available yet.

Call from code

Use the existing catalog input below as a starting point. Review the tool's input form on Apify before running it.

import json
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("webdatatools/rag-text-chunker").call(run_input=json.loads("{\n    \"texts\": [\n        \"# Guide\\n\\nFirst section text.\\n\\n## Details\\n\\nMore text here.\"\n    ],\n    \"chunkSize\": 500,\n    \"overlap\": 50\n}"))

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('webdatatools/rag-text-chunker').call({
    "texts": [
        "# Guide\n\nFirst section text.\n\n## Details\n\nMore text here."
    ],
    "chunkSize": 500,
    "overlap": 50
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
curl -X POST "https://api.apify.com/v2/acts/webdatatools~rag-text-chunker/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"texts":["# Guide\n\nFirst section text.\n\n## Details\n\nMore text here."],"chunkSize":500,"overlap":50}'

Related tools

Workflows