Solve Unlimited Captchas with Best Captcha Solver

Ethan Collins
Pattern Recognition Specialist
16-Jul-2024

Introduction
CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a security measure designed to distinguish human users from automated bots. It often presents challenges such as image recognition, text distortion, or interactive puzzles that are easy for humans but difficult for bots. While CAPTCHAs protect websites from automated abuse, they can be a significant hurdle for legitimate automation and web scraping activities.
In this blog, we'll explore how to solve CAPTCHAs using Playwright with the CapSolver extension. Additionally, we'll look at solving reCAPTCHA using the CapSolver API with Python and Go.
What is CAPTCHA?
CAPTCHA is a security mechanism used by websites to prevent automated access and ensure that the user is a human. Common types include:
- Image Recognition: Users are asked to select images matching a specific description.
- Text Distortion: Users type distorted text displayed on the screen.
- Interactive Challenges: Users complete tasks such as dragging sliders or solving puzzles.
CapSolver: Your Solution to CAPTCHA Challenges
CapSolver is a powerful tool designed to automatically solve various types of CAPTCHAs, including captcha and reCAPTCHA. It provides browser extensions and APIs for seamless integration into your web automation workflows.
Redeem Your CapSolver Bonus Code
Boost your automation budget instantly!
Use bonus code CAPN when topping up your CapSolver account to get an extra 5% bonus on every recharge — with no limits.
Redeem it now in your CapSolver Dashboard
.
Installing Playwright and Required Components
First, you need to install Playwright. You can do this via npm:
bash
npm install playwright
Configuring the CapSolver Extension
- Download the Capsolver extension from here.
- Unzip it into the
./CapSolver.Browser.Extensiondirectory at the root of your project. - Adjust the configuration settings in
./assets/config.json. EnsureenabledForcaptchais set totrueand setcaptchaModetotokenfor automatic solving.
Example configuration change:
json
{
"enabledForcaptcha": true,
"captchaMode": "token"
}
Setting Up Playwright to Solve captcha with CapSolver Extension
Below is an example script using Playwright to solve captcha with the CapSolver extension:
javascript
const { chromium } = require('playwright');
const path = require('path');
(async () => {
const extensionPath = path.join(__dirname, 'CapSolver.Browser.Extension');
const browser = await chromium.launchPersistentContext('', {
headless: false,
args: [
`--disable-extensions-except=${extensionPath}`,
`--load-extension=${extensionPath}`
]
});
const page = await browser.newPage();
await page.goto('https://site.example');
// Locate the captcha checkbox or frame and interact accordingly
await page.waitForSelector('selector-for-captcha', { state: 'visible' });
await page.click('selector-for-captcha');
// Add additional steps as per your requirement
// ...
await browser.close();
})();
Solving reCAPTCHA with CapSolver API
For reCAPTCHA, you can use the CapSolver API. Here are examples in Python and Go.
Python Example
python
import requests
import time
api_key = "YOUR_API_KEY"
site_key = "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
site_url = "https://www.google.com/recaptcha/api2/demo"
def capsolver():
payload = {
"clientKey": api_key,
"task": {
"type": 'ReCaptchaV2TaskProxyLess',
"websiteKey": site_key,
"websiteURL": site_url
}
}
res = requests.post("https://api.capsolver.com/createTask", json=payload)
resp = res.json()
task_id = resp.get("taskId")
if not task_id:
print("Failed to create task:", res.text)
return
print(f"Got taskId: {task_id} / Getting result...")
while True:
time.sleep(3)
payload = {"clientKey": api_key, "taskId": task_id}
res = requests.post("https://api.capsolver.com/getTaskResult", json=payload)
resp = res.json()
status = resp.get("status")
if status == "ready":
return resp.get("solution", {}).get('gRecaptchaResponse')
if status == "failed" or resp.get("errorId"):
print("Solve failed! response:", res.text)
return
token = capsolver()
print(token)
Go Example
go
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"time"
)
type capSolverResponse struct {
ErrorId int32 `json:"errorId"`
ErrorCode string `json:"errorCode"`
ErrorDescription string `json:"errorDescription"`
TaskId string `json:"taskId"`
Status string `json:"status"`
Solution map[string]any `json:"solution"`
}
func capSolver(ctx context.Context, apiKey string, taskData map[string]any) (*capSolverResponse, error) {
uri := "https://api.capsolver.com/createTask"
res, err := request(ctx, uri, map[string]any{
"clientKey": apiKey,
"task": taskData,
})
if err != nil {
return nil, err
}
if res.ErrorId == 1 {
return nil, errors.New(res.ErrorDescription)
}
uri = "https://api.capsolver.com/getTaskResult"
for {
select {
case <-ctx.Done():
return res, errors.New("solve timeout")
case <-time.After(time.Second):
break
}
res, err = request(ctx, uri, map[string]any{
"clientKey": apiKey,
"taskId": res.TaskId,
})
if err != nil {
return nil, err
}
if res.ErrorId == 1 {
return nil, errors.New(res.ErrorDescription)
}
if res.Status == "ready" {
return res, err
}
}
}
func request(ctx context.Context, uri string, payload interface{}) (*capSolverResponse, error) {
payloadBytes, err := json.Marshal(payload)
if err != nil {
return nil, err
}
req, err := http.NewRequestWithContext(ctx, "POST", uri, bytes.NewReader(payloadBytes))
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
responseData, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
capResponse := &capSolverResponse{}
err = json.Unmarshal(responseData, capResponse)
if err != nil {
return nil, err
}
return capResponse, nil
}
func main() {
apikey := "YOUR_API_KEY"
ctx, cancel := context.WithTimeout(context.Background(), time.Second*120)
defer cancel()
res, err := capSolver(ctx, apikey, map[string]any{
"type": "ReCaptchaV2TaskProxyLess",
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
})
if err != nil {
panic(err)
}
fmt.Println(res.Solution["gRecaptchaResponse"])
}
Conclusion
Using tools like Playwright and CapSolver, you can automate the solving of CAPTCHAs, making web scraping and automation tasks more efficient. Whether you're dealing with captcha or reCAPTCHA, the methods outlined here provide a robust solution to overcome these challenges.
Frequently Asked Questions (FAQs)
1. Is it legal to solve CAPTCHAs programmatically using CapSolver?
The legality of solving CAPTCHAs depends on the website’s Terms of Service, applicable local laws, and how the automation is used. CapSolver itself is a neutral tool designed for legitimate use cases such as testing, QA automation, accessibility, and authorized data collection. Before deploying any CAPTCHA-solving solution, you should ensure you have permission from the target website and that your use complies with relevant regulations.
2. What types of CAPTCHAs does CapSolver support?
CapSolver supports a wide range of modern CAPTCHA systems, including but not limited to:
- Google reCAPTCHA v2 and v3
- AWS WAF
- Image-based CAPTCHAs
- Cloudflare Turnstile and Cloudflare Challenge
- GeeTest v3/v4
Support is available through both browser extensions (for Playwright, Puppeteer, etc.) and API-based solutions for backend automation.
3. When should I use the Playwright extension versus the CapSolver API?
Use the CapSolver browser extension when:
- You are automating real browser interactions with Playwright
- The CAPTCHA appears as part of a complex user flow
- You want minimal integration effort
Use the CapSolver API when:
- You are solving reCAPTCHA tokens server-side
- You need language-agnostic integration (Python, Go, Java, etc.)
- You are running large-scale or headless automation
In many production setups, teams combine both approaches depending on the scenario.
4. How reliable and fast is CapSolver for reCAPTCHA solving?
CapSolver is optimized for high success rates and low latency. In most cases, reCAPTCHA v2 challenges are solved within a few seconds, depending on network conditions and task complexity. For large-scale automation, CapSolver also supports concurrency and stable throughput, making it suitable for enterprise-level scraping and testing workflows.
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

Best reCAPTCHA Solver 2026 for Automation & Web Scraping
Discover the best reCAPTCHA solvers for automation and web scraping in 2026. Learn how they work, choose the right one, and stay ahead of bot detection.

Anh Tuan
14-Jan-2026

Top 5 Captcha Solvers for reCAPTCHA Recognition in 2026
Explore 2026's top 5 CAPTCHA solvers, including AI-driven CapSolver for fast reCAPTCHA recognition. Compare speed, pricing, and accuracy here

Lucas Mitchell
09-Jan-2026

Solving reCAPTCHA with AI Recognition in 2026
Explore how AI is transforming reCAPTCHA-solving, CapSolver's solutions, and the evolving landscape of CAPTCHA security in 2026.

Ethan Collins
08-Jan-2026

How to Identify and Obtain reCAPTCHA “s” Parameter Data
Learn to identify and obtain reCaptcha 's' data for effective captcha solving. Follow our step-by-step guide on using Capsolver's tools and techniques.

Ethan Collins
25-Nov-2025

How to Identify and Submit reCAPTCHA Extra Parameters (v2/v3/Enterprise) | CapSolver Guide
Learn how to detect and submit extra reCAPTCHA parameters using CapSolver to improve accuracy and solve complex challenges.

Rajinder Singh
10-Nov-2025

How to Solve reCAPTCHA When Scraping Search Results with Puppeteer
Master the art of Puppeteer web scraping by learning how to reliably solve reCAPTCHA v2 and v3. Discover the best puppeteer recaptcha solver techniques for large-scale data harvesting and SEO automation.

Lucas Mitchell
04-Nov-2025


.