Llm Ready Documentation Scraper avatar
Llm Ready Documentation Scraper

Pricing

Pay per usage

Go to Apify Store
Llm Ready Documentation Scraper

Llm Ready Documentation Scraper

Developers and AI agents need to read documentation (e.g. Stripe Docs, Next.js Docs), but standard scrapers return noisy HTML that includes: navigation bars headers / footers ads / cookie banners This Actor must return pure content-only Markdown, suitable for vectorization and semantic search.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Sean

Sean

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

8 days ago

Last modified

Share

LLM-Ready Documentation Scraper

Crawl any documentation website and get clean, formatted Markdown perfect for LLMs and RAG (Retrieval-Augmented Generation) applications.

🎯 Problem

Developers and AI agents need to read documentation (Stripe Docs, Next.js Docs, etc.), but standard scrapers return messy HTML with navbars, footers, and ads. This Actor solves that by delivering pure, clean Markdown.

✨ Features

  • Clean Markdown Output: Strips navigation, sidebars, footers, scripts, and ads
  • Smart Content Detection: Automatically finds the main content area
  • Token Counting: Each page includes token count for LLM context planning
  • Merge Mode: Combine all pages into a single full_documentation.md file
  • Configurable Depth: Control how deep to crawl
  • URL Filtering: Include/exclude patterns using globs

πŸ“₯ Input

FieldTypeDescription
startUrlStringThe root URL of the documentation site
maxDepthNumberMaximum link depth to crawl (default: 10)
maxPagesNumberMaximum pages to scrape (default: 100)
includeGlobsArrayURL patterns to include
excludeGlobsArrayURL patterns to exclude
excludeElementsStringCSS selectors to remove
contentSelectorStringCSS selector for main content
mergeOutputBooleanCombine all pages into one file

πŸ“€ Output

Each page is stored in the dataset with:

{
"url": "https://docs.example.com/api/auth",
"title": "Authentication",
"markdown": "# Authentication\n\nThis guide covers...",
"tokenCount": 1523,
"scrapedAt": "2024-01-15T10:30:00.000Z"
}

When mergeOutput is enabled, a combined full_documentation.md is saved to the Key-Value Store.

πŸš€ Usage Examples

Crawl Stripe Docs

{
"startUrl": "https://stripe.com/docs/api",
"maxPages": 50,
"mergeOutput": true
}

Crawl with Custom Content Selector

{
"startUrl": "https://nextjs.org/docs",
"contentSelector": ".docs-content",
"excludeElements": "nav, footer, .sidebar, .carbon-ads",
"maxDepth": 3
}

πŸ”§ Technical Details

  • Built with TypeScript and the Apify SDK
  • Uses CheerioCrawler for fast HTML parsing
  • Turndown library for HTML-to-Markdown conversion
  • gpt-tokenizer for accurate token counting

πŸ“ License

ISC