> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/D4Vinci/Scrapling/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Scrapling

> An adaptive web scraping framework that handles everything from a single request to a full-scale crawl

<img className="block dark:hidden" src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/docs/assets/cover_light.svg" alt="Scrapling Logo" />

<img className="hidden dark:block" src="https://raw.githubusercontent.com/D4Vinci/Scrapling/main/docs/assets/cover_dark.svg" alt="Scrapling Logo" />

## Effortless Web Scraping for the Modern Web

Scrapling is an adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl.

Its parser learns from website changes and automatically relocates your elements when pages update. Its fetchers bypass anti-bot systems like Cloudflare Turnstile out of the box. And its spider framework lets you scale up to concurrent, multi-session crawls with pause/resume and automatic proxy rotation — all in a few lines of Python.

**One library, zero compromises.**

## Quick Example

Get started with Scrapling in seconds:

<CodeGroup>
  ```python Stealthy Fetcher theme={null}
  from scrapling.fetchers import StealthyFetcher

  StealthyFetcher.adaptive = True
  # Fetch website under the radar!
  page = StealthyFetcher.fetch('https://example.com', headless=True, network_idle=True)

  # Scrape data that survives website design changes!
  products = page.css('.product', auto_save=True)

  # Later, if the website structure changes, pass `adaptive=True` to find them!
  products = page.css('.product', adaptive=True)
  ```

  ```python HTTP Requests theme={null}
  from scrapling.fetchers import Fetcher

  # Fast HTTP requests with TLS fingerprinting
  page = Fetcher.get('https://quotes.toscrape.com/', impersonate='chrome')

  # Extract data with CSS selectors
  quotes = page.css('.quote .text::text').getall()
  ```

  ```python Full Spider theme={null}
  from scrapling.spiders import Spider, Response

  class MySpider(Spider):
      name = "demo"
      start_urls = ["https://example.com/"]

      async def parse(self, response: Response):
          for item in response.css('.product'):
              yield {"title": item.css('h2::text').get()}

  MySpider().start()
  ```
</CodeGroup>

## Key Features

<CardGroup cols={2}>
  <Card title="Adaptive Scraping" icon="brain">
    Smart element tracking that relocates elements after website changes using intelligent similarity algorithms
  </Card>

  <Card title="Anti-Bot Bypass" icon="shield">
    Bypass Cloudflare Turnstile, CDP leaks, and other anti-bot systems out of the box with StealthyFetcher
  </Card>

  <Card title="Full Crawling Framework" icon="spider">
    Scrapy-like spider API with concurrent crawling, pause/resume, multi-session support, and streaming mode
  </Card>

  <Card title="Blazing Fast" icon="bolt">
    Optimized performance outperforming most Python scraping libraries with 10x faster JSON serialization
  </Card>

  <Card title="Session Management" icon="layer-group">
    Persistent sessions with FetcherSession, StealthySession, and DynamicSession for state management across requests
  </Card>

  <Card title="Developer Friendly" icon="code">
    Interactive IPython shell, complete type hints, familiar BeautifulSoup/Scrapy-like API, and auto selector generation
  </Card>
</CardGroup>

## Three Powerful Ways to Scrape

### 1. HTTP Requests - Fast & Stealthy

Perfect for static pages and APIs. Impersonate browsers' TLS fingerprints and use HTTP/3:

```python theme={null}
from scrapling.fetchers import Fetcher, FetcherSession

with FetcherSession(impersonate='chrome') as session:
    page = session.get('https://quotes.toscrape.com/', stealthy_headers=True)
    quotes = page.css('.quote .text::text').getall()
```

### 2. Dynamic Loading - Full Browser Automation

For JavaScript-heavy sites using Playwright's Chromium:

```python theme={null}
from scrapling.fetchers import DynamicFetcher

page = DynamicFetcher.fetch(
    'https://quotes.toscrape.com/',
    headless=True,
    disable_resources=True,
    network_idle=True
)
data = page.css('.quote .text::text').getall()
```

### 3. Stealthy Fetching - Advanced Anti-Bot Bypass

Bypass Cloudflare and other protection systems:

```python theme={null}
from scrapling.fetchers import StealthyFetcher

page = StealthyFetcher.fetch(
    'https://nopecha.com/demo/cloudflare',
    solve_cloudflare=True,
    headless=True
)
data = page.css('#padded_content a').getall()
```

## Why Choose Scrapling?

<AccordionGroup>
  <Accordion title="Battle-Tested Architecture">
    * 92% test coverage with full type hints
    * Used daily by hundreds of web scrapers
    * Memory efficient with optimized data structures
    * Complete PyRight and MyPy validation
  </Accordion>

  <Accordion title="Advanced Parsing Capabilities">
    * CSS selectors, XPath, regex, and text-based search
    * Smart element navigation (parent, sibling, child)
    * Auto-generate robust selectors for any element
    * Find similar elements automatically
  </Accordion>

  <Accordion title="AI Integration & CLI">
    * Built-in MCP server for AI-assisted scraping
    * Interactive Web Scraping shell with IPython
    * Extract content without writing code
    * Convert curl requests to Scrapling
  </Accordion>
</AccordionGroup>

## Performance Benchmarks

Scrapling outperforms most Python scraping libraries:

| Library              | Text Extraction (5000 elements) | vs Scrapling  |
| -------------------- | ------------------------------- | ------------- |
| Scrapling            | 2.02 ms                         | 1.0x          |
| Parsel/Scrapy        | 2.04 ms                         | 1.01x         |
| Raw Lxml             | 2.54 ms                         | 1.26x         |
| PyQuery              | 24.17 ms                        | \~12x slower  |
| BeautifulSoup (lxml) | 1584.31 ms                      | \~784x slower |

<Note>
  See the full [benchmarks](https://github.com/D4Vinci/Scrapling#performance-benchmarks) for detailed methodology and additional comparisons.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install Scrapling and set up browsers
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Get up and running in minutes
  </Card>

  <Card title="Choose Your Fetcher" icon="compass" href="/fetching/choosing-fetcher">
    Learn which fetcher fits your use case
  </Card>

  <Card title="Build Spiders" icon="spider" href="/spiders/getting-started">
    Scale up to full crawling
  </Card>
</CardGroup>
