URL & Docs to Clean RAG Markdown Chunker API
Strip navigation bars, footers, and cookie banners automatically and split clean Markdown along headings for vector embeddings.
Query Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| url | Yes | Required | Public documentation page or article URL to convert and chunk. |
| chunkSize | No | 2000 | Target maximum character size per chunk (400 to 8000). |
Sample JSON Response
{
"url": "https://fastapi.tiangolo.com/tutorial/first-steps/",
"pageTitle": "First Steps",
"chunkCount": 4,
"chunks": [
{
"chunkId": "9f8c1d2e3a4b5c6d",
"heading": "Step 1: import FastAPI",
"estimatedTokens": 482,
"markdown": "# First Steps\n\n..."
}
]
}Quickstart Code
cURL
curl -H "X-API-Key: $IRRIGATING_API_KEY" \ "https://irrigatingintelligence.com/api/markdown?url=https://fastapi.tiangolo.com/tutorial/first-steps/&chunkSize=2000"
TypeScript (Fetch)
const res = await fetch(
'https://irrigatingintelligence.com/api/markdown?url=https://fastapi.tiangolo.com/tutorial/first-steps/&chunkSize=2000',
{ headers: { 'X-API-Key': process.env.IRRIGATING_API_KEY! } }
);
console.log(await res.json());Python (Requests)
import os, requests
res = requests.get(
'https://irrigatingintelligence.com/api/markdown',
params={'url': 'https://fastapi.tiangolo.com/tutorial/first-steps/', 'chunkSize': 2000},
headers={'X-API-Key': os.environ['IRRIGATING_API_KEY']},
)
print(res.json())Call via Hosted MCP
This endpoint is exposed to AI agents as tool url_to_rag_markdown on our hosted Streamable HTTP MCP server at https://irrigatingintelligence.com/api/mcp or locally via npx -y kickybreaks-b2b-ai-data-mcp.
Subscribe Direct (All 12 APIs + MCP)
One kb_live_... key unlocks all 12 REST endpoints and the hosted MCP server. Delivered on screen right after checkout.
Starter
$19/mo
10,000 calls/mo
Pro
$49/mo
50,000 calls/mo
Scale
$199/mo
300,000 calls/mo
Frequently Asked Questions
How does boilerplate removal work?
The parser prioritizes semantic article/main containers and strips navbars, footers, sidebars, and script tags before converting HTML to Markdown.
Are code blocks and tables preserved?
Yes. Fenced code blocks, headings, lists, and Markdown tables are preserved cleanly inside chunks.
Can I ingest an entire sitemap.xml in batch?
Yes. Use our companion Apify Actor at apify.com/kickybreaks/docs-to-rag-markdown-chunker for bulk sitemap crawling.