article

Solving CAPTCHA with CapSolver

Learn how to solve CAPTCHA with CapSolver using API-based tasks for reCAPTCHA, Cloudflare, hCaptcha, and AWS WAF. Includes examples for Python, Node.js, cURL, Puppeteer, and Playwright for smooth automation workflows.
Solving CAPTCHA with CapSolver

CAPTCHAs appear everywhere—login forms, signup pages, checkout flows, and even simple content pages. They’re designed to stop bots, but developers, scrapers, testers, and automation engineers still need ways to solve them programmatically.

This guide explains how to solve CAPTCHA with CapSolver, why it works, when to use it, and how to integrate it into your scraping or automation workflow. Whether you're using cURL, Puppeteer, Playwright, or Selenium, this tutorial provides a clear starting point.

What Is CapSolver?

CapSolver is an AI-powered CAPTCHA-solving platform that automates:

  • reCAPTCHA v2 / v3
  • Cloudflare Turnstile
  • hCaptcha
  • AWS WAF CAPTCHA
  • Image classification CAPTCHAs
  • Slider / puzzle CAPTCHAs
  • And more

The main benefit: it solves CAPTCHAs automatically, fast, and at scale—ideal for web scraping, bot development, monitoring, or QA automation.

Why Use CapSolver?

1. Fully Automated Workflow

Your automation continues running with no manual interruption.

2. High Accuracy

CapSolver’s AI models handle the newest CAPTCHA versions from Google, Cloudflare, and AWS.

3. Fast Response Time

Most challenges solve in 1–5 seconds.

4. Supports All Major Languages & Tools

Python, Node.js, Go, PHP, cURL, Puppeteer, Playwright, Selenium, and more.

5. Cost-Effective

You only pay for successful solves.

This is why more developers rely on solving CAPTCHA with CapSolver.

How to Solve CAPTCHA with CapSolver (API Method)

Below is a generic example for solving reCAPTCHA v2/v3 using CapSolver’s API.

Step 1: Create a Task

curl -X POST https://api.capsolver.com/createTask \
-H "Content-Type: application/json" \
-d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "ReCaptchaV2TaskProxyLess",
        "websiteURL": "https://example.com",
        "websiteKey": "SITE_KEY_HERE"
    }
}'

Response:

{
  "errorId": 0,
  "taskId": "c58f78b1-1234-4fb5-bec8-abc123"
}

Step 2: Get the Solution

curl -X POST https://api.capsolver.com/getTaskResult \
-H "Content-Type: application/json" \
-d '{
    "clientKey": "YOUR_API_KEY",
    "taskId": "c58f78b1-1234-4fb5-bec8-abc123"
}'

Solved response:

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AHJ...token..."
  }
}

Use the generated gRecaptchaResponse token to bypass the CAPTCHA.

Solving CAPTCHA with CapSolver in Real Automation

Python + Playwright Example

import requests
import playwright.sync_api

API_KEY = "YOUR_API_KEY"

def solve():
    task = {
        "clientKey": API_KEY,
        "task": {
            "type": "ReCaptchaV2TaskProxyLess",
            "websiteURL": "https://example.com",
            "websiteKey": "SITE_KEY"
        }
    }
    task_id = requests.post("https://api.capsolver.com/createTask", json=task).json()["taskId"]

    while True:
        res = requests.post("https://api.capsolver.com/getTaskResult", json={
            "clientKey": API_KEY,
            "taskId": task_id
        }).json()

        if res["status"] == "ready":
            return res["solution"]["gRecaptchaResponse"]

token = solve()
print("Solved CAPTCHA:", token)

Node.js + Puppeteer Example

const axios = require("axios");

async function solve() {
  const create = await axios.post(
    "https://api.capsolver.com/createTask",
    {
      clientKey: process.env.CAPSOLVER_KEY,
      task: {
        type: "ReCaptchaV2TaskProxyLess",
        websiteURL: "https://example.com",
        websiteKey: "SITE_KEY"
      }
    }
  );

  const taskId = create.data.taskId;

  let result;
  while (true) {
    const resp = await axios.post(
      "https://api.capsolver.com/getTaskResult",
      { clientKey: process.env.CAPSOLVER_KEY, taskId }
    );
    if (resp.data.status === "ready") {
      result = resp.data.solution.gRecaptchaResponse;
      break;
    }
  }

  console.log("CAPTCHA Solved:", result);
}

Solving AWS WAF CAPTCHA with CapSolver

CapSolver supports AWS WAF, one of the most advanced CAPTCHA systems in 2025.

Example task:

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AntiAwsWafTaskProxyLess",
    "websiteURL": "https://your-site.com",
    "awsKey": "...",
    "awsIv": "...",
    "awsContext": "..."
  }
}

CapSolver returns an aws-waf-token you can use in cookies to pass the challenge, making it usable even in highly secure environments.

When Should You Use CapSolver?

Use CapSolver when:

  • Your scraper frequently hits reCAPTCHA or Cloudflare
  • You run automation at scale
  • You need reliable, fast CAPTCHA solving
  • You want to bypass AWS WAF or Turnstile
  • You're tired of building complex anti-bot logic

For serious automation projects, CapSolver simplifies the workflow significantly.

Final Thoughts

CAPTCHAs are normal. Solving them automatically is also normal.

With modern anti-bot systems getting stronger, solving CAPTCHA with CapSolver has become the most efficient and scalable approach for uninterrupted automation.

Whether you're building:

  • scraping pipelines
  • monitoring systems
  • QA automation
  • bots
  • data extraction tools

CapSolver provides a fast, accurate, and developer-friendly solution.

Get started now!

Step up your web scraping

Try MrScraper Now

Find more insights here

Captcha Automated Queries: Why They Happen and How to Handle Them

Captcha Automated Queries: Why They Happen and How to Handle Them

Learn why websites trigger “captcha automated queries,” what causes them, and how to prevent CAPTCHA interruptions in web scraping, automation, and testing workflows using safe, effective methods.

How to Scrape Twitter (X) Profiles with Python Using Playwright

How to Scrape Twitter (X) Profiles with Python Using Playwright

Learn how to scrape Twitter (X) profiles using Python and Playwright with cookie-based authentication. Extract tweets, timestamps, likes, reposts, views, and more using a reliable, fully working scraper.

How to Scrape a YouTube Channel with Python

How to Scrape a YouTube Channel with Python

Learn how to scrape YouTube channel videos using Python and Playwright. This guide covers scrolling, extracting titles, views, upload dates, and saving data as JSON—no API key required.

What people think about scraper icon scraper

Net in hero

The mission to make data accessible to everyone is truly inspiring. With MrScraper, data scraping and automation are now easier than ever, giving users of all skill levels the ability to access valuable data. The AI-powered no-code tool simplifies the process, allowing you to extract data without needing technical skills. Plus, the integration with APIs and Zapier makes automation smooth and efficient, from data extraction to delivery.


I'm excited to see how MrScraper will change data access, making it simpler for businesses, researchers, and developers to unlock the full potential of their data. This tool can transform how we use data, saving time and resources while providing deeper insights.

John

Adnan Sher

Product Hunt user

This tool sounds fantastic! The white glove service being offered to everyone is incredibly generous. It's great to see such customer-focused support.

Ben

Harper Perez

Product Hunt user

MrScraper is a tool that helps you collect information from websites quickly and easily. Instead of fighting annoying captchas, MrScraper does the work for you. It can grab lots of data at once, saving you time and effort.

Ali

Jayesh Gohel

Product Hunt user

Now that I've set up and tested my first scraper, I'm really impressed. It was much easier than expected, and results worked out of the box, even on sites that are tough to scrape!

Kim Moser

Kim Moser

Computer consultant

MrScraper sounds like an incredibly useful tool for anyone looking to gather data at scale without the frustration of captcha blockers. The ability to get and scrape any data you need efficiently and effectively is a game-changer.

John

Nicola Lanzillot

Product Hunt user

Support

Head over to our community where you can engage with us and our community directly.

Questions? Ask our team via live chat 24/5 or just poke us on our official Twitter or our founder. We're always happy to help.