2captcha-python
Python module for easy integration with 2Captcha API
What it is and what it does
This package wraps the 2Captcha captcha-solving service into a Python client, letting you programmatically submit captchas and receive solutions. It supports a wide range of captcha types—from simple image text recognition to modern challenges like reCAPTCHA, Cloudflare Turnstile, GeeTest, and FunCaptcha—making it useful for automation, testing, and integration workflows that encounter captcha barriers.
The library provides both synchronous and asynchronous interfaces, configurable polling behavior, and support for proxy routing. You instantiate a solver with your API key, call a method matching the captcha type, and receive the solved answer. It depends on requests, httpx, and aiofiles for HTTP communication and async file handling.
Use it for:
- Automate web scraping workflows that encounter image or reCAPTCHA barriers during data collection.
- Test web applications and login flows that require captcha solving without manual intervention.
- Integrate captcha solving into bot automation for account creation or form submission tasks.
- Build security testing tools that need to bypass captcha protections to assess application robustness.
- Automate API interactions with services protected by Cloudflare Turnstile or similar modern captcha systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client for the 2Captcha API that automates captcha solving across multiple captcha types including reCAPTCHA, FunCaptcha, GeeTest, Cloudflare Turnstile, and many others.
Yes, if you need to programmatically solve captchas and have a 2Captcha account. The package is actively maintained, has low install friction, carries no known vulnerabilities, and supports a comprehensive set of captcha types. The main constraint is the service cost and the requirement for an external API key; it is not suitable for free or offline captcha solving.
Install
2captcha-python on PyPI
pip
pip install 2captcha-pythonuv
uv add 2captcha-pythonpoetry
poetry add 2captcha-pythonInstalling 2captcha-python
Before you install
Low friction: pure Python wheel with three common runtime dependencies (requests, httpx, aiofiles). Active maintenance with a recent release 25 days ago and 790 repository stars.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install 2captcha-python
from 2captcha_python import TwoCaptcha
solver = TwoCaptcha('YOUR_API_KEY')
result = solver.normal('path/to/captcha.jpg')
Requires a 2Captcha API key and account; solving captchas incurs service charges based on 2Captcha's pricing.
Verify before relying
- Whether async support is production-ready and what performance characteristics it offers.
- Specific rate limits or request throttling imposed by the 2Captcha service itself.
- Whether callback-based result delivery is reliable in production environments.
- Full list of supported captcha types beyond those mentioned in the description excerpt.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — requests, httpx, aiofiles |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 624,012/month — #5,703 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: 2captcha_python-2.1.0-py3-none-any.whl
Keywords: 2captcha, captcha, api, captcha solver, reCAPTCHA, FunCaptcha, Geetest, image captcha, Coordinates, Click Captcha, Geetest V4, Lemin captcha, Amazon WAF, Cloudflare Turnstile, Capy Puzzle, MTCaptcha, Friendly Captcha, Tencent, Cutcaptcha, DataDome, VK Captcha, CaptchaFox, Prosopo, cybersiara, Hunt, Alibaba, TSPD, Basilisk
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
anticaptchaofficialSolves CAPTCHAs and related challenges (image…
permissive · top 15,000 on PyPI
capsolverCapsolver is a Python client library for…
permissive · top 15,000 on PyPI
cloudscraperBypasses Cloudflare's anti-bot protection by…
permissive · top 5,000 on PyPI
django-recaptchaIntegrates Google reCAPTCHA (V2 Checkbox, V2…
permissive · top 15,000 on PyPI
recognizerSolves reCAPTCHA challenges using AI-based…
permissive · top 15,000 on PyPI
django-simple-captchaAdds CAPTCHA image challenges to Django forms…
permissive · top 15,000 on PyPI
wrapper-tls-requestsMakes HTTP requests with browser-like TLS…
permissive · top 15,000 on PyPI
google-cloud-recaptcha-enterprisePython client library for Google Cloud…
permissive · top 5,000 on PyPI
captchaGenerates audio and image CAPTCHAs for use in…
permissive · top 15,000 on PyPI
drf-recaptchaAdds reCAPTCHA v2 and v3 field validation to…
permissive · top 15,000 on PyPI