Solve Cloudflare

Lucas Mitchell
Automation Engineer
21-May-2023

Cloudflare Challenges Addressed by Capsolver
-
Combined Challenge and Turnstile
-
Standalone Challenge
No special parameters are needed for combined challenge and captcha scenarios with createTask
—our system will automatically detect and handle the captcha.
Addressing the Cloudflare 5s Challenge
Before tackling the Cloudflare 5s challenge, ensure you meet the following prerequisites and adhere to the critical guidelines:
Prerequisites:
- Capsolver Key
- Proxy
Critical Guidelines for Valid Resolution:
- The
Token
from thegetTaskResult
method is crucial for thecf_clearance
cookie. - You must use the same user-agent returned by
getTaskResult
. - You must use the same proxy IP that was used to resolve the challenge.
- You must include the cookies from the response.
- You must include the headers from the response.
- Use TLS version Chrome 120.
To successfully navigate the Cloudflare challenge, consult our detailed guide. Certain parameters are mandatory while others are optional.
For this instance, only essential parameters are used. The required task type is:
AntiCloudflareTask
: This task requires your own proxies.
We will utilize the AntiCloudflareTask for a website under the Cloudflare 5s challenge. Failure to correctly input all parameters may result in the rejection of the token by the website. Detailed parameter guidelines can be found in the image below:

Step 1: Initiating the Process with Capsolver
Execute the createTask
command to submit the necessary information:
JSON
POST https://api.capsolver.com/createTask
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiCloudflareTask",
"websiteURL": "https://www.yourwebsite.com",
"proxy": "158.120.100.23:334:user:pass"
}
}
Step 2: Obtaining the Results
Continuously poll the getTaskResult
API until the captcha is resolved.
Sample request:
json
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey":"YOUR_API_KEY",
"taskId": "TASKID_OF_CREATETASK"
}
Upon successful resolution, you will receive details similar to those shown below:
markdown
{
"errorId": 0,
"taskId": "d8d3a8b4-30cc-4b09-802a-a476ca17fa54",
"status": "ready",
"solution": {
"accept-language": "en-US,en;q=0.9",
"cookies": {
},
"headers": {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US,en;q=0.9",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"origin": "",
"referer": "",
"sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
"sec-ch-ua-arch": "\"arm\"",
"sec-ch-ua-bitness": "\"64\"",
"sec-ch-ua-full-version": "\"120.0.6099.71\"",
"sec-ch-ua-full-version-list": "\"Not_A Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"120.0
.6099.71\", \"Google Chrome\";v=\"120.0.6099.71\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-model": "\"\"",
"sec-ch-ua-platform": "\"macOS\"",
"sec-ch-ua-platform-version": "\"10.14.6\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "same-origin",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
},
"proxy": "your proxy",
"token": "cf clearance token",
"type": "challenge",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
}
The captcha token received can be verified by submitting the cookie cf_clearance
with the value of the response token
, use the same proxy IP used for solve the challenge, cookies, TLS chrome 120, headers and also the same user-agent that we return you in the response to the relevant site.
⚠️ Token rejection indicates possible missing or incorrect information. Verify the token is correctly entered into the
cf_clearance
cookie, that the same proxy IP and TLS version Chrome 120 are used, along with the response headers and user-agent.
For resolving Cloudflare Turnstile Captcha, consult this resource: link
To conclude, overcoming the Cloudflare challenge might seem complex, but with Capsolver.com the process is efficient and straightforward. By adhering to the outlined steps, resolving Cloudflare becomes manageable.
Capsolver Team 💜
Compliance Disclaimer: The information provided on this blog is for informational purposes only. CapSolver is committed to compliance with all applicable laws and regulations. The use of the CapSolver network for illegal, fraudulent, or abusive activities is strictly prohibited and will be investigated. Our captcha-solving solutions enhance user experience while ensuring 100% compliance in helping solve captcha difficulties during public data crawling. We encourage responsible use of our services. For more information, please visit our Terms of Service and Privacy Policy.
More

Cloudflare TLS Fingerprinting: What It Is and How to Solve It
Learn about Cloudflare's use of TLS fingerprinting for security, how it detects and blocks bots, and explore effective methods to solve it for web scraping and automated browsing tasks.

Lucas Mitchell
28-Feb-2025

How to Extract Data from a Cloudflare-Protected Website
In this guide, we'll explore ethical and effective techniques to extract data from Cloudflare-protected websites.

Lucas Mitchell
20-Feb-2025

How to Fix Cloudflare Errors 1006, 1007, and 1008 Quickly
Cloudflare errors 1006, 1007, and 1008 can block your access due to suspicious or automated traffic. Learn quick fixes using premium proxies, user agent rotation, human behavior simulation, and IP address changes to overcome these roadblocks for smooth web scraping.

Ethan Collins
05-Feb-2025

How to Bypass Cloudflare Challenge While Web Scraping in 2025
Learn how to bypass Cloudflare Challenge and Turnstile in 2025 for seamless web scraping. Discover Capsolver integration, TLS fingerprinting tips, and fixes for common errors to avoid CAPTCHA hell. Save time and scale your data extraction.

Aloísio Vítor
23-Jan-2025

How to Solve Cloudflare Turnstile CAPTCHA by Extension
Learn how to bypass Cloudflare Turnstile CAPTCHA with Capsolver’s extension. Install guides for Chrome, Firefox, and automation tools like Puppeteer.

Adélia Cruz
23-Jan-2025

How to Solve Cloudflare by Using Python and Go in 2025
Will share insights on what Cloudflare Turnstile is, using Python and Go for these tasks, whether Turnstile can detect Python scrapers, and how to effectively it using solutions like CapSolver.

Lucas Mitchell
05-Nov-2024