Scrapling
by D4Vinci
Python web scraping framework for collecting data from websites, from single pages to full crawls.
- Stars
- 105,617 stars
- Forks
- 11k forks
- Last push
- today
- Activity
- Active
# Install with fetchers$ pip install "scrapling[fetchers]"# Download the browsers it needs$ scrapling installCommands from the project's README. Run them after installing (see below).
Overview
Understand Scrapling in 60 seconds
- What it does
- Scrapling is a Python web scraping framework. It combines fast HTTP requests, stealth browsers for JavaScript pages, powerful parsing and concurrent crawling in one library, and can also be used from the terminal or by AI agents through an MCP server.
- The problem it solves
- Scraping modern sites usually means stitching together a request library, a headless browser, a parser and a crawler. Scrapling provides all of these with one API, plus retries, proxy rotation, pause and resume, and exports.
- Why choose it
- Choose it if you want one Python library that goes from a single page to a full crawl. Only scrape sites you are allowed to, and respect their terms and robots rules.
- Who should use it
- Python developers collecting web data
- Data teams building crawlers
- AI agent builders who need web extraction through MCP
- Researchers turning websites into clean Markdown
- Setup difficulty
You'll need:
- Python 3.10 or newer
- Browser dependencies (installed by scrapling install) only if you need browser fetchers
How Scrapling works
Scrapling can fetch pages with fast HTTP requests or stealth browsers that render JavaScript, keep persistent sessions and capture background API calls. Parsing supports CSS, XPath, text and regex search, adaptive element tracking that survives page changes, similar-element matching and clean Markdown output.
Spiders crawl concurrently with proxy rotation, retries, AutoThrottle, pause and resume, streaming and exports to JSON, JSONL, CSV and XML. You can use it from Python, from the terminal with an interactive shell, or from AI agents through its MCP server and Agent Skill.
The base pip install includes only the parser. Install the fetchers extra and run scrapling install to download browsers, or add ai, rag or shell extras for the MCP server, RAG helpers and the shell. Docker images are also published.
Features
Key features
Fetch and interact
HTTP requests, stealth browsers and JavaScript rendering.
Parse and extract
CSS, XPath, regex and adaptive element tracking.
Crawl and export
Concurrent spiders with retries and JSON/CSV/XML export.
MCP server
Let AI agents browse and extract data.
CLI and shell
Scrape from the terminal or an interactive shell.
Markdown output
Turn pages into clean Markdown.
Strengths
- One library for the whole scraping workflow
- Adaptive selectors that survive site changes
- Works from Python, CLI or AI agents
- BSD-3-Clause license
Limitations
- Base install has no fetchers; extras are needed
- Browser fetchers download large browser dependencies
- You are responsible for following each site's terms
Practical use cases
Extract a few fields
Fetch a page and pull values with CSS selectors.
Crawl a site
Write a spider and export results to JSON.
Feed an AI agent
Run the MCP server so an agent can extract web data.
Installation
Install Scrapling
Commands come from Scrapling's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python 3.10+
Supported systems
- Windows
- macOS
- Linux
- 1
Install Scrapling with fetchers
pip install scrapling alone installs only the parser.
Shellpip install "scrapling[fetchers]" - 2
Download browsers and their dependencies
Only needed for browser fetchers; plain HTTP requests don't need it.
Shellscrapling install
- 1
Install all extras (MCP, RAG, shell)
Shellpip install "scrapling[all]" - 2
Download browsers
Shellscrapling install
- 1
Pull the image
Shelldocker pull pyd4vinci/scrapling
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Fetch a page and print quotes
Textfrom scrapling.fetchers import Fetcherpage = Fetcher.get('https://quotes.toscrape.com/')quotes = page.css('.quote .text::text').getall()print(quotes)
Scrapling's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Scrape quotes with a Scrapling spider
Crawl a practice site and save the results to JSON.
Before you start
- Scrapling installed with pip install "scrapling[fetchers]"
- 1
Write a spider
Textfrom scrapling.spiders import Spider, Responseclass QuotesSpider(Spider): name = "quotes" start_urls = ["https://quotes.toscrape.com/"] async def parse(self, response: Response): for quote in response.css('.quote'): yield { "text": quote.css('.text::text').get(), "author": quote.css('.author::text').get(), }result = QuotesSpider().start()print(len(result.items))result.items.to_json("quotes.json") - 2
Run it with Python
What to expect
It prints 10 and saves the quotes and authors to quotes.json.
Next steps
- Add proxy rotation and retries
- Try the interactive shell with pip install "scrapling[shell]"
- Run the MCP server with pip install "scrapling[ai]"
Costs and requirements
What it costs to run
- License
- BSD-3-Clause. Free to use, modify and use commercially.Free
- Library
- Free.Free
- Proxies
- Optional third-party proxies or anti-bot services cost money.Depends
Troubleshooting
Common setup issues
ImportError for scrapling.fetchers or spiders
The base install has only the parser. Install pip install "scrapling[fetchers]" and run scrapling install.
Browsers need reinstalling
Run scrapling install --force.
Need the MCP server or shell
Install the ai or shell extras.
Alternatives
Similar AI repositories
dify
langgenius
Visual workspace for building agentic workflows and RAG pipelines, self-hosted or in the cloud.
MoneyPrinterTurbo
harry0703
Python app that uses AI models to generate short HD videos automatically from a topic or keyword.
VoiceStudio
debpalash
Local voice studio for voice cloning, dubbing, transcription and audiobook creation that runs on your own computer.
last30days-skill
mvanhorn
AI agent skill that researches a topic across Reddit, X, YouTube and the web, then writes a summary.