# 🛡️⚡ Cloudflare Scraper - Bypass All Captchas (`neatrat/cloudflare-scraper`) Actor

Updated June 2025, No proxies needed! A powerful web scraper that bypasses Cloudflare protection.

- **URL**: https://apify.com/neatrat/cloudflare-scraper.md
- **Developed by:** [Neatrat](https://apify.com/neatrat) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 164 total users, 16 monthly users, 98.7% runs succeeded, 4 bookmarks
- **User rating**: 3.32 out of 5 stars

## Pricing

from $30.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cloudflare Scraper

Fetch one public web page and return its HTML, cookies, browser user agent, HTTP status, and timestamp. Verification pages and access blocks are reported as failures. Some sites cannot be read; a successful scrape is not guaranteed.

### Input

`url` is required and must be an HTTP or HTTPS URL. Existing `proxy` and `cookies` inputs remain supported:

```json
{
  "url": "https://www.capterra.com/",
  "cookies": [{ "name": "session", "value": "example" }],
  "proxy": { "url": "http://proxy.example.com:8080", "username": "user", "password": "pass" }
}
```

Proxies are supplied by default. A custom proxy overrides the default. Cookie domain, path, and secure values are filled in when omitted. Only GET is supported. Earlier versions ignored `method`, `body`, and `headers`; unsupported values now produce an explicit error.

### Results

A successful run writes one item to the default dataset and the same item to the default key-value store as `OUTPUT`:

```json
{
  "url": "https://www.capterra.com/",
  "content": "<html>...</html>",
  "cookies": [],
  "userAgent": "Mozilla/5.0...",
  "status": 200,
  "success": true,
  "timestamp": "2026-09-30T12:00:00.000Z"
}
```

An unsuccessful run has status FAILED, an empty default dataset, and an `OUTPUT` record containing `url`, `error`, `success: false`, and `timestamp`. Unlike earlier versions, failed pages are not dataset items, so they are not billed as successful pages.

### Billing

When Pay-Per-Event pricing is enabled, each successfully returned page is one automatic `apify-default-dataset-item` event. The minimum is one successful page per run; no extra minimum event is needed. Failed runs produce no paid page event. The actor stops before requesting a page when the maximum charge cannot cover another item. See the actor's Pricing tab for the active price; this code update does not change pricing.

### Operator setup

Set `FLARESOLVERR_URLS` to a comma-separated list of solver URLs. Set `PROXY_SERVER`, `PROXY_USERNAME`, and `PROXY_PASSWORD` for the included proxy. Store credentials as secret actor environment variables. Requests try the configured instances in rotating order, with a 50-second attempt limit and a 150-second overall limit.

Run `bun install`, `bun run build`, and `bun test`. Start locally with `apify run` or `bun run start` and an input in the default key-value store.

# Actor input Schema

## `url` (type: `string`):

The URL to scrape. Must include protocol (http:// or https://)

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

Optional custom proxy configuration. If not provided, we use our own proxies. Format: {"url": "http://proxy.com:8080", "username": "user", "password": "pass"}

## `cookies` (type: `array`):

Optional cookies to include in the request. Format: \[{"name": "cookieName", "value": "cookieValue", "domain": "example.com"}]

## Actor input object example

```json
{
  "url": "https://www.capterra.com/p/186596/Slack/reviews/"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "url": "https://www.capterra.com/p/186596/Slack/reviews/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("neatrat/cloudflare-scraper").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 = { "url": "https://www.capterra.com/p/186596/Slack/reviews/" }

# Run the Actor and wait for it to finish
run = client.actor("neatrat/cloudflare-scraper").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 '{
  "url": "https://www.capterra.com/p/186596/Slack/reviews/"
}' |
apify call neatrat/cloudflare-scraper --silent --output-dataset

```

## MCP server setup

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

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/pQmpa6v5CVbke4nu4/builds/grhY4VtUm8od7T6d6/openapi.json
