Web To Markdown Llm avatar

Web To Markdown Llm

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Web To Markdown Llm

Web To Markdown Llm

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Oleksii Tereshchenko

Oleksii Tereshchenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Web to LLM Markdown & RAG Clean Extractor

๐Ÿš€ Convert any website, documentation hub, or blog into clean, token-optimized Markdown ready for LLMs, Claude, GPT-4, Cursor, and RAG pipelines.


๐Ÿ’ก Why this Actor?

When scraping the modern web for AI context windows or Vector DBs (Pinecone, Qdrant, Chroma), standard scrapers dump bloated HTML full of:

  • Cookie consent banners & popups
  • Navbars, footers & sidebar links
  • Tracking scripts, styles & SVG icons
  • Ads, promotional banners & social share widgets

This boilerplate wastes up to 70% of your LLM context tokens and severely degrades model reasoning.

Web to LLM Markdown Extractor solves this by:

  1. Intelligently identifying main content (<article>, <main>, #content, .docs-content, etc.).
  2. Aggressively stripping boilerplate (cookie banners, scripts, navigation, ads).
  3. Converting to clean, semantic Markdown (ATX headings, fenced code blocks, bullet points).
  4. Calculating token & word metrics so you know exact context costs upfront.
  5. Lightweight & Blazing Fast: Pure HTTP crawler powered by Crawlee & Cheerio. No heavy browser overhead, uses minimal RAM (128โ€“256 MB), and crawls hundreds of pages in seconds.

โš™๏ธ Features

  • ๐Ÿ“‘ Single URL or Full Domain Crawling: Scrape a single article or crawl an entire documentation site with maxDepth control.
  • ๐ŸŽฏ Domain-Bound Crawling: Stays on the same hostname so you don't leak into external sites.
  • ๐Ÿงน Deep Noise Filtering: Automatically drops cookies, footers, headers, ads, and inline styles.
  • โšก Token Saver Mode (stripImages): Strip ![alt](url) image tags to minimize LLM token usage.
  • ๐Ÿ”— Clean Text Mode (stripLinks): Convert hyperlinks into plain text for pure text embedding.
  • ๐Ÿ“Š Token & Word Metrics: Provides instant tokenEstimate and wordCount for every page.

๐Ÿ“ฅ Input Configuration

ParameterTypeDefaultDescription
startUrlsArray["https://docs.github.com/en/get-started"]Starting URLs or docs hubs to process.
maxPagesInteger10Maximum number of pages to crawl and convert.
maxDepthInteger1Crawl depth: 0 = only given URLs, 1 = follow internal links 1 level deep.
stripImagesBooleantrueRemove image tags to save prompt context tokens.
stripLinksBooleanfalseConvert hyperlinks to plain text.

Example Input:

{
"startUrls": [
{ "url": "https://docs.github.com/en/get-started" }
],
"maxPages": 15,
"maxDepth": 1,
"stripImages": true,
"stripLinks": false
}

๐Ÿ“ค Output Dataset Format

Each record in the Apify dataset contains clean metadata and pure Markdown:

{
"url": "https://docs.github.com/en/get-started",
"title": "Get started with GitHub documentation",
"description": "Learn how to use GitHub with step-by-step guides and documentation.",
"author": null,
"language": "en",
"markdown": "# Get started with GitHub documentation\n\nGitHub is a code hosting platform for version control and collaboration...\n\n## Quickstart\n\n1. Sign up for GitHub\n2. Create a repository\n3. Start collaborating\n",
"wordCount": 384,
"tokenEstimate": 450,
"crawledAt": "2026-09-17T15:10:00.000Z"
}

๐Ÿ› ๏ธ Python & LangChain Quickstart

Use the Apify Python client to ingest web docs directly into your RAG pipeline:

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
# Run the Actor
run = client.actor("vujofix/web-to-markdown-llm").call(run_input={
"startUrls": [{"url": "https://docs.stripe.com/api"}],
"maxPages": 20,
"maxDepth": 1,
"stripImages": True
})
# Fetch cleaned Markdown records
dataset = client.dataset(run["defaultDatasetId"]).list_items().items
for page in dataset:
print(f"Title: {page['title']}")
print(f"Estimated Tokens: {page['tokenEstimate']}")
# Pass page['markdown'] to your Vector Store or LLM context

๐Ÿ’ฐ Pricing

  • Pay-Per-Event: $2.00 / 1,000 pages
  • Incredibly cost-effective: A full documentation scrape of 100 pages costs just $0.20, saving hours of manual cleanup and hundreds of dollars in wasted LLM tokens.

๐Ÿ›ก๏ธ License

Apache-2.0