The `anticaptchaofficial` library is the official Python client for anti-captcha.com, providing an easy way to integrate various captcha solving services into your applications. It supports Image Captcha, reCAPTCHA v2/v3, hCaptcha, FunCaptcha, Geetest, and Square Net. The current version is 1.0.69, and it maintains an active release cadence with frequent updates.
pip install anticaptchaofficialVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to solve a reCAPTCHA v2 challenge using the `RecaptchaV2Solver`. It highlights setting the API key, configuring verbose output, and providing the necessary `page_url` and `site_key`. The `solve_and_return_solution` method initiates the solving process and returns the captcha token or `0` on failure, with error details available in `solver.error_text`.
Store your Anti-Captcha API key in an environment variable (e.g., `ANTI_CAPTCHA_API_KEY`) and retrieve it using `os.environ.get()`.
After calling `solve_and_return_solution`, always check if the result is `0`. If so, log or print `solver.error_text` to understand the failure reason.
Consult the official documentation or GitHub README for the exact parameters required by each specific `Solver` class you intend to use.
For asynchronous applications, consider running captcha solving operations in a separate thread, process, or using an `asyncio.to_thread` wrapper if you are in an `asyncio` context.
Monitor your account balance on anti-captcha.com and ensure it's sufficiently funded for your expected usage volume.
No dependency data recorded yet.