How to Solve reCAPTCHA v3 with Python

Sora Fujimoto
AI Solutions Architect
15-Sep-2023

Automating Google Search, SEO tools, or data collection often requires interacting with websites protected by reCAPTCHA v3. Unlike v2,reCAPTCHA v3 does not show a checkbox—it silently assigns a risk score (0.0–1.0). To perform stable automation and achieve a human‑like score (0.7–0.9), you need both the correct implementation and a reliable solver.
This guide shows you how to solve reCAPTCHA v3 using Python and CapSolver, with a ready-to-use script, key configuration tips, and best practices to avoid getting low scores.
⚙️ Prerequisites
- Python installed
- CapSolver API key
Why these prerequisites matter
Python allows easy integration with API-based solvers, while the Capsolver API key identifies your account and ensures the request receives high-quality human-like scoring. reCAPTCHA v3 is highly sensitive to user‑behaviour simulation, so using an optimized API is critical.
🤖 Step 1: Install Necessary Packages
Execute the following commands to install the required packages:
python
pip install capsolver
⚡ Tip: Using a virtual environment (e.g.,
venvorconda) helps isolate dependencies and avoid conflicts with other Python projects.
👨💻 Step 2: Python Code for solve reCaptcha v3 and get 0.7-0.9 score
Here's a Python sample script to accomplish the task:
python
import json
import os
import capsolver
from urllib.parse import urlparse
# Change these values
capsolver.api_key = "YourApiKey"
PAGE_URL = ""
PAGE_KEY = ""
PAGE_ACTION = ""
def solve_recaptcha_v3(url,key,pageAction):
solution = capsolver.solve({
"type": "ReCaptchaV3TaskProxyLess",
"websiteURL": url,
"websiteKey":key,
"pageAction":pageAction
})
return solution
def main():
print("Solving reCaptcha v3")
solution = solve_recaptcha_v3(PAGE_URL, PAGE_KEY, PAGE_ACTION)
print("Solution: ", solution)
if __name__ == "__main__":
main()
📌 Additional Explanation
-
websiteKey
This is typically thedata-sitekeyvalue embedded in the HTML of the target website. You can find it via browser DevTools or network requests. -
pageAction
Google uses pageAction to categorize user interactions. Setting it correctly significantly increases scoring accuracy. You can refer to the linked blog to extract real pageAction values. -
ReCaptchaV3TaskProxyLess
This mode is recommended when the website does not require a browser with a proxy. If the system returns abnormally low scores, you may consider a proxy-enabled task type to simulate user locality. -
Result Structure
Capsolver returns a token string (g-recaptcha-response) that you must pass back to the target site’s form or API endpoint during submission.
This code sample focuses on clarity, but in production scripts, you may also want to:
✓ Add retry logic
✓ Log responses
✓ Add exception handling for network/timeouts
✓ Validate tokens before submission
⚠️ Change these variables
- capsolver.api_key: Obtain your API key from the CapSolver Dashboard
- PAGE_URL: Replace with the URL of the website for which you wish to solve the reCaptcha v3.
- PAGE_KEY: Update with the specific key of the site with recaptcha.
- PAGE_ACTION: Replace with the pageAction of the page. You can read this blog
👀 More information
- How to solve reCaptcha v3 and get a score 0.7-0.9 like a human
- Solve all types of reCaptcha v2 / v2 invisible / v2 enterprise / v3 / v3 enterprise
✅ Conclusion
Solving reCAPTCHA v3 reliably is essential for automation tasks such as SEO data extraction, Google SERP scraping, and high-volume workflow automation. With Python and CapSolver’s API, you can generate stable human‑like scores (0.7–0.9) and avoid challenge pages, even on heavily protected sites.
Following the configuration tips above ensures higher success rates and smoother integration into your automation pipeline.
❓ FAQ
1. What is reCAPTCHA v3 and how does it differ from v2?
reCAPTCHA v3 uses a score-based system instead of challenges or image tests. It silently analyzes user behavior and assigns a score from 0.0 to 1.0. Higher scores indicate human-like activity, while bots usually receive low scores.
2. How can I find the sitekey required for solving reCAPTCHA v3?
You can inspect the HTML of the webpage using Chrome DevTools. Look for the attribute data-sitekey or check the script loading the reCAPTCHA library.
3. What is pageAction and why does it matter?
The pageAction parameter identifies the type of interaction on the website, such as login, submit, or search. A mismatched pageAction may lead to low scores or rejections.
4. Why does my reCAPTCHA v3 score remain low?
Common causes include missing pageAction, incorrect sitekey, low-quality proxies (if used), or failing to mimic real browser behavior. Using CapSolver’s optimized configuration helps improve scoring.
5. Can this solution be integrated with Selenium, Playwright, or Puppeteer?
Yes. After obtaining the token using CapSolver, you can inject it into forms or JavaScript variables inside any automated browser, including Selenium or Playwright.
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

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

AI Powered SEO Automation: How to Solve Captcha for Smarter SERP Data Collection
Discover how AI Powered SEO Automation overcomes CAPTCHA challenges for smarter SERP data collection and learn about reCAPTCHA v2/v3 solutions

Emma Foster
23-Oct-2025

reCAPTCHA Solver Auto Recognition and Solve Methods
Learn how to automatically recognize and solve Google reCAPTCHA v2, v3, invisible, and enterprise challenges using advanced AI and OCR techniques

Sora Fujimoto
22-Oct-2025

How to Solve reCAPTCHA v2: Solve reCAPTCHA v2 Guide
Learn how to automate solving Google reCAPTCHA v2 using CapSolver. Discover API and SDK integration, step-by-step guides, and bonus codes to streamline captcha solving for web scraping, automation, and development projects.

Aloísio Vítor
21-Oct-2025

