capmonstercloudclient 4.3.1__tar.gz → 4.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/LICENSE +1 -1
  2. capmonstercloudclient-4.3.3/PKG-INFO +421 -0
  3. capmonstercloudclient-4.3.3/README.md +341 -0
  4. capmonstercloudclient-4.3.3/capmonstercloud_client/version.txt +1 -0
  5. capmonstercloudclient-4.3.3/capmonstercloudclient.egg-info/PKG-INFO +421 -0
  6. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/setup.py +26 -16
  7. capmonstercloudclient-4.3.1/PKG-INFO +0 -252
  8. capmonstercloudclient-4.3.1/README.md +0 -177
  9. capmonstercloudclient-4.3.1/capmonstercloud_client/version.txt +0 -1
  10. capmonstercloudclient-4.3.1/capmonstercloudclient.egg-info/PKG-INFO +0 -252
  11. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/MANIFEST.in +0 -0
  12. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/CapMonsterCloudClient.py +0 -0
  13. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/GetResultTimeouts.py +0 -0
  14. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/__init__.py +0 -0
  15. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/captchaResult.py +0 -0
  16. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/clientOptions.py +0 -0
  17. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/exceptions.py +0 -0
  18. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requestController.py +0 -0
  19. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/AlibabaCustomTaskRequest.py +0 -0
  20. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/AltchaCustomTaskRequest.py +0 -0
  21. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/AmazonWafRequest.py +0 -0
  22. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/BasiliskCustomTaskRequest.py +0 -0
  23. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/BinanceTaskRequest.py +0 -0
  24. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/CastleCustomTaskRequest.py +0 -0
  25. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/ComplexImageTaskBase.py +0 -0
  26. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/CustomTaskRequestBase.py +0 -0
  27. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/DataDomeCustomTaskRequest.py +0 -0
  28. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/FriendlyCustomTaskRequest.py +0 -0
  29. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/FuncaptchaComplexImageTask.py +0 -0
  30. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/FuncaptchaRequest.py +0 -0
  31. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/GeetestRequest.py +0 -0
  32. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/HcaptchaComplexImageTask.py +0 -0
  33. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/HcaptchaRequest.py +0 -0
  34. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/HuntCustomTaskRequest.py +0 -0
  35. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/ImageToTextRequest.py +0 -0
  36. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/ImpervaCustomTaskRequest.py +0 -0
  37. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/MTCaptchaRequest.py +0 -0
  38. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/ProsopoTaskRequest.py +0 -0
  39. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecaptchaComplexImageTask.py +0 -0
  40. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecaptchaV2EnterpiseRequest.py +0 -0
  41. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecaptchaV2Request.py +0 -0
  42. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecaptchaV3EnterpriseRequest.py +0 -0
  43. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecaptchaV3ProxylessRequest.py +0 -0
  44. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/RecognitionComplexImageTaskRequest.py +0 -0
  45. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/TemuCustomTaskRequest.py +0 -0
  46. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/TenDiCustomTaskRequest.py +0 -0
  47. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/TspdCustomTaskRequest.py +0 -0
  48. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/TurnstileRequest.py +0 -0
  49. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/YidunRequest.py +0 -0
  50. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/__init__.py +0 -0
  51. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/baseRequest.py +0 -0
  52. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/baseRequestWithProxy.py +0 -0
  53. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/enums.py +0 -0
  54. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/requests/proxy_info.py +0 -0
  55. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloud_client/utils.py +0 -0
  56. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloudclient.egg-info/SOURCES.txt +0 -0
  57. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloudclient.egg-info/dependency_links.txt +0 -0
  58. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloudclient.egg-info/requires.txt +0 -0
  59. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/capmonstercloudclient.egg-info/top_level.txt +0 -0
  60. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/pyproject.toml +0 -0
  61. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/requirements.txt +0 -0
  62. {capmonstercloudclient-4.3.1 → capmonstercloudclient-4.3.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 ZennoLab
3
+ Copyright (c) 2026 CapMonster Cloud
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,421 @@
1
+ Metadata-Version: 2.4
2
+ Name: capmonstercloudclient
3
+ Version: 4.3.3
4
+ Summary: Official CapMonster Cloud Python SDK: captcha solver & captcha bypass for reCAPTCHA, Cloudflare Turnstile, DataDome and GeeTest. A 2captcha and capsolver alternative.
5
+ Home-page: https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
6
+ Author: CapMonster Cloud
7
+ Author-email: support@capmonster.cloud
8
+ License: MIT
9
+ Project-URL: Homepage, https://capmonster.cloud/en/
10
+ Project-URL: Source, https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
11
+ Project-URL: Issues, https://github.com/CapMonsterCloud/capmonster-python-captcha-solver/issues
12
+ Project-URL: Documentation, https://docs.capmonster.cloud/
13
+ Keywords: capmonster,capmonster-cloud,capmonstercloudclient,captcha,captcha-solver,captcha-bypass,recaptcha,cloudflare-turnstile,geetest,datadome,web-scraping,python3,2captcha-alternative,capsolver-alternative
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.6
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Development Status :: 5 - Production/Stable
28
+ Classifier: Framework :: AsyncIO
29
+ Classifier: Operating System :: Unix
30
+ Classifier: Operating System :: Microsoft :: Windows
31
+ Classifier: Operating System :: MacOS
32
+ Requires-Python: >=3.6
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: aiohappyeyeballs==2.4.4; python_version >= "3.9" and python_version <= "3.13"
36
+ Requires-Dist: aiohttp==3.11.10; python_version >= "3.9" and python_version <= "3.13"
37
+ Requires-Dist: aiosignal==1.3.1; python_version >= "3.9" and python_version <= "3.13"
38
+ Requires-Dist: annotated-types==0.7.0; python_version >= "3.9" and python_version <= "3.13"
39
+ Requires-Dist: async-timeout==5.0.1; python_version >= "3.9" and python_version <= "3.11"
40
+ Requires-Dist: attrs==24.2.0; python_version >= "3.9" and python_version <= "3.13"
41
+ Requires-Dist: frozenlist==1.5.0; python_version >= "3.9" and python_version <= "3.13"
42
+ Requires-Dist: idna==3.10; python_version >= "3.9" and python_version <= "3.13"
43
+ Requires-Dist: multidict==6.1.0; python_version >= "3.9" and python_version <= "3.13"
44
+ Requires-Dist: propcache==0.2.1; python_version >= "3.9" and python_version <= "3.13"
45
+ Requires-Dist: pydantic-core==2.27.1; python_version >= "3.9" and python_version <= "3.13"
46
+ Requires-Dist: pydantic==2.10.3; python_version >= "3.9" and python_version <= "3.13"
47
+ Requires-Dist: typing-extensions==4.12.2; python_version >= "3.9" and python_version <= "3.13"
48
+ Requires-Dist: yarl==1.18.3; python_version >= "3.9" and python_version <= "3.13"
49
+ Requires-Dist: aiohttp==3.7.4; python_version >= "3.6" and python_version <= "3.8"
50
+ Requires-Dist: pydantic==2.10.3; python_version >= "3.8" and python_version < "3.9"
51
+ Requires-Dist: pydantic==2.5.3; python_version >= "3.7" and python_version < "3.8"
52
+ Requires-Dist: pydantic==2.1.*; python_version < "3.7"
53
+ Requires-Dist: aiohappyeyeballs==2.7.1; python_version == "3.14"
54
+ Requires-Dist: aiohttp==3.14.3; python_version == "3.14"
55
+ Requires-Dist: aiosignal==1.4.0; python_version == "3.14"
56
+ Requires-Dist: annotated-types==0.8.0; python_version == "3.14"
57
+ Requires-Dist: attrs==26.1.0; python_version == "3.14"
58
+ Requires-Dist: frozenlist==1.8.0; python_version == "3.14"
59
+ Requires-Dist: idna==3.18; python_version == "3.14"
60
+ Requires-Dist: multidict==6.7.1; python_version == "3.14"
61
+ Requires-Dist: propcache==0.5.2; python_version == "3.14"
62
+ Requires-Dist: pydantic-core==2.46.4; python_version == "3.14"
63
+ Requires-Dist: pydantic==2.13.4; python_version == "3.14"
64
+ Requires-Dist: typing-extensions==4.16.0; python_version == "3.14"
65
+ Requires-Dist: typing-inspection==0.4.2; python_version == "3.14"
66
+ Requires-Dist: yarl==1.24.5; python_version == "3.14"
67
+ Dynamic: author
68
+ Dynamic: author-email
69
+ Dynamic: classifier
70
+ Dynamic: description
71
+ Dynamic: description-content-type
72
+ Dynamic: home-page
73
+ Dynamic: keywords
74
+ Dynamic: license
75
+ Dynamic: license-file
76
+ Dynamic: project-url
77
+ Dynamic: requires-dist
78
+ Dynamic: requires-python
79
+ Dynamic: summary
80
+
81
+ # CapMonster Cloud Python SDK: Python Captcha Solver & Captcha Bypass for reCAPTCHA, Cloudflare Turnstile and GeeTest
82
+
83
+ > **🔄 Migrating from 2Captcha or Capsolver?** CapMonster Cloud is a fast, cost-effective **2captcha alternative** and **capsolver alternative** for Python: reCAPTCHA v3 from **$0.90 per 1,000 solves**, which is **up to 38% cheaper than 2Captcha** and **10% cheaper than Capsolver**, with an API response time of **≤ 2 s**. Already have software built for 2Captcha? CapMonster Cloud [supports the 2Captcha API format](https://docs.capmonster.cloud/docs/external-services/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme). Moving your Python code takes just a few lines: see the **Migration examples** below. Full comparison and disclaimer are in the comparison section below.
84
+
85
+ <p align="center">
86
+ <a href="https://capmonster.cloud/en/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme">
87
+ <img src="https://img.shields.io/badge/CapMonster%20Cloud-Python%20Captcha%20Solver-00B2FF?style=for-the-badge&logo=python&logoColor=white" alt="CapMonster Cloud Python SDK - captcha solver and captcha bypass API client" height="40">
88
+ </a>
89
+ </p>
90
+
91
+ <p align="center">
92
+ <strong>Fast, AI-driven CAPTCHA solving client for Python. Seamlessly bypass Cloudflare Turnstile, reCAPTCHA v2/v3/Enterprise, DataDome, GeeTest, and Amazon WAF in web scraping and browser automation.</strong>
93
+ </p>
94
+
95
+ <p align="center">
96
+ <a href="https://pypi.org/project/capmonstercloudclient/"><img src="https://img.shields.io/pypi/v/capmonstercloudclient.svg?style=flat-square&color=blue" alt="PyPI version"></a>
97
+ <a href="https://pepy.tech/project/capmonstercloudclient"><img src="https://static.pepy.tech/badge/capmonstercloudclient/month" alt="PyPI downloads"></a>
98
+ <a href="https://pypi.org/project/capmonstercloudclient/"><img src="https://img.shields.io/pypi/pyversions/capmonstercloudclient.svg?style=flat-square" alt="Python Versions"></a>
99
+ <a href="https://github.com/CapMonsterCloud/capmonster-python-captcha-solver/stargazers"><img src="https://img.shields.io/github/stars/CapMonsterCloud/capmonster-python-captcha-solver?style=flat-square&color=yellow" alt="GitHub Stars"></a>
100
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square" alt="License: MIT"></a>
101
+ </p>
102
+
103
+ ---
104
+
105
+ Official asynchronous Python SDK for [CapMonster Cloud](https://capmonster.cloud/en/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme). Easily plug ultra-fast AI captcha recognition into **Playwright, Selenium, Puppeteer, Scrapy, BeautifulSoup, and Requests** automation workflows without human-in-the-loop delays.
106
+
107
+ The CapMonster Cloud Python SDK (`capmonstercloudclient`, also known as the CapMonster SDK for Python) is a captcha solver and captcha bypass client for Python 3.6+. Use it to bypass reCAPTCHA v2, v3 and Enterprise, solve Cloudflare Turnstile, DataDome, GeeTest and Amazon WAF, and recognize image-to-text captchas in web scraping and automation, as a cost-effective 2captcha alternative and capsolver alternative.
108
+
109
+ **[👉 Get your Free API Key & Free Trial Balance on CapMonster Cloud](https://dash.capmonster.cloud/Account/SignUp?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)**
110
+
111
+ ---
112
+
113
+ ## ⚡ Highlights
114
+
115
+ - ⚡ **Fast solving:** AI-based recognition, on average between 1 and 30 seconds depending on the captcha type.
116
+ - 🤖 **Zero human workers:** 100% automated machine learning pipeline with no manual latencies.
117
+ - 🛡️ **Modern anti-bot bypass:** Full support for Cloudflare Turnstile, reCAPTCHA Enterprise, GeeTest, DataDome, and Amazon WAF.
118
+ - 🌐 **Browser Automation Ready:** Works out-of-the-box with **Playwright, Selenium, and Puppeteer**.
119
+ - 💰 **Cost-effective:** Low-cost pricing structure based on pay-as-you-go balance.
120
+ - 📉 **Cheaper than alternatives:** reCAPTCHA v3 from $0.90 per 1,000 solves, versus $1.45 at 2Captcha and $1.00 at Capsolver.
121
+ - 🔄 **Easy migration:** replace your 2Captcha or Capsolver solver call and keep the rest of your scraper or bot unchanged.
122
+ - 📖 **Official docs:** request types follow the [CapMonster Cloud API documentation](https://docs.capmonster.cloud/docs/captchas/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
123
+
124
+ ---
125
+
126
+ ## 📊 CapMonster Cloud vs 2Captcha vs Capsolver
127
+
128
+ Looking for a 2captcha alternative or a capsolver alternative for Python web scraping and automation? Compare price, speed and success rate.
129
+
130
+ ### reCAPTCHA v3
131
+
132
+ | Parameter | CapMonster Cloud | 2Captcha | CapSolver | DeathByCaptcha |
133
+ | :--- | :---: | :---: | :---: | :---: |
134
+ | Price per 1,000 solves (from) | **$0.90** | $1.45 | $1.00 | $2.89 |
135
+ | API response time | **≤ 2 s** | ≤ 2 s | < 3 s | ≤ 3 s |
136
+ | Solving success rate | **up to 99%** | ~77–92% | ~95–98% | ~64–90% |
137
+
138
+ *Disclaimer: 2Captcha, CapSolver, and DeathByCaptcha are trademarks of their respective owners. CapMonster Cloud is not affiliated with these entities. Performance metrics and pricing comparisons are based on publicly available data and internal benchmarking conducted on 27.09.2026.*
139
+
140
+ ### Cloudflare Turnstile
141
+
142
+ | Parameter | CapMonster Cloud | 2Captcha | Anti-Captcha | DeathByCaptcha |
143
+ | :--- | :---: | :---: | :---: | :---: |
144
+ | Price per 1,000 solves (from) | **$1.30** | $1.45 | $2.00 | $2.89 |
145
+ | Time to solve | **6.24 s\*** | 16.9 s | 20.33 s | ~13 s |
146
+ | Solving success rate | **99%\*** | 96% | 96% | 96% |
147
+
148
+ *Disclaimer: 2Captcha, Anti-Captcha, and DeathByCaptcha are trademarks of their respective owners. CapMonster Cloud is not affiliated with these entities. Performance metrics and pricing comparisons are based on publicly available data and internal benchmarking as of 12.10.2026.*
149
+
150
+ **What this means in practice:**
151
+
152
+ - **reCAPTCHA v3:** $0.90 versus $1.45 at 2Captcha is up to 38% cheaper, and $0.90 versus $1.00 at Capsolver is 10% cheaper.
153
+ - **Cloudflare Turnstile:** $1.30 versus $1.45 at 2Captcha is 10% cheaper, and a solving time of 6.24 s versus 16.9 s is more than 60% faster.
154
+
155
+ ---
156
+
157
+ ## 📦 Installation
158
+
159
+ ```bash
160
+ pip install capmonstercloudclient
161
+ ```
162
+
163
+ ---
164
+
165
+ ## 🚀 Quick Start: Solve and Bypass Captchas in Python
166
+
167
+ ### 1. Asynchronous reCAPTCHA v2 Solving
168
+
169
+ ```python
170
+ import asyncio
171
+ from capmonstercloudclient import CapMonsterClient, ClientOptions
172
+ from capmonstercloudclient.requests import RecaptchaV2Request
173
+
174
+ # Initialize client with your API key from dashboard
175
+ options = ClientOptions(api_key="YOUR_CAPMONSTER_API_KEY")
176
+ client = CapMonsterClient(options=options)
177
+
178
+ async def main():
179
+ # Build the task payload
180
+ request = RecaptchaV2Request(
181
+ websiteUrl="https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
182
+ websiteKey="6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd"
183
+ )
184
+
185
+ # Send task and receive token
186
+ result = await client.solve_captcha(request)
187
+ print("reCAPTCHA Token:", result.get("gRecaptchaResponse"))
188
+
189
+ if __name__ == "__main__":
190
+ asyncio.run(main())
191
+ ```
192
+
193
+ ### 2. Browser Automation (Playwright + Cloudflare Turnstile)
194
+
195
+ ```python
196
+ import asyncio
197
+ from playwright.async_api import async_playwright
198
+ from capmonstercloudclient import CapMonsterClient, ClientOptions
199
+ from capmonstercloudclient.requests import TurnstileRequest
200
+
201
+ options = ClientOptions(api_key="YOUR_CAPMONSTER_API_KEY")
202
+ client = CapMonsterClient(options=options)
203
+
204
+ async def run_scraper():
205
+ # Solve Turnstile challenge via CapMonster Cloud
206
+ turnstile_req = TurnstileRequest(
207
+ websiteURL="https://target-website.com/login",
208
+ websiteKey="0x4AAAAAAABnPIDnK2k_e-2"
209
+ )
210
+ solution = await client.solve_captcha(turnstile_req)
211
+ token = solution.get("token")
212
+
213
+ # Inject token into Playwright browser session
214
+ async with async_playwright() as p:
215
+ browser = await p.chromium.launch(headless=False)
216
+ page = await browser.new_page()
217
+ await page.goto("https://target-website.com/login")
218
+
219
+ await page.evaluate(f'document.querySelector("[name=cf-turnstile-response]").value = "{token}";')
220
+ await page.click("#submit-button")
221
+ await browser.close()
222
+
223
+ if __name__ == "__main__":
224
+ asyncio.run(run_scraper())
225
+ ```
226
+
227
+ ---
228
+
229
+ ## 🔄 Migrating from 2Captcha or Capsolver
230
+
231
+ Already use 2Captcha or Capsolver in your Python scraper or bot? Replace only the solver call and keep the rest of your parser unchanged. CapMonster Cloud follows the same flow: send the website URL and sitekey, receive the token.
232
+
233
+ ### Before: 2Captcha (2captcha-python)
234
+
235
+ ```python
236
+ # Before: 2Captcha
237
+ from twocaptcha import TwoCaptcha
238
+
239
+ solver = TwoCaptcha("YOUR_2CAPTCHA_API_KEY")
240
+ result = solver.recaptcha(
241
+ sitekey="YOUR_SITE_KEY",
242
+ url="https://target-website.com/page-with-recaptcha",
243
+ )
244
+ token = result["code"]
245
+ ```
246
+
247
+ ### Before: Capsolver (capsolver-python)
248
+
249
+ ```python
250
+ # Before: Capsolver
251
+ import capsolver
252
+
253
+ capsolver.api_key = "YOUR_CAPSOLVER_API_KEY"
254
+ solution = capsolver.solve({
255
+ "type": "ReCaptchaV2TaskProxyLess",
256
+ "websiteURL": "https://target-website.com/page-with-recaptcha",
257
+ "websiteKey": "YOUR_SITE_KEY",
258
+ })
259
+ token = solution["gRecaptchaResponse"]
260
+ ```
261
+
262
+ ### After: CapMonster Cloud
263
+
264
+ ```python
265
+ # After: CapMonster Cloud
266
+ import asyncio
267
+ from capmonstercloudclient import CapMonsterClient, ClientOptions
268
+ from capmonstercloudclient.requests import RecaptchaV2Request
269
+
270
+ client = CapMonsterClient(options=ClientOptions(api_key="YOUR_CAPMONSTER_API_KEY"))
271
+
272
+ async def solve():
273
+ result = await client.solve_captcha(RecaptchaV2Request(
274
+ websiteUrl="https://target-website.com/page-with-recaptcha",
275
+ websiteKey="YOUR_SITE_KEY",
276
+ ))
277
+ return result.get("gRecaptchaResponse")
278
+
279
+ token = asyncio.run(solve())
280
+ ```
281
+
282
+ Only the client, the API key and the request class change: the token is used exactly as before, so the rest of your scraper stays the same. If you use an async framework, call `await client.solve_captcha(...)` directly instead of `asyncio.run`.
283
+
284
+ ### Keep existing 2Captcha-based software
285
+
286
+ Software that already speaks the 2Captcha API can work with CapMonster Cloud without code changes. See the [guide for connecting other services' APIs](https://docs.capmonster.cloud/docs/external-services/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
287
+
288
+ ---
289
+
290
+ ## 🛡️ Supported CAPTCHA Types: Bypass reCAPTCHA, Cloudflare Turnstile, GeeTest and More
291
+
292
+ Use this Python captcha solver for captcha bypass in web scraping and automation: reCAPTCHA bypass (v2, v3, Enterprise), Cloudflare Turnstile solver, DataDome solver, GeeTest solver, Amazon WAF bypass and image-to-text recognition.
293
+
294
+ All task types follow the official [CapMonster Cloud API documentation](https://docs.capmonster.cloud/docs/captchas/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme):
295
+
296
+ | Protection Type | Task Request Class | Proxyless Mode |
297
+ | :--- | :--- | :---: |
298
+ | **Cloudflare Turnstile** | `TurnstileRequest` | ✅ Supported |
299
+ | **reCAPTCHA v2** | `RecaptchaV2Request` | ✅ Supported |
300
+ | **reCAPTCHA v3** | `RecaptchaV3ProxylessRequest` | ✅ Supported |
301
+ | **reCAPTCHA Enterprise** | `RecaptchaV2EnterpriseProxylessRequest` / `RecaptchaV2EnterpriseRequest` | ✅ Supported |
302
+ | **GeeTest (v3, v4)** | `GeeTestProxylessRequest` / `GeeTestRequest` | ✅ Supported |
303
+ | **Amazon WAF** | `AmazonWafRequest` | ✅ Supported |
304
+ | **DataDome** | `DataDomeCustomTaskRequest` | 🌐 Proxy Required |
305
+ | **Imperva / Incapsula** | `ImpervaCustomTaskRequest` / `ImpervaCustomTaskProxylessRequest` | ✅ Supported |
306
+ | **Binance CAPTCHA** | `BinanceTaskRequest` / `BinanceTaskProxylessRequest` | ✅ Supported |
307
+ | **Standard Text CAPTCHA** | `ImageToTextRequest` | ✅ Supported |
308
+ | **Complex Image Tasks** | `RecaptchaComplexImageTaskRequest` | ✅ Supported |
309
+
310
+ ---
311
+
312
+ ## 🛠️ How It Works
313
+
314
+ ```text
315
+ [ Script / Scraper ]
316
+ │
317
+ ▼
318
+ [ Extract sitekey & website URL ]
319
+ │
320
+ ▼
321
+ [ CapMonsterClient API ] ──► POST createTask to https://api.capmonster.cloud
322
+ │
323
+ ▼
324
+ [ Neural Network Processing ] ──► Poll getTaskResult until the task is ready
325
+ │
326
+ ▼
327
+ [ Receive Token & Autosubmit ] ──► Complete bypass
328
+ ```
329
+
330
+ ---
331
+
332
+ ## ⚙️ Best Practices
333
+
334
+ - **Use tokens promptly:** CAPTCHA tokens expire quickly (a reCAPTCHA v2 token is valid for 60 seconds after solving), so submit or inject the solution immediately after receiving the response.
335
+ - **Keep session context consistent:** When a task uses a proxy, use the same proxy in your scraping or browser session and in the CapMonster task.
336
+ - **Use the right task type:** Choose the request type that matches the target protection and follow the required parameters in the [documentation](https://docs.capmonster.cloud/docs/captchas/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
337
+ - **Monitor your balance:** Keep your account balance positive in the [Dashboard](https://dash.capmonster.cloud/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme) and handle API errors in your code.
338
+
339
+ ---
340
+
341
+ ## 💡 Use Cases
342
+
343
+ - **Web scraping and data collection** from websites you are authorized to access, without manual captcha solving.
344
+ - **Browser automation:** get the solution token in Python and inject it into the page with your automation tool.
345
+ - **Automated testing (QA)** of your own website and its captcha-protected forms.
346
+ - **Backend services** that need a captcha solving API inside a Python application.
347
+
348
+ ---
349
+
350
+ ## ❓ FAQ
351
+
352
+ **Is CapMonster Cloud a 2Captcha alternative for Python?**
353
+ Yes. It is a captcha solving service with an official Python SDK. For reCAPTCHA v3 it starts at $0.90 per 1,000 solves versus $1.45 at 2Captcha, which is up to 38% cheaper. For Cloudflare Turnstile it starts at $1.30 versus $1.45, which is 10% cheaper.
354
+
355
+ **Is CapMonster Cloud a Capsolver alternative for Python?**
356
+ Yes. For reCAPTCHA v3 it is 10% cheaper than Capsolver ($0.90 versus $1.00 per 1,000 solves) and shows an API response time of ≤ 2 s versus < 3 s. See the comparison table above and its disclaimer.
357
+
358
+ **How do I migrate from 2Captcha or Capsolver to CapMonster Cloud in Python?**
359
+ Install `capmonstercloudclient`, create a `CapMonsterClient` with your API key and replace your solver call with `client.solve_captcha(...)`. See the migration examples above. Software that already supports the 2Captcha API can also be connected through the [CapMonster Cloud guide](https://docs.capmonster.cloud/docs/external-services/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
360
+
361
+ **Is there an official Python captcha solver from CapMonster Cloud?**
362
+ Yes. This repository is the official Python client library for the CapMonster Cloud captcha solving service.
363
+
364
+ **How do I bypass reCAPTCHA v2 in Python?**
365
+ Create a `CapMonsterClient` with your API key, pass a `RecaptchaV2Request` with the page URL and sitekey to `client.solve_captcha()` and read `result.get("gRecaptchaResponse")`. See the [reCAPTCHA v2 documentation](https://docs.capmonster.cloud/docs/captchas/no-captcha-task/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
366
+
367
+ **How do I bypass Cloudflare Turnstile in Python?**
368
+ Use `TurnstileRequest` with the page URL and sitekey, as in example 2 above, and read `solution.get("token")`. According to the [Turnstile documentation](https://docs.capmonster.cloud/docs/captchas/turnstile-task/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme), all Turnstile subtypes are supported automatically: manual, non-interactive and invisible.
369
+
370
+ **Which captcha types does the Python SDK solve?**
371
+ reCAPTCHA v2, v3 and Enterprise, Cloudflare Turnstile, GeeTest, Amazon WAF, DataDome, Imperva / Incapsula, Binance CAPTCHA, standard text (image-to-text) captchas and reCAPTCHA image tasks. See the supported types table above and the [Supported Captchas Overview](https://docs.capmonster.cloud/docs/captchas/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
372
+
373
+ **How do I get an API key?**
374
+ Register on CapMonster Cloud, top up your balance and copy your API key. The [Getting Started Guide](https://docs.capmonster.cloud/docs/getting-start/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme) describes each step.
375
+
376
+ **Which Python versions are supported?**
377
+ The package on PyPI requires Python 3.6 or newer.
378
+
379
+ **How fast are captchas solved?**
380
+ On average between 1 and 30 seconds, depending on the captcha type. More details are in the [CapMonster Cloud FAQ](https://docs.capmonster.cloud/docs/faq/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
381
+
382
+ **How long is a reCAPTCHA v2 solution valid?**
383
+ According to the [reCAPTCHA v2 documentation](https://docs.capmonster.cloud/docs/captchas/no-captcha-task/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme), the returned token is valid for 60 seconds after the captcha is solved, so use it right away.
384
+
385
+ **Where is the full API reference?**
386
+ See the [API Methods Reference](https://docs.capmonster.cloud/docs/methods/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
387
+
388
+ ---
389
+
390
+ ## ⚖️ Responsible Use
391
+
392
+ CapMonster Cloud is intended for legitimate business purposes only, such as testing your own website or a website you are authorized to test, and recognizing images you provide. Read more about [ethical and transparent captcha automation](https://capmonster.cloud/en/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme).
393
+
394
+ ---
395
+
396
+ ## 📚 Documentation & Support
397
+
398
+ - 📖 [Getting Started Guide](https://docs.capmonster.cloud/docs/getting-start/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)
399
+ - 🎯 [Supported Captchas Overview](https://docs.capmonster.cloud/docs/captchas/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)
400
+ - ⚙️ [API Methods Reference](https://docs.capmonster.cloud/docs/methods/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)
401
+ - ❓ [CapMonster Cloud FAQ](https://docs.capmonster.cloud/docs/faq/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)
402
+ - 🌐 [Browser Extension Guides](https://docs.capmonster.cloud/docs/extension/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)
403
+ - 💬 [Support & Community](https://capmonster.cloud/en/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme#support)
404
+
405
+ ## Other official SDKs & integrations
406
+
407
+ - [Node.js](https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver)
408
+ - [.NET](https://github.com/CapMonsterCloud/capmonster-dotnet-captcha-solver)
409
+ - [Go](https://github.com/CapMonsterCloud/capmonster-go-captcha-solver)
410
+ - [PHP](https://github.com/CapMonsterCloud/capmonster-php-captcha-solver)
411
+ - [Rust](https://github.com/CapMonsterCloud/capmonster-rust-captcha-solver)
412
+ - [n8n](https://github.com/CapMonsterCloud/capmonster-n8n-captcha-solver)
413
+ - [MCP server](https://github.com/CapMonsterCloud/capmonster-mcp-captcha-solver)
414
+ - [MCP server for Patchright](https://github.com/CapMonsterCloud/capmonster-mcp-patchright-captcha-solver)
415
+ - [API Docs](https://github.com/CapMonsterCloud/capmonster-captcha-solver-docs)
416
+
417
+ ---
418
+
419
+ ## 📄 License
420
+
421
+ [MIT](./LICENSE) © [CapMonster Cloud](https://capmonster.cloud/en/?utm_source=github&utm_medium=referral&utm_campaign=python_repo_readme)