Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Client library for solve captchas with support.

Project description


Client library to solve captchas with support.

Getting Started

Install as a standard Python package using:

pip install py2captcha


    from py2captcha import TwoCaptchaClient, GoogleReCaptchaV2Task
    # authentication key
    key = "Your key goes here"

    # Website data
    google_key = "Google recaptcha key"  # sitekey
    url = ""
    # Create client
    client = TwoCaptchaClient(client_key=key)

    # Requesting queue status for reCAPTCHA V2
    status = client.get_queue_stats()

    print("reCAPTCHA V2 queue status:")
    print("Total workers: %d" % status.workers_total)
    print("Free workers: %d" % status.free_workers)
    print("Load factor: %d%%" % status.load)
    print("Average solve speed: %d seconds" % status.speed)
    print("Price per 1000 CAPTCHAS: %f USD" %

    # Create Recaptcha Task
    task = GoogleReCaptchaV2Task(googlekey=google_key, pageurl=url)
    job = client.create_task(task)

    # Wait until captcha is solved
    # For async runs just call job.check_is_ready() until it returns true

    # Result
    token = job.get_solution_response()

    # Cost (Always 2.9/1000)
    cost = job.get_solution_cost()

    # Base 5 solution time
    time = job.get_solution_time()

    print("Token: %s" % token)
    print("Cost: %f USD" % cost)
    print("Solve time: %d seconds" % time)

Supported CAPTCHA types

  • reCAPTCHA V2

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py2captcha, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size py2captcha-0.1.1.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page