How to solve reCaptcha v3 with Python

How to solve reCaptcha v3 with Python

Logo of Capsolver

CapSolver Blogger

How to use capsolver


Bypass reCaptcha v3 with Python, reCaptcha v3 python solver

📁 Prerequisites

  • A working proxy
  • Python installed
  • Capsolver API key

🌿 Step 1: Install Necessary Packages

Execute the following commands to install the required packages:

pip install capsolver
pip install os
pip install requests

⚡ Step 2: Python Code for bypass reCaptcha v3 and get 0.7-0.9 score

Here's a Python sample script to accomplish the task:

import json
import os
import capsolver
import requests
from urllib.parse import urlparse

# Change these values
PROXY = "http://username:password@ip:port"
capsolver.api_key = "YourApiKey"
PAGE_ACTION = "homepage"

def solve_recaptcha_v3(url,key,pageAction):
    solution = capsolver.solve({
        "type": "ReCaptchaV3Task",
        "websiteURL": url,
        "proxy": PROXY
    return solution

def set_session_headers(session, user_agent=None):
    headers = {
        "cache-control": "max-age=0",
        "sec-ch-ua": '"Not/A)Brand";v="99", "Google Chrome";v="107", "Chromium";v="107"',
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "Windows",
        "upgrade-insecure-requests": "1",
        "user-agent": user_agent if user_agent else "'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36",
        "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",
        "sec-fetch-site": "same-origin",
        "sec-fetch-mode": "navigate",
        "sec-fetch-user": "?1",
        "sec-fetch-dest": "document",
        "accept-encoding": "gzip, deflate",
        "accept-language": "en,fr-FR;q=0.9,fr;q=0.8,en-US;q=0.7"

def main():
    s = requests.Session()
    print("Solving reCaptcha v3")
    solution = solve_recaptcha_v3(PAGE_URL, PAGE_KEY, PAGE_ACTION)
    print("Solution: ", solution)
    token = solution["gRecaptchaResponse"]
    print("Token Solution " + token)
    data = {"g-recaptcha-response": token}
    res ="", json=data)
    response = res.json()
    print("Score: " + str(response["score"]))

if __name__ == "__main__":

🛡️ Fields to Update

  • PROXY: Update with your proxy details. The format should be http://username:password@ip:port.
  • 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 bypass 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 Identify the Version of reCaptcha
How to Identify the Version of reCaptcha

In this article, we will show you how to identify what reCaptcha version is being used.



Bypassing reCaptcha V2 with Python
How to solve reCaptcha v2 with Python

In this article, we will show you how to solve reCaptcha v2 with Python



How to solve reCaptcha v3 with Node.JS
How to solve reCaptcha v3 with Node.JS

In this article, we will show you how to solve reCaptcha v3 with Node.JS



How to solve reCaptcha v3 with Python
How to solve reCaptcha v3 with Python

In this article, we will show you how to solve reCaptcha v3 with Python.



Bypass reCaptcha v3
Bypass reCaptcha v3

In the guide that follows, we aim to unravel the seemingly complex procedure of seamlessly navigating through reCaptcha v3 and achieving a score indicative of human interaction, using the cutting-edge tool, CapSolver. For those unfamiliar, reCaptcha v3 is a contemporary security mechanism offered by Google, engineered to shield websites from bot activities without requiring user input. In contrast to its previous versions, reCaptcha v3 computes and delivers a score that predicts if the engagement is human or bot-driven, rather than posing a challenge to be solved. As user-friendly and efficient as this tool is, it may inadvertently create obstacles for genuine users, interfering with their seamless digital navigation. This is where CapSolver steps in. CapSolver is an advanced tool devised to assist users in smoothly traversing through reCaptcha v3. It's specially designed to interact with reCaptcha in a manner that simulates human behavior, hence achieving a score akin to a human user. By having CapSolver on hand, you can guarantee a more streamlined online journey, devoid of the typical CAPTCHA-related delays or disruptions. Throughout this guide, we'll walk you through each step, transforming complex tech terminology into easily digestible information. Our goal is to deliver a comprehensive understanding of how to employ CapSolver effectively, enabling you to navigate through reCaptcha v3 with relative simplicity. We want to make it clear that this guide is meant to support genuine users in their journey through reCaptcha v3, and does not endorse any unethical activities or attempts to compromise website security. Whether you're a professional exploring the digital world or an everyday internet user, gaining a solid understanding of reCaptcha v3 and mastering tools like CapSolver can significantly elevate your online navigation skills. Join us as we delve deeper into this intriguing subject, arming you with invaluable expertise for your digital odyssey.



How to find the callback function of reCaptcha
How to find the callback function of reCaptcha

Finding the callback of a reCAPTCHA involves identifying the JavaScript function that's executed after the reCAPTCHA is successfully solved. Here's a brief preview of the steps you might take