πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

capmonster-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capmonster-python

capmonster.cloud library/package for Python

4.0.0
Source
PyPI
Maintainers
1

πŸ€– Capmonster Python

PyPI - Python Version GitHub code size in bytes GitHub last commit GitHub Release GitHub Repo stars

A modern, strongly typed, async-friendly Python SDK for solving CAPTCHA challenges using Capmonster.Cloud.

Supports reCAPTCHA v2 & v3, Cloudflare Turnstile, GeeTest (v3 & v4) and much more.

✨ Features

  • βœ… Fully typed Pydantic v2 models
  • πŸ” Both sync and async API support
  • πŸ” Proxy and User-Agent configuration
  • πŸ“¦ Supports the most common CAPTCHA types
  • πŸ“š Intuitive API with powerful task building

πŸ”§ Installation

pip install capmonster_python

[!IMPORTANT]
You're viewing the documentation for Capmonster Python v4, which includes breaking changes. If you prefer the old syntax used in versions prior to 4.x, you can continue using it by installing the legacy version:
pip install capmonster_python==3.2

πŸš€ Quick Start

Async Example

import asyncio
from capmonster_python import CapmonsterClient, RecaptchaV3Task


async def main():
    client = CapmonsterClient(api_key="YOUR_API_KEY")

    task = RecaptchaV3Task(
        websiteURL="https://example.com",
        websiteKey="SITE_KEY_HERE",
        minScore=0.5,
        pageAction="verify"
    )

    task_id = await client.create_task_async(task)
    result = await client.join_task_result_async(task_id)
    print(result)


asyncio.run(main())

Sync Example

from capmonster_python import CapmonsterClient, RecaptchaV2Task

client = CapmonsterClient(api_key="<YOUR_API_KEY>")

task = RecaptchaV2Task(
    websiteURL="https://example.com",
    websiteKey="SITE_KEY_HERE"
)

task_id = client.create_task(task)
result = client.join_task_result(task_id)
print(result)

🧠 Supported CAPTCHA Types

Capmonster Python v4 supports a wide range of CAPTCHA formats β€” from mainstream challenges like reCAPTCHA and Turnstile to enterprise-grade shields like Imperva and DataDome. Each task supports full Pydantic validation βœ… and both sync and async clients πŸ”„ unless noted.

πŸ”– CategoryCAPTCHA TypeClass NameProxy RequiredNotes
🧩 reCAPTCHAreCAPTCHA v2RecaptchaV2TaskOptionalVisible / Invisible supported βœ… πŸ”„
reCAPTCHA v2 EnterpriseRecaptchaV2EnterpriseTaskOptionalenterprisePayload & apiDomain βœ… πŸ”„
reCAPTCHA v3RecaptchaV3Task❌ NoScore-based, proxyless βœ… πŸ”„
πŸ›‘οΈ CloudflareTurnstile (token)TurnstileTask❌ NoLightweight, async-ready βœ… πŸ”„
Turnstile (cf_clearance)TurnstileCloudFlareTaskβœ… YesFull HTML + proxy required βœ… πŸ”„
πŸ“Έ Image-basedImage-to-Text OCRImageToTextTask❌ NoBase64 image + module control βœ… πŸ”„
Complex Image (Recaptcha-like)ComplexImageRecaptchaTask❌ NoGrid-based, metadata aware βœ… πŸ”„
Complex Image Recognition (AI)ComplexImageRecognitionTask❌ NoSupports tasks like Shein, OOCL βœ… πŸ”„
🧠 Human BehaviorGeeTest v3GeeTestV3TaskOptionalChallenge + gt key + freshness βœ… πŸ”„
GeeTest v4GeeTestV4TaskOptionalinitParameters supported βœ… πŸ”„
πŸ›‘οΈ Enterprise ProtectionDataDomeDataDomeTaskβœ… RecommendedCookie & page context needed βœ… πŸ”„
ImpervaImpervaTaskβœ… RecommendedIncapsula + Reese84 logic βœ… πŸ”„
🏦 Platform-SpecificBinance LoginBinanceTaskβœ… YesvalidateId for login flow βœ… πŸ”„
TemuTemuTask❌ NoCookie-injected behavioral solver βœ… πŸ”„
TenDITenDITaskβœ… YesCustom captchaAppId field βœ… πŸ”„
πŸ§ͺ MiscellaneousProsopoProsopoTaskOptionalUsed in zk or crypto UIs βœ… πŸ”„
BasiliskBasiliskTask❌ NoMinimalist site-key puzzle βœ… πŸ”„

🧩 Advanced Usage

  • Callback URLs are supported during task creation.
  • Includes auto-retry loop for polling results (up to 120s)

πŸ’¬ Community & Support

Need help or have a question?

[!NOTE]
Community support is intended only for questions and issues related to this project. Custom usage scenarios, integrations, or application-specific logic are outside the scope of support.

πŸ“„ License

This project is licensed under the MIT License.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts