fastcaptcha-api 1.0.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 FastCaptcha - Bijaya kumar Tiadi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include examples *.py *.jpg *.png
5
+ recursive-exclude * __pycache__
6
+ recursive-exclude * *.py[co]
@@ -0,0 +1,493 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastcaptcha-api
3
+ Version: 1.0.0
4
+ Summary: Fastest AI-powered image CAPTCHA solver API for Python with 95% accuracy
5
+ Home-page: https://github.com/fastcaptcha/fastcaptcha
6
+ Author: Bijaya kumar Tiadi
7
+ Author-email: Bijaya kumar Tiadi <contact@fastcaptcha.org>
8
+ License: MIT
9
+ Project-URL: Homepage, https://fastcaptcha.org
10
+ Project-URL: Documentation, https://fastcaptcha.org/api-docs/
11
+ Project-URL: Repository, https://github.com/fastcaptcha/fastcaptcha
12
+ Project-URL: Bug Tracker, https://github.com/fastcaptcha/fastcaptcha/issues
13
+ Keywords: captcha,captcha solver,fast captcha,python captcha api,captcha ocr,ai captcha solver,image captcha,captcha recognition,automated captcha solver,ocr api,web scraping,automation
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Topic :: Internet :: WWW/HTTP
26
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
+ Classifier: Operating System :: OS Independent
28
+ Requires-Python: >=3.7
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: requests>=2.25.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=6.0; extra == "dev"
34
+ Requires-Dist: pytest-cov>=2.0; extra == "dev"
35
+ Requires-Dist: black>=21.0; extra == "dev"
36
+ Requires-Dist: flake8>=3.9; extra == "dev"
37
+ Requires-Dist: mypy>=0.900; extra == "dev"
38
+ Dynamic: author
39
+ Dynamic: home-page
40
+ Dynamic: license-file
41
+ Dynamic: requires-python
42
+
43
+ # FastCaptcha - Fastest Image CAPTCHA Solver API for Python ๐Ÿš€
44
+
45
+ [![PyPI version](https://badge.fury.io/py/fastcaptcha-api.svg)](https://badge.fury.io/py/fastcaptcha-api)
46
+ [![Python Versions](https://img.shields.io/pypi/pyversions/fastcaptcha-api.svg)](https://pypi.org/project/fastcaptcha-api/)
47
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
48
+ [![Downloads](https://pepy.tech/badge/fastcaptcha-api)](https://pepy.tech/project/fastcaptcha-api)
49
+
50
+ **FastCaptcha** is the fastest AI-powered image CAPTCHA solver API for Python with **95% accuracy** in under **0.3 seconds**. Perfect for web scraping, automation, bot development, and testing.
51
+
52
+ ---
53
+
54
+ ## ๐Ÿš€ What is FastCaptcha?
55
+
56
+ FastCaptcha is a powerful Python library that solves text-based image CAPTCHAs using advanced AI and OCR technology. Unlike traditional CAPTCHA solvers, FastCaptcha provides:
57
+
58
+ - โšก **Lightning-Fast** - Solve CAPTCHAs in under 0.3 seconds
59
+ - ๐ŸŽฏ **95% Accuracy** - Industry-leading accuracy for image CAPTCHAs
60
+ - ๐Ÿ’ฐ **Affordable** - Starting at $1 for 3000 CAPTCHA solves
61
+ - ๐Ÿ”Œ **Easy Integration** - Simple Python API with one-line installation
62
+ - ๐ŸŒ **RESTful API** - Works with any programming language
63
+ - ๐Ÿ”’ **Secure** - Your data is encrypted and never stored
64
+
65
+ ### Supported CAPTCHA Types
66
+
67
+ FastCaptcha supports all text-based image CAPTCHAs including:
68
+ - Alphanumeric CAPTCHAs
69
+ - Numeric only CAPTCHAs
70
+ - Mixed case text CAPTCHAs
71
+ - Distorted text CAPTCHAs
72
+ - Noisy background CAPTCHAs
73
+ - High contrast CAPTCHAs
74
+ - Multi-line CAPTCHAs
75
+ - Complex pattern CAPTCHAs
76
+
77
+ ---
78
+
79
+ ## ๐Ÿ”ง Installation
80
+
81
+ Install FastCaptcha using pip:
82
+
83
+ ```bash
84
+ pip install fastcaptcha-api
85
+ ```
86
+
87
+ That's it! No complex setup, no dependencies issues.
88
+
89
+ ### Requirements
90
+ - Python 3.7 or higher
91
+ - `requests` library (auto-installed)
92
+
93
+ ---
94
+
95
+ ## ๐Ÿงฉ Quick Start Example
96
+
97
+ Get started in just 3 lines of code:
98
+
99
+ ```python
100
+ from fastcaptcha import FastCaptcha
101
+
102
+ # Initialize with your API key
103
+ solver = FastCaptcha(api_key="your-api-key-here")
104
+
105
+ # Solve a CAPTCHA
106
+ result = solver.solve("captcha.jpg")
107
+ print(result) # Output: "ABC123"
108
+ ```
109
+
110
+ ### Get Your Free API Key
111
+
112
+ 1. Visit [FastCaptcha.org](https://fastcaptcha.org)
113
+ 2. Sign up for free
114
+ 3. Get **100 free credits** to start
115
+ 4. Copy your API key from the dashboard
116
+
117
+ ---
118
+
119
+ ## ๐Ÿ’ก Why FastCaptcha?
120
+
121
+ ### Compare FastCaptcha vs Other CAPTCHA Solvers
122
+
123
+ | Feature | FastCaptcha | 2Captcha | AntiCaptcha | TrueCaptcha |
124
+ |---------|-------------|----------|-------------|-------------|
125
+ | **Speed** | **0.3s** | 10-30s | 5-20s | 3-10s |
126
+ | **Accuracy** | **95%** | 80-85% | 75-80% | 70-75% |
127
+ | **Price per 1000** | **$0.33** | $1.00 | $1.50 | $2.00 |
128
+ | **Python Library** | โœ… | โŒ | โŒ | โŒ |
129
+ | **API Quality** | โœ… | โš ๏ธ | โš ๏ธ | โŒ |
130
+ | **Free Credits** | 100 | 0 | 0 | 50 |
131
+
132
+ ### Key Advantages
133
+
134
+ โœ… **10x Faster** - Solve CAPTCHAs in 0.3 seconds vs 10-30 seconds with competitors
135
+ โœ… **3x Cheaper** - $0.33 per 1000 solves vs $1-$2 with other services
136
+ โœ… **Higher Accuracy** - 95% accuracy vs 70-85% industry average
137
+ โœ… **Better Developer Experience** - Native Python library, not just API wrapper
138
+ โœ… **No Hidden Costs** - Pay only for what you use, credits never expire
139
+
140
+ ---
141
+
142
+ ## ๐Ÿ“ฆ Complete Usage Guide
143
+
144
+ ### Basic Usage
145
+
146
+ #### Solve from Local File
147
+
148
+ ```python
149
+ from fastcaptcha import FastCaptcha
150
+
151
+ solver = FastCaptcha(api_key="your-api-key")
152
+ result = solver.solve("path/to/captcha.jpg")
153
+ print(f"Solved: {result}")
154
+ ```
155
+
156
+ #### Solve from URL
157
+
158
+ ```python
159
+ from fastcaptcha import FastCaptcha
160
+
161
+ solver = FastCaptcha(api_key="your-api-key")
162
+ result = solver.solve_url("https://example.com/captcha.png")
163
+ print(f"Solved: {result}")
164
+ ```
165
+
166
+ #### Solve from Base64
167
+
168
+ ```python
169
+ from fastcaptcha import FastCaptcha
170
+
171
+ solver = FastCaptcha(api_key="your-api-key")
172
+ base64_image = "iVBORw0KGgoAAAANSUhEUgAA..."
173
+ result = solver.solve_base64(base64_image)
174
+ print(f"Solved: {result}")
175
+ ```
176
+
177
+ ### Advanced Usage
178
+
179
+ #### Context Manager (Recommended)
180
+
181
+ ```python
182
+ from fastcaptcha import FastCaptcha
183
+
184
+ with FastCaptcha(api_key="your-api-key") as solver:
185
+ result = solver.solve("captcha.jpg")
186
+ print(f"Solved: {result}")
187
+ # Session automatically closed
188
+ ```
189
+
190
+ #### Check Account Balance
191
+
192
+ ```python
193
+ from fastcaptcha import FastCaptcha
194
+
195
+ solver = FastCaptcha(api_key="your-api-key")
196
+ balance = solver.get_balance()
197
+ print(f"Credits remaining: {balance['credits']}")
198
+ ```
199
+
200
+ #### Error Handling
201
+
202
+ ```python
203
+ from fastcaptcha import FastCaptcha, APIKeyError, InvalidImageError, APIError
204
+
205
+ try:
206
+ solver = FastCaptcha(api_key="your-api-key")
207
+ result = solver.solve("captcha.jpg")
208
+ print(f"Solved: {result}")
209
+ except APIKeyError:
210
+ print("Invalid API key")
211
+ except InvalidImageError as e:
212
+ print(f"Invalid image: {e}")
213
+ except APIError as e:
214
+ print(f"API error: {e}")
215
+ ```
216
+
217
+ #### Batch Processing
218
+
219
+ ```python
220
+ from fastcaptcha import FastCaptcha
221
+ import glob
222
+
223
+ solver = FastCaptcha(api_key="your-api-key")
224
+
225
+ # Solve multiple CAPTCHAs
226
+ captcha_files = glob.glob("captchas/*.jpg")
227
+ for captcha_file in captcha_files:
228
+ try:
229
+ result = solver.solve(captcha_file)
230
+ print(f"{captcha_file}: {result}")
231
+ except Exception as e:
232
+ print(f"{captcha_file}: Error - {e}")
233
+ ```
234
+
235
+ #### Custom Timeout
236
+
237
+ ```python
238
+ from fastcaptcha import FastCaptcha
239
+
240
+ # Set custom timeout (default is 30 seconds)
241
+ solver = FastCaptcha(api_key="your-api-key", timeout=60)
242
+ result = solver.solve("captcha.jpg")
243
+ ```
244
+
245
+ ---
246
+
247
+ ## ๐ŸŒ Integration Examples
248
+
249
+ ### Web Scraping with Selenium
250
+
251
+ ```python
252
+ from selenium import webdriver
253
+ from fastcaptcha import FastCaptcha
254
+ import base64
255
+
256
+ driver = webdriver.Chrome()
257
+ solver = FastCaptcha(api_key="your-api-key")
258
+
259
+ # Navigate to page with CAPTCHA
260
+ driver.get("https://example.com/login")
261
+
262
+ # Get CAPTCHA image
263
+ captcha_element = driver.find_element_by_id("captcha-image")
264
+ captcha_base64 = captcha_element.screenshot_as_base64
265
+
266
+ # Solve CAPTCHA
267
+ result = solver.solve_base64(captcha_base64)
268
+
269
+ # Enter solution
270
+ input_field = driver.find_element_by_id("captcha-input")
271
+ input_field.send_keys(result)
272
+ ```
273
+
274
+ ### Requests Library
275
+
276
+ ```python
277
+ import requests
278
+ from fastcaptcha import FastCaptcha
279
+
280
+ # Download CAPTCHA image
281
+ response = requests.get("https://example.com/captcha")
282
+ with open("captcha.jpg", "wb") as f:
283
+ f.write(response.content)
284
+
285
+ # Solve CAPTCHA
286
+ solver = FastCaptcha(api_key="your-api-key")
287
+ result = solver.solve("captcha.jpg")
288
+
289
+ # Submit form with solution
290
+ data = {"captcha": result, "username": "user"}
291
+ requests.post("https://example.com/submit", data=data)
292
+ ```
293
+
294
+ ### Flask API Integration
295
+
296
+ ```python
297
+ from flask import Flask, request, jsonify
298
+ from fastcaptcha import FastCaptcha
299
+ import base64
300
+
301
+ app = Flask(__name__)
302
+ solver = FastCaptcha(api_key="your-api-key")
303
+
304
+ @app.route('/solve', methods=['POST'])
305
+ def solve_captcha():
306
+ data = request.json
307
+ image_base64 = data.get('image')
308
+
309
+ try:
310
+ result = solver.solve_base64(image_base64)
311
+ return jsonify({"success": True, "text": result})
312
+ except Exception as e:
313
+ return jsonify({"success": False, "error": str(e)})
314
+
315
+ if __name__ == '__main__':
316
+ app.run()
317
+ ```
318
+
319
+ ---
320
+
321
+ ## ๐ŸŒ API Documentation
322
+
323
+ For complete API documentation, visit: [https://fastcaptcha.org/api-docs/](https://fastcaptcha.org/api-docs/)
324
+
325
+ ### API Endpoint
326
+
327
+ ```
328
+ POST https://fastcaptcha.org/api/v1/ocr/
329
+ ```
330
+
331
+ ### Request Format
332
+
333
+ ```json
334
+ {
335
+ "image": "base64_encoded_image_here"
336
+ }
337
+ ```
338
+
339
+ ### Response Format
340
+
341
+ ```json
342
+ {
343
+ "success": true,
344
+ "text": "ABC123",
345
+ "processing_time": 0.28
346
+ }
347
+ ```
348
+
349
+ ---
350
+
351
+ ## ๐Ÿ“Š Pricing
352
+
353
+ FastCaptcha offers the most competitive pricing in the industry:
354
+
355
+ | Package | Credits | Price | Price per 1000 |
356
+ |---------|---------|-------|----------------|
357
+ | **Starter** | 500 | FREE | $0.00 |
358
+ | **Budget** | 3000 | $1 | $0.33 |
359
+ | **Basic** | 10000 | $3 | $0.30 |
360
+ | **Pro** | 50000 | $12 | $0.24 |
361
+ | **Business** | 200000 | $40 | $0.20 |
362
+
363
+ - โœ… No monthly subscriptions
364
+ - โœ… Pay only for what you use
365
+ - โœ… Credits never expire
366
+ - โœ… Volume discounts available
367
+ - โœ… Free 100 credits on signup
368
+
369
+ [View All Pricing Plans โ†’](https://fastcaptcha.org/pricing/)
370
+
371
+ ---
372
+
373
+ ## ๐Ÿ† Use Cases
374
+
375
+ FastCaptcha is perfect for:
376
+
377
+ - ๐Ÿ•ท๏ธ **Web Scraping** - Bypass CAPTCHAs while collecting data
378
+ - ๐Ÿค– **Automation** - Automate form submissions and testing
379
+ - ๐Ÿงช **QA Testing** - Test CAPTCHA-protected features
380
+ - ๐Ÿ“Š **Data Collection** - Gather data from protected websites
381
+ - ๐Ÿ”„ **API Integration** - Add CAPTCHA solving to your API
382
+ - ๐ŸŽฎ **Bot Development** - Build bots that can solve CAPTCHAs
383
+ - ๐ŸŒ **Multi-Account Management** - Manage multiple accounts efficiently
384
+
385
+ ---
386
+
387
+ ## ๐Ÿ“ˆ SEO Keywords
388
+
389
+ This library is optimized for developers searching for:
390
+
391
+ **Primary Keywords:**
392
+ - Fast CAPTCHA solver Python
393
+ - Best CAPTCHA solver API
394
+ - CAPTCHA OCR Python
395
+ - AI CAPTCHA solver
396
+ - Python CAPTCHA recognition
397
+ - Automated CAPTCHA solver
398
+ - Image CAPTCHA solver
399
+
400
+ **Alternative to:**
401
+ - 2Captcha Python
402
+ - AntiCaptcha Python
403
+ - TrueCaptcha alternative
404
+ - DeathByCaptcha alternative
405
+ - ImageTyperz alternative
406
+
407
+ **Use Cases:**
408
+ - CAPTCHA bypass Python
409
+ - Web scraping CAPTCHA solver
410
+ - Selenium CAPTCHA solver
411
+ - Automation CAPTCHA solver
412
+ - Bot CAPTCHA solver
413
+
414
+ ---
415
+
416
+ ## ๐Ÿ“š Examples Repository
417
+
418
+ Check out our [examples directory](./examples/) for more code samples:
419
+
420
+ - `solve_single_image.py` - Basic CAPTCHA solving
421
+ - `solve_from_url.py` - Solve CAPTCHAs from URLs
422
+ - `batch_processing.py` - Process multiple CAPTCHAs
423
+ - `selenium_integration.py` - Integrate with Selenium
424
+ - `error_handling.py` - Proper error handling
425
+
426
+ ---
427
+
428
+ ## ๐Ÿ”’ Security & Privacy
429
+
430
+ - ๐Ÿ” All API requests are encrypted with HTTPS
431
+ - ๐Ÿ—‘๏ธ Images are deleted immediately after processing
432
+ - ๐Ÿšซ We never store or log your CAPTCHA images
433
+ - โœ… GDPR and CCPA compliant
434
+ - ๐Ÿ›ก๏ธ Enterprise-grade security
435
+
436
+ ---
437
+
438
+ ## ๐Ÿค Support
439
+
440
+ Need help? We're here for you:
441
+
442
+ - ๐Ÿ“ง **Email**: [contact@fastcaptcha.org](mailto:contact@fastcaptcha.org)
443
+ - ๐Ÿ“– **Documentation**: [fastcaptcha.org/api-docs/](https://fastcaptcha.org/api-docs/)
444
+ - ๐Ÿ’ฌ **GitHub Issues**: [Report a bug](https://github.com/fastcaptcha/fastcaptcha/issues)
445
+ - ๐ŸŒ **Website**: [fastcaptcha.org](https://fastcaptcha.org)
446
+ - โ“ **FAQ**: [fastcaptcha.org/faq/](https://fastcaptcha.org/faq/)
447
+
448
+ ---
449
+
450
+ ## ๐Ÿ“ License
451
+
452
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
453
+
454
+ ---
455
+
456
+ ## ๐ŸŒŸ Why Developers Love FastCaptcha
457
+
458
+ > "Switched from 2Captcha to FastCaptcha and my scraping scripts are now 10x faster. Best decision ever!" - *John D., Data Engineer*
459
+
460
+ > "The Python library is so easy to use. Integrated it in 5 minutes. Accuracy is incredible!" - *Sarah M., Full Stack Developer*
461
+
462
+ > "Finally, a CAPTCHA solver that's actually fast and affordable. Saved my company $500/month!" - *Mike R., DevOps Engineer*
463
+
464
+ ---
465
+
466
+ ## ๐Ÿš€ Get Started Now
467
+
468
+ 1. **Install**: `pip install fastcaptcha-api`
469
+ 2. **Sign Up**: [Get your free API key](https://fastcaptcha.org)
470
+ 3. **Solve**: Start solving CAPTCHAs in seconds!
471
+
472
+ ```python
473
+ from fastcaptcha import FastCaptcha
474
+
475
+ solver = FastCaptcha(api_key="your-api-key")
476
+ print(solver.solve("captcha.jpg"))
477
+ ```
478
+
479
+ ---
480
+
481
+ ## ๐Ÿ”— Links
482
+
483
+ - ๐ŸŒ **Website**: [fastcaptcha.org](https://fastcaptcha.org)
484
+ - ๐Ÿ“– **API Docs**: [fastcaptcha.org/api-docs/](https://fastcaptcha.org/api-docs/)
485
+ - ๐Ÿ’ฐ **Pricing**: [fastcaptcha.org/pricing/](https://fastcaptcha.org/pricing/)
486
+ - ๐ŸŽฎ **Live Demo**: [fastcaptcha.org/demo/](https://fastcaptcha.org/demo/)
487
+ - ๐Ÿ“ง **Contact**: [contact@fastcaptcha.org](mailto:contact@fastcaptcha.org)
488
+
489
+ ---
490
+
491
+ **Made with โค๏ธ by FastCaptcha Team**
492
+
493
+ *Copyright ยฉ 2025 FastCaptcha - All rights reserved*