GitPedia

Python3 anticaptcha

Python library for AntiCaptcha.

From AndreiDrang·Updated May 22, 2026·View on GitHub·

Python 3 client library for [AntiCaptcha](https://getcaptchasolution.com/vchfpctqyz) service - solve reCAPTCHA, hCaptcha, image captchas, and more programmatically. The project is written primarily in Python, distributed under the MIT License license, first published in 2017. Key topics include: anticaptcha, anticaptcha-client, api, captcha, captcha-solving.

Latest release: 2.2.2Release v2.2.2
February 15, 2026View Changelog →

python3-anticaptcha

PyPI version
Python versions
Downloads
Static Badge
Test
Lint
codecov

Python 3 client library for AntiCaptcha service - solve reCAPTCHA, hCaptcha, image captchas, and more programmatically.

Why use this library?

AntiCaptcha is a paid captcha solving service. This library provides a clean Python interface to:

  • Submit captchas to AntiCaptcha's worker network
  • Poll for results automatically
  • Handle proxy rotation for high-volume requests
  • Support both synchronous and asynchronous workflows

Supported Captcha Types

TypeClassUse Case
reCAPTCHA v2ReCaptchaV2Google reCAPTCHA V2 checkbox/invisible
reCAPTCHA v3ReCaptchaV3Google reCAPTCHA V3 score-based
Image CaptchaImageToTextClassic text-from-image captchas
Image CoordinatesImageToCoordinatesClick-on-image captchas
FunCaptchaFunCaptchaArkose Labs (formerly FunCaptcha)
GeeTestGeeTestChinese GeeTest captcha
TurnstileTurnstileCloudflare Turnstile
FriendlyCaptchaFriendlyCaptchaFriendlyCaptcha puzzles
ProsopoProsopoProsopo captcha
Amazon WAFAmazonWAFAWS WAF Captcha

Quick Start

1. Install

bash
pip install python3-anticaptcha

2. Get Your API Key

  1. Log into AntiCaptcha
  2. Copy your API key from the "Setup" section

3. Solve a reCAPTCHA

python
from python3_anticaptcha import ReCaptchaV2 from python3_anticaptcha.core.enum import CaptchaTypeEnm # Basic usage (no proxy) result = ReCaptchaV2( api_key="YOUR_API_KEY", captcha_type=CaptchaTypeEnm.RecaptchaV2TaskProxyless, websiteURL="https://example.com/page-with-captcha", websiteKey="6LeIxAKTAAAAAJ309xRj9YBN2aaaaaaaaa", # sitekey from the page ).captcha_handler() print(result["solution"]["gRecaptchaResponse"])

4. Solve with Proxy

python
from python3_anticaptcha import ReCaptchaV2 from python3_anticaptcha.core.enum import CaptchaTypeEnm, ProxyTypeEnm result = ReCaptchaV2( api_key="YOUR_API_KEY", captcha_type=CaptchaTypeEnm.RecaptchaV2Task, websiteURL="https://example.com/page-with-captcha", websiteKey="6LeIxAKTAAAAAJ309xRj9YBN2aaaaaaaaa", proxyType=ProxyTypeEnm.HTTP, proxyAddress="123.45.67.89", proxyPort=8080, proxyLogin="proxy_user", proxyPassword="proxy_pass", userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", ).captcha_handler()

5. Async Usage

python
import asyncio from python3_anticaptcha import ReCaptchaV2 from python3_anticaptcha.core.enum import CaptchaTypeEnm async def solve(): result = await ReCaptchaV2( api_key="YOUR_API_KEY", captcha_type=CaptchaTypeEnm.RecaptchaV2TaskProxyless, websiteURL="https://example.com/page-with-captcha", websiteKey="6LeIxAKTAAAAAJ309xRj9YBN2aaaaaaaaa", ).aio_captcha_handler() return result result = asyncio.run(solve())

Environment Variable

Set API_KEY to avoid passing it in code:

bash
export API_KEY="your_api_key_here"
python
# Now you can omit api_key parameter from python3_anticaptcha import ImageToText result = ImageToText(captcha_file="captcha.png").captcha_handler()

Configuration Options

All captcha classes support these common parameters:

ParameterTypeDescription
api_keystrYour AntiCaptcha API key (or set API_KEY env var)
sleep_timeintSeconds between result polls (default: 10)

Documentation

Development

bash
# Run tests make tests # Run linters make lint # Build package make build

Contacts


Love Rust? Check out Rust-AntiCaptcha - same API for Rust projects.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from AndreiDrang/python3-anticaptcha via the GitHub API.Last fetched: 6/16/2026