# Cloudflare Bypass Scraper Pro (`xtech/cloudflare-scraper-pro`) Actor

Cloudflare Scraper Pro: The ultimate solution for scraping Cloudflare-protected websites. Advanced browser automation with intelligent Turnstile & CAPTCHA bypass, automatic Cloudflare challenge resolution, and robust proxy rotation to extract data from the most heavily protected sites.

- **URL**: https://apify.com/xtech/cloudflare-scraper-pro.md
- **Developed by:** [Xtech](https://apify.com/xtech) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 69 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Cloudflare Scraper Pro - Turnstile & CAPTCHA Bypass

### Ultimate Solution for Cloudflare-Protected Websites

**Cloudflare Scraper Pro** is the ultimate web scraping solution designed specifically to bypass Cloudflare's most advanced protection systems including Turnstile challenges, CAPTCHA verification, and sophisticated bot detection mechanisms.

### What it does

- **Turnstile Bypass**: Automatically handles Cloudflare's Turnstile challenges
- **CAPTCHA Resolution**: Intelligent CAPTCHA detection and bypass
- **Advanced Bot Detection**: Bypasses Cloudflare's sophisticated anti-bot systems
- **JavaScript-Heavy Sites**: Full support for dynamic, JavaScript-rendered content
- **Enterprise-Grade**: Professional solution for the most heavily protected websites

### How to use it

1. Enter the URLs you want to scrape
2. Configure retry settings and proxies if needed
3. Add custom JavaScript if you need to extract specific data
4. Run the scraper and get your results

### Key features

- **Turnstile & CAPTCHA Bypass**: Advanced algorithms to bypass Cloudflare's latest protection systems
- **Intelligent Retry Logic**: Smart retry mechanisms with exponential backoff for failed requests
- **Premium Proxy Rotation**: Built-in proxy support for maximum success rates
- **Custom JavaScript Execution**: Run your own JavaScript code on each protected page
- **Complete HTML Capture**: Get the full rendered HTML after all dynamic content loads
- **Enterprise Scalability**: Process hundreds of URLs simultaneously
- **Browser Automation**: Advanced headless browser capabilities for complex sites

### Example use cases

- **E-commerce Scraping**: Monitor competitor prices on Cloudflare-protected e-commerce sites
- **Market Research**: Collect data from heavily protected financial and market research platforms
- **Lead Generation**: Extract contact details from business directories behind Cloudflare
- **Price Intelligence**: Track product availability and pricing on protected retail sites
- **Competitive Intelligence**: Gather strategic data from competitor websites with advanced protection
- **Real Estate Data**: Scrape property listings from protected real estate platforms
- **Travel & Booking**: Extract pricing and availability from protected booking systems

### Getting your data

**Cloudflare Scraper Pro** returns comprehensive, structured data with:

- **Scraped URL**: The original URL that was successfully processed
- **JavaScript Results**: Output from your custom JavaScript execution on protected pages
- **Complete HTML**: Full rendered HTML content after bypassing all Cloudflare protections
- **Success Metadata**: Detailed information about the scraping process and any challenges overcome

### Testing Cloudflare Scraper Pro

**Cloudflare Scraper Pro** comes with a pre-configured example to demonstrate its Turnstile and CAPTCHA bypass capabilities:

```json
{
  "urls": ["https://www.apify.com/"],
  "max_retries_per_url": 2,
  "proxy": {
    "useApifyProxy": false
  },
  "js_script": "return document.title;",
  "js_timeout": 10,
  "retrieve_result_from_js_script": true,
  "page_is_loaded_before_running_script": true,
  "execute_js_async": false,
  "retrieve_html_from_url_after_loaded": true
}
```

**To test the Turnstile & CAPTCHA bypass capabilities:**

```bash
apify run
```

This will demonstrate how **Cloudflare Scraper Pro** automatically handles Cloudflare's protection systems and successfully extracts data from protected websites.

### Enterprise Support & Documentation

**Cloudflare Scraper Pro** is backed by comprehensive documentation and enterprise-grade support:

- **Full Documentation**: Complete API reference and integration guides
- **Enterprise Support**: Priority support for mission-critical deployments
- **Custom Solutions**: Professional services for complex scraping requirements
- **Regular Updates**: Continuous improvements to bypass the latest Cloudflare protections

If you have questions or need assistance with **Cloudflare Scraper Pro**, please contact our enterprise support team through the Apify console or visit our documentation portal.

# Actor input Schema

## `max_retries_per_url` (type: `integer`):

Maximum waiting time when accessing the links you provided.

## `proxy` (type: `object`):

Add a proxy to ensure that during the data collection process, you are not detected as a bot.

## `urls` (type: `array`):

Links to web pages.

## `js_script` (type: `string`):

JS script you want to run

## `js_timeout` (type: `integer`):

Maximum execution time for JavaScript operations

## `retrieve_result_from_js_script` (type: `boolean`):

Retrieve result from JS script

## `page_is_loaded_before_running_script` (type: `boolean`):

Page is loaded before running script

## `execute_js_async` (type: `boolean`):

Execute JS async

## `retrieve_html_from_url_after_loaded` (type: `boolean`):

Retrieve page HTML from url after loaded

## Actor input object example

```json
{
  "max_retries_per_url": 2,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SG"
  },
  "urls": [
    {
      "url": "https://gitlab.com/"
    },
    {
      "url": "https://www.manta.com/"
    },
    {
      "url": "https://www.cardmarket.com/en"
    }
  ],
  "js_script": "return 10 + 10 + 20",
  "js_timeout": 10,
  "retrieve_result_from_js_script": true,
  "page_is_loaded_before_running_script": true,
  "execute_js_async": false,
  "retrieve_html_from_url_after_loaded": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "SG"
    },
    "urls": [
        {
            "url": "https://gitlab.com/"
        },
        {
            "url": "https://www.manta.com/"
        },
        {
            "url": "https://www.cardmarket.com/en"
        }
    ],
    "js_script": "return 10 + 10 + 20"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtech/cloudflare-scraper-pro").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "SG",
    },
    "urls": [
        { "url": "https://gitlab.com/" },
        { "url": "https://www.manta.com/" },
        { "url": "https://www.cardmarket.com/en" },
    ],
    "js_script": "return 10 + 10 + 20",
}

# Run the Actor and wait for it to finish
run = client.actor("xtech/cloudflare-scraper-pro").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SG"
  },
  "urls": [
    {
      "url": "https://gitlab.com/"
    },
    {
      "url": "https://www.manta.com/"
    },
    {
      "url": "https://www.cardmarket.com/en"
    }
  ],
  "js_script": "return 10 + 10 + 20"
}' |
apify call xtech/cloudflare-scraper-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtech/cloudflare-scraper-pro"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2kD0tO3s8ea0EqUI2/builds/kVL6ilJd8uWjlfhJD/openapi.json
