Skip to main content

Test

Captchaly Python SDK

Official Python SDK for Captchaly.com.

Captchaly is the most advanced captcha solving service for enterprises. Providing large-scale automation and data scraping. Allow AI agents to bypass captchas and access the web without human intervention. Try for free at https://captchaly.com.

Features

  • Support both sync and async usage.
  • Fully typed.
  • Automatic retry.

Requirements

This SDK is tested with Python 3.14. It may work with earlier versions, but it is not guaranteed.

Installation

pip install captchaly

Authentication

Provide your API key in either of these ways:

  1. Pass it to the client constructor
from captchaly import CaptchalyClient

CaptchalyClient("your_api_key")
  1. Set the environment variable CAPTCHALY_APIKEY and the client will read it automatically.

Quick Start

Synchronous usage

from captchaly import CaptchalyClient

url = "demo.captchaly.com"
sitekey = "6Le0FEMtAAAAAK9IgmSqaJfPb3E-9fI9xMp1nDfk"

with CaptchalyClient("your_api_key") as client:
	account = client.account()
	print(account.email, account.balance)

	recaptcha = client.recaptcha_v2(url, sitekey)
	print(recaptcha.token)

Asynchronous usage

In async code, use async keywords (await, async with, async for, ...) and call the .aio(...) variant of each method.

import asyncio
from captchaly import CaptchalyClient

url = "demo.captchaly.com"
sitekey = "0x4AAAAAAA4nzhwwpeesSPI2"

async def main():
	async with CaptchalyClient("your_api_key") as client:
		account = await client.account.aio()
		print(account.email, account.balance)

		turnstile = await client.turnstile.aio(url, sitekey)
		print(turnstile.token)

TODO / Roadmap

  • Playwright integration
  • Puppeteer integration

Contributing

This repository does not normally accept merge requests. You are welcome to open issues and requests for new features.

License

MIT License. See LICENSE for details.

Metadata

Release files for captchaly 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for captchaly 1.1.2
File Size Uploaded
captchaly-1.1.2.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for captchaly 1.1.2
File Interpreter ABI Platform
captchaly-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / captchaly-1.1.2.tar.gz

Download URL captchaly-1.1.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a1f091dd41846707dce6608fb128f77d3db0a7d2994ef2596b197b09204af2ba
BLAKE2b-256 checksum
How to use checksums
aee68c808eafc2375ed83a951c396e1f1b63779ac9216a1fcf4115b79eafa8cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / captchaly-1.1.2-py3-none-any.whl

Download URL captchaly-1.1.2-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1cbdd8a462ce0f2bed172a0386c35c5ce1cd45698ab247c73717db3f7a70f43
BLAKE2b-256 checksum
How to use checksums
b2b312a2a927224ee874ed390fe1e693f11a3efc12487915a0ddfa77d3390af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page