D4Vinci/Scrapling
Python HTTP and browser crawlers that turn websites into RAG-ready Markdown
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Scrapling is a Python acquisition and extraction layer for RAG, not a database. Fetcher handles direct HTTP requests, while Chromium-backed fetchers render and interact with JavaScript pages. The returned page exposes a common DOM extraction interface across fetch paths. Persistent sessions retain cookies and browser state, and a spider can route requests by session ID so only pages that need rendering incur browser overhead.
The crawler follows a Scrapy-like model: start_urls seeds requests, and asynchronous parse callbacks yield records or follow-up requests through Request and Response objects. Python and the CLI provide direct access; MCP exposes fetching and browser operations to agents. CDP is a separate integration surface for connecting to an existing browser. The package builds with setuptools and wheel; the Docker build uses uv and installs Chromium through Patchright.
Key Capabilities & Differentiators
Extraction combines CSS, XPath, text, and regex queries with DOM traversal, generated selectors, and similarity-based element relocation. Adaptive matching can recover from some layout changes, but a match is not proof that the field still has the same meaning. Browser sessions can retain state and record background API responses. page.markdown() and the ContentSpider template produce Markdown without an LLM, leaving document chunking and retrieval to downstream components.
For batch collection, spiders support configurable concurrency, per-domain delays, AutoThrottle with Retry-After handling, and optional robots.txt enforcement. crawldir preserves pending requests and seen URLs for restart, while development mode replays saved responses to test parsing without fetching again. Sitemap, link-following, and feed templates cover common discovery patterns. Jobs can stream records as they arrive or export JSON, JSONL, CSV, or XML.
Trade-offs & Limitations
The strongest reason to choose Scrapling over a standalone BeautifulSoup-style parser is that one interface spans acquisition, parsing, and crawling. If an existing Scrapy setup already handles scheduling and downloads well, adopting only the parser through scrapling_response is a smaller change than migrating spiders. HTTP-first routing avoids paying Chromium's CPU and memory cost on static HTML; browser-backed requests add rendering coverage but make throughput more sensitive to page complexity and session concurrency.
Validate adaptive extraction against known results: a plausible but wrong match can quietly contaminate a RAG corpus. Likewise, a resumable crawl directory is not a document store or retrieval index, and Markdown output does not replace deduplication or source tracking. Keep those responsibilities downstream. BSD-3-Clause governs use and redistribution of the software, not permission to collect site content; configure crawl limits and authorization for each source.
Hardware & Deployment Guide
For static pages, start with the Python API or CLI and a direct HTTP fetcher. Add Chromium only where rendering or interaction is required. The supplied Dockerfile uses python:3.12-slim-trixie, syncs Python extras with uv, and installs Chromium and its system dependencies through Patchright. A browser can also run separately and be reached over CDP. HTML parsing and Markdown conversion require no model inference; CPU and memory sizing should be based on rendered page complexity and concurrent browser sessions, not VRAM.
For a self-hosted agent integration, MCP supports HTTP transport with authentication options. Restrict its network reach and protect persisted login state; store crawl state on persistent storage if restarts must survive container replacement. The v0.5 line introduced broad interface changes, v0.5.1 expanded browser interaction and remote sessions, and v0.5.2 notes breaking changes for spiders, HTTP uploads, and custom browser paths. Pin the deployed version and regression-test those paths before upgrading.
crawldir checkpoints and disk-backed response replay.page.markdown() converts individual pages, while ContentSpider builds a site-wide corpus without LLM inference.Teams turning authorized documentation sites, help centers, or feeds into structured records or Markdown, especially when static and JavaScript-rendered pages must share one crawl pipeline.
You need an end-to-end RAG database or retrieval service, or a simple parser already covers your static pages.
Quick Start & Installation
pip install "scrapling[shell]" scrapling shell
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| Scrapling ★ | 107.9k | +1.8k | Python | BSD-3-Clause | Python HTTP and browser crawlers that turn websites into RAG-ready Markdown |
| crawl4ai | 88.5k | +408 | Python | Apache-2.0 | Async browser crawler that turns web pages into Markdown and JSON for RAG |
| firecrawl | 216.5k | +4.6k | TypeScript | AGPL-3.0 | Local and hosted web ingestion that turns sites into RAG-ready Markdown |
| mempalace | 60.8k | +120 | Python | MIT | Local-first RAG memory for retrieving verbatim project and conversation history |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/D4Vinci/Scrapling.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about Scrapling
Where does Scrapling fit in an existing RAG or Scrapy pipeline?
Fetcher for individual pages or ContentSpider for a site-wide Markdown corpus. Pass the output downstream with the source URL and crawl metadata, then handle deduplication, chunking, embeddings, indexing, and retrieval separately. If Scrapy already handles fetching, scrapling_response lets you adopt Scrapling’s parser in existing callbacks.Does it need a GPU, and how should I size crawl workers?
Can we self-host Scrapling commercially?
When should I choose Scrapling over Scrapy or a standalone parser?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy