Skip to main content

NextCaptcha Captcha Solving Service Api Wrapper for Python to solving recaptcha v2, v3,recapthcha moible,hcaptcha,funcaptcha

Project description

NextCaptcha Python SDK

NextCaptcha is a powerful captcha solving service that supports various types of captchas including reCAPTCHA v2, reCAPTCHA v2 Enterprise, reCAPTCHA v3, reCAPTCHA Mobile, and Cloudflare Turnstile. With NextCaptcha, you can easily solve a variety of captcha challenges in your automation scripts and programs.

This SDK provides a simple and easy-to-use Python interface for interacting with the NextCaptcha API. It supports all available captcha types and offers intuitive methods for solving different types of captchas.

Installation

You can install the NextCaptcha Python SDK using pip:

pip install nextcaptcha-python

Usage

To start using the NextCaptcha Python SDK, you first need to obtain your API key (clientKey) from the NextCaptcha Dashboard. Then, you can create a NextCaptchaAPI instance:

from nextcaptcha import NextCaptchaAPI

api = NextCaptchaAPI(client_key="YOUR_CLIENT_KEY")

Now, you can use the api object to solve various types of captchas. To solve reCAPTCHA v2 challenges, use the recaptchav2 method:

result = api.recaptchav2(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA v2 Enterprise To solve reCAPTCHA v2 Enterprise challenges, use the recaptchav2enterprise method:

result = api.recaptchav2enterprise(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA v3 To solve reCAPTCHA v3 challenges, use the recaptchav3 method:

result = api.recaptchav3(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA Mobile To solve reCAPTCHA Mobile challenges, use the recaptcha_mobile method:

result = api.recaptcha_mobile(app_key="APP_KEY")

Solving Cloudflare Turnstile To solve Cloudflare Turnstile challenges, use the turnstile method:

result = api.turnstile(website_url="https://example.com", website_key="SITE_KEY")

Checking Account Balance To check your NextCaptcha account balance, use the get_balance method:

balance = api.get_balance()
print(f"Account balance: {balance}")

Here is a complete example of using the NextCaptcha Python SDK to solve a reCAPTCHA v2 challenge:

from nextcaptcha import NextCaptchaAPI

CLIENT_KEY = "YOUR_CLIENT_KEY"
WEBSITE_URL = "https://example.com"
WEBSITE_KEY = "SITE_KEY"

api = NextCaptchaAPI(client_key=CLIENT_KEY)
result = api.recaptchav2(website_url=WEBSITE_URL, website_key=WEBSITE_KEY)

if result["status"] == "ready":
    print(f"reCAPTCHA solved: {result['solution']}")
else:
    print(f"Failed to solve reCAPTCHA: {result['errorDescription']}")

Error Handling

If an error occurs while solving a captcha, the SDK will return a dictionary containing the error information. You can check the status field to determine if the request was successful. If the status is "ready", the captcha has been successfully solved and the solution will be provided in the solution field. If the status is "failed", the error field will contain a description of the error.

Contributing

If you find any bugs or have suggestions for improvement, please feel free to submit an issue or send a pull request. We welcome all contributions!

License

This project is licensed under the MIT License. For more information, please see the LICENSE file.

Project details


Download files

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

Source Distribution

nextcaptcha_python-1.1.5.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nextcaptcha_python-1.1.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file nextcaptcha_python-1.1.5.tar.gz.

File metadata

  • Download URL: nextcaptcha_python-1.1.5.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nextcaptcha_python-1.1.5.tar.gz
Algorithm Hash digest
SHA256 a1596a29f147c44e2ae2463f8c62da2bb667de550466c7a4c6f2dba10c47a447
MD5 7e5b4cc6ccc1608f48dab8535d647969
BLAKE2b-256 5cfdd058aed33c278fc1ccfaad2854d4459feabf21680ead8ace268a411e713b

See more details on using hashes here.

File details

Details for the file nextcaptcha_python-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nextcaptcha_python-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 278d7e965221d319fc6e1960887a98759d7ea71514d4e1b4c92cec8d11daa66a
MD5 71813f0251b278328f0f45662af98cc4
BLAKE2b-256 069028714a1202c8c6caba490be302a1988ea726418bc468dcbe2f33e3e1d6fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page