Built a deterministic HTML-to-Markdown & LLM Chunker API (cuts RAG token costs by ~90%)

by•

Hey makers đź‘‹

While building RAG pipelines and AI agents, I noticed that feeding raw scraped HTML into LLMs wastes up to 90% of context tokens on navigation bars, cookie banners, ads, and inline scripts—while also hurting retrieval quality.

Instead of relying on slow headless browsers or using another LLM just to clean HTML, I built HTML to Clean Markdown & LLM Chunker — a fast, 4-tier deterministic extraction API hosted on RapidAPI.

What it does:

- 4-Tier Extraction Engine: Strips boilerplate, ads, and nav menus cleanly across articles, docs, and messy pages.

- Dual Input Mode: Pass a live `url` OR pass raw `html` (up to 2 MB, great if you already scraped pages with Playwright/Puppeteer behind bot walls).

- RAG-Ready Chunking: Splits clean Markdown into overlapping chunks (`chunk_size` & `chunk_overlap`) ready for vector embeddings.

- Token Analytics: Returns exact estimated token counts and `token_savings_percent` per request.

It has a free tier (5,000 requests/month) with no credit card required so you can test it right away:

👉

Would love to hear how you currently handle HTML cleaning in your RAG or agent workflows—and any feedback on the API response schema is super welcome!

9 views

Add a comment

Replies

Best

does a code block ever get split across two chunks?