cf_clearanceis the cookie Cloudflare sets once a visitor passes a challenge. Send it on later requests and Cloudflare lets you through without re-challenging — for a while.
Why copying it from your browser doesn’t work
A cf_clearance cookie is bound to three things: your exit IP, your User-Agent, and your TLS fingerprint. Paste it into a script and it fails instantly, because your script’s IP, UA, and TLS handshake don’t match the browser that earned it. That’s the single most common reason a copied cookie “doesn’t work.”
Get a matching one from an API
RaptorWayz solves the challenge and returns a cookie together withthe User-Agent and a proxy on the IP it was solved on — so all three match by construction. Use them together:
import requests
# 1. Ask RaptorWayz to solve the challenge.
r = requests.post(
"https://raptorwayz.com/v1/solve",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"domain": "example.com"},
).json()
# 2. Use the cookie + User-Agent + proxy TOGETHER on your own request.
resp = requests.get(
"https://example.com/",
headers={"User-Agent": r["user_agent"]},
cookies={"cf_clearance": r["cf_clearance"]},
proxies={"https": r["proxy"]},
)
print(resp.status_code) # 200The response also includes expires_at (unix seconds) so you know when to re-solve. Repeat requests for the same domain inside the 25-minute window return the same cookie for free. More detail in the docs, and see how to fix Cloudflare 403s while scraping.