Official Python SDK for Ocilar — CAPTCHA solving and document extraction API
Project description
Ocilar Python SDK
Official Python client for the Ocilar API — CAPTCHA solving and document extraction.
Install
pip install ocilar
Quick Start
from ocilar import OcilarClient
client = OcilarClient(api_key="sk-YOUR_KEY")
# Test connectivity
print(client.hello())
# Solve SAT CAPTCHA
import base64
with open("captcha.png", "rb") as f:
img = base64.b64encode(f.read()).decode()
result = client.solve_sat(img)
print(result.text) # "2VBF39"
print(result.latency_ms) # 67
print(result.task_id) # "tsk_abc123"
# Extract data from CSF document
with open("csf.pdf", "rb") as f:
doc = base64.b64encode(f.read()).decode()
result = client.extract_csf(doc)
print(result.data) # {"rfc": "XAXX010101000", "nombre": "...", ...}
Available Methods
CAPTCHA Solving
solve_sat(image_base64)— SAT Mexicosolve_imss(image_base64)— IMSS Mexicosolve_image(image_base64)— Generic imagesolve_recaptcha_v2(site_key, site_url)— reCAPTCHA v2solve_recaptcha_v3(site_key, site_url, action)— reCAPTCHA v3solve_hcaptcha(site_key, site_url)— hCaptchasolve_cloudflare(site_url)— Cloudflare Turnstilesolve_audio(audio_base64)— Audio CAPTCHA
Document AI
extract_csf(document_base64)— Constancia de Situacion Fiscalextract_ine(document_base64)— INE / Voter IDextract_cfdi(document_base64)— CFDI Invoiceextract_curp(document_base64)— CURPextract_domicilio(document_base64)— Proof of Addressextract_nomina(document_base64)— Payroll Receiptextract_generic(document_base64)— Generic OCR
Utilities
hello()— Test API keyget_balance()— Account balance and usage
Free Tier
Every account gets 1,000 free solves per CAPTCHA type and 50 free document extractions per type. No credit card required.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ocilar-0.1.0.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ocilar-0.1.0.tar.gz.
File metadata
- Download URL: ocilar-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b96971a7026347186bab12aef13d76d4b8df58014cf8778198e31493eb195e
|
|
| MD5 |
b165a88cda7fcffc0c849dbf70debc5b
|
|
| BLAKE2b-256 |
ec635455ebf4b1c4a4609064b3e310f70b4e2561e0a29fa091793319a2981da1
|
File details
Details for the file ocilar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ocilar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae9f2b9285f54588168b9f289dfe8ad73369f7b1bfef8265146a0977c741fe3b
|
|
| MD5 |
6776f11f677d78c37be5890b1876c719
|
|
| BLAKE2b-256 |
1292eac71b4d5fa20df39bc9bcee1871bbd48901f99c4ca6b32e3ebdffb7315e
|