Cloudflare 403 and "Just a moment..." When Scraping: Causes and Fixes

Almost every scraper eventually meets Cloudflare. The symptoms vary — an HTTP 403, a page that says "Just a moment..." forever, a "Verify you are human" box, or a flat Error 1020: Access denied — but they all mean Cloudflare decided your request does not look like a normal visitor.

The fix depends on which of these you are hitting. This guide helps you identify the case and apply the right solution.

Respect each site's terms of service and robots rules, and keep your request rate reasonable.

Step 1: Identify what Cloudflare is showing you

Save the response body and status code, then compare:

What you see Status What it is
"Just a moment..." / "Checking your browser" page 403 or 503 Managed / JS Challenge — a full-page interstitial
A form with a "Verify you are human" widget 200 Turnstile embedded in the page
"Error 1020 Access denied" 403 A firewall rule blocks you (IP, country, ASN, path…)
"Error 1015 You are being rate limited" 429 Rate limiting
Plain 403 with a Cloudflare Ray ID, no challenge 403 Bot score too low — your client looks automated

A quick check in Python:

Python
import requests

r = requests.get("https://example.com", timeout=30)
body = r.text

if "Just a moment" in body or "_cf_chl_opt" in body:
    print("Cloudflare Challenge page")
elif "cf-turnstile" in body:
    print("Turnstile widget on the page")
elif "error code: 1020" in body.lower() or "Error 1020" in body:
    print("Firewall rule (1020)")
elif r.status_code == 429:
    print("Rate limited")
else:
    print(r.status_code, r.headers.get("server"), r.headers.get("cf-ray"))

Why plain HTTP clients get blocked

Cloudflare scores every request using signals such as:

  • TLS and HTTP/2 fingerprints — Python requests, Go's net/http and Node's axios negotiate TLS differently from Chrome, and Cloudflare can tell.
  • Headers — missing or inconsistent User-Agent, Accept-Language, Sec-CH-UA and friends.
  • IP reputation — datacenter IPs and heavily used proxies score badly.
  • JavaScript execution — challenges require running Cloudflare's script, which an HTTP client cannot do.
  • Behaviour — request rate and navigation pattern.

Some of these you can fix yourself; JavaScript challenges you cannot solve without a real browser environment.

Fixes for each case

Plain 403 (low bot score)

Start with the cheap fixes:

  1. Send a complete, consistent set of browser headers — User-Agent, Accept, Accept-Language, and matching Sec-CH-UA* Client Hints.
  2. Switch from datacenter IPs to clean residential or mobile proxies.
  3. Slow down and add jitter between requests.
  4. Use a client with a browser-like TLS fingerprint if your language has one.

If the site escalates to a challenge page after that, move to the next fix.

"Just a moment..." (Challenge page)

The challenge has to be solved by a browser that passes Cloudflare's checks. After it succeeds, Cloudflare sets a cf_clearance cookie that lets the same client through for a while.

With SolverCF you get that cookie from an API call — no browser to maintain:

JSON
{
  "clientKey": "YOUR_CLIENT_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteUrl": "https://example.com/",
    "websiteKey": "0x4AAAAAAAAjq6WYeRDKmebM",
    "cloudflareTaskType": "cookie",
    "proxy": "203.0.113.10:8080:user:pass"
  }
}

Three rules make the cookie work:

  • Solve through the same proxy you scrape with — the cookie is bound to that IP.
  • Send the same User-Agent and Client Hints that the solver returns.
  • Reuse the cookie across requests and refresh it only when you get challenged again.

The complete Python implementation is in How to Get the cf_clearance Cookie with Python.

Turnstile widget in a form

Here you need a token, not a cookie. Read the widget's site key, solve it, and submit the token as the cf-turnstile-response field together with the matching User-Agent:

Error 1020 (firewall rule)

A 1020 is a hard rule set by the site owner, for example blocking a country, an ASN or a URL path. No challenge solving helps here. Your options are to request from an allowed location (a proxy in a permitted country or network) or to contact the site owner for access.

Error 1015 (rate limiting)

You are sending too many requests. Reduce concurrency, add delays, spread the load over more IPs, and cache pages you have already fetched.

A practical checklist

  1. Detect which Cloudflare response you are getting before changing anything.
  2. Fix headers, proxies and rate first — they are free.
  3. For challenge pages, get a cf_clearance cookie through your own proxy and reuse it.
  4. For Turnstile forms, solve a fresh token per submit.
  5. Log the cf-ray header of failures; it helps when debugging with support.

Try it

SolverCF solves Cloudflare Challenge and Turnstile through one API, and you only pay for successful solves. New accounts get 100 free solves automatically, and your first deposit is doubled. Start with the Getting Started guide or browse the full documentation.