Skip to main content

Overview

Scrapling provides three main fetcher types, each optimized for different scraping scenarios. All fetchers return the same Response object, making it easy to switch between them.

Fetcher

Fast HTTP requests with browser impersonation

DynamicFetcher

Browser automation for JavaScript sites

StealthyFetcher

Stealth browser with anti-detection

Fetcher (HTTP Client)

The basic Fetcher uses curl_cffi for fast HTTP requests with browser fingerprint impersonation.

When to Use

  • Static HTML pages
  • APIs and JSON endpoints
  • Sites that don’t require JavaScript
  • High-performance scraping (100+ requests/second)
  • When you need HTTP/2 or HTTP/3

Basic Usage

Browser Impersonation

Scrapling can impersonate various browsers to bypass basic fingerprint detection:

Stealth Headers

By default, Scrapling generates realistic browser headers:
Disable for custom headers:

Request Parameters

POST Requests

Async Support

DynamicFetcher (Browser Automation)

The DynamicFetcher uses Playwright to control a real Chromium browser, perfect for JavaScript-heavy sites.

When to Use

  • Single-page applications (SPAs)
  • Sites with dynamic content loaded by JavaScript
  • Pages requiring user interaction
  • Sites that check for browser features
  • When you need to execute custom JavaScript

Basic Usage

JavaScript Execution

Wait for JavaScript to fully load:

Resource Blocking

Speed up requests by blocking unnecessary resources:

Wait for Selectors

Wait for specific elements before returning:

Page Automation

Execute custom browser actions:

Custom JavaScript

Inject JavaScript on page load:

Browser Configuration

Connect to Existing Browser

Async Browser Automation

StealthyFetcher (Anti-Detection)

The StealthyFetcher extends DynamicFetcher with advanced anti-detection techniques.

When to Use

  • Sites with bot detection (Cloudflare, DataDome, PerimeterX)
  • Sites that check for headless browsers
  • Sites with aggressive fingerprinting
  • When you need to bypass CAPTCHAs
  • Production scraping at scale

Basic Usage

Cloudflare Solver

Automatically solve Cloudflare challenges:

Anti-Fingerprinting

Stealth Configuration

All DynamicFetcher options plus:

Stealth Features

The StealthyFetcher automatically:
  • Patches navigator.webdriver detection
  • Randomizes browser fingerprints
  • Adds canvas noise
  • Blocks WebRTC leaks
  • Mimics real user behavior
  • Passes most bot detection tests

Choosing the Right Fetcher

Use Fetcher when:

  • Site is static HTML
  • No JavaScript required
  • Speed is critical
  • API endpoints
  • Simple scraping tasks

Use DynamicFetcher when:

  • JavaScript is required
  • SPA or dynamic content
  • Need to interact with page
  • Custom automation needed

Use StealthyFetcher when:

  • Bot detection present
  • Cloudflare protection
  • Aggressive fingerprinting
  • Production at scale
  • Need maximum stealth

Performance Comparison

Fetcher: ~100-200 req/sDynamicFetcher: ~5-10 req/sStealthyFetcher: ~3-8 req/s

Unified Response API

All fetchers return the same Response type with identical parsing capabilities:

Error Handling

All fetchers support automatic retries:

Advanced: Proxy Rotation

All fetchers support the ProxyRotator for automatic proxy rotation:

Implementation Details

Fetcher Hierarchy

DynamicFetcher Internals

StealthyFetcher Internals

Next Steps

Parsing

Learn to extract data from responses

Sessions

Use sessions for persistent connections

API Reference

Complete fetcher API documentation