CloudFlare

CloudFlare WAF

Bypass the CloudFlare 5-second "Please Wait" browser verification challenge. Returns session cookies, attributes, and headers for authenticated requests.

Endpoint

POSThttps://api.peak.fo/solve

Request

FieldTypeRequired
task_typestringYes
urlstringYes
proxystringYes

JSON Request Body

{
  "task_type": "cloudflare5stask",
  "url": "https://example.com/",
  "proxy": "http://user:pass@ip:port"
}

Response

{
  "success": true,
  "data": {
    "cookies": {
      "cf_clearance": "xxxxx...",
      "__cf_bm": "xxxxx..."
    },
    "headers": {
      "User-Agent": "Mozilla/5.0 ..."
    },
    "attributes": {
      "md": "...",
      "r": "..."
    },
    "cf_rt": "xxxxx"
  }
}
FieldDescription
cookiesSession cookies to set (cf_clearance, __cf_bm)
headersHeaders to use (User-Agent)
attributesForm data to POST back to complete challenge
cf_rtChallenge token for Referer header

How to Use the Response

  1. Set the cookies (cf_clearance, __cf_bm) on your session
  2. POST to the target URL with attributes as form-urlencoded body
  3. Set the Referer header to: {url}?__cf_chl_tk={cf_rt}
  4. Use Content-Type: application/x-www-form-urlencoded
  5. Use the exact User-Agent from response headers

Code Examples

peak-api-example.python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Python53 lines • editable

Important: Proxy Requirements

You must use sticky/session proxies. CloudFlare tracks the IP address throughout the session. Using rotating proxies or different IPs will invalidate the session cookies.

  • Use sticky session proxies - same IP for the entire session
  • Use the exact User-Agent from the response - this is required
  • POST the attributes as form data - not JSON
  • Set the Referer header with cf_rt token
  • URL must end with a trailing slash (e.g., https://example.com/)
  • Only Windows Chrome user agents are supported
  • • Rotate to a new proxy session only when starting a completely new session