Skip to main content

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 Mexico
  • solve_imss(image_base64) — IMSS Mexico
  • solve_image(image_base64) — Generic image
  • solve_recaptcha_v2(site_key, site_url) — reCAPTCHA v2
  • solve_recaptcha_v3(site_key, site_url, action) — reCAPTCHA v3
  • solve_hcaptcha(site_key, site_url) — hCaptcha
  • solve_cloudflare(site_url) — Cloudflare Turnstile
  • solve_audio(audio_base64) — Audio CAPTCHA

Document AI

  • extract_csf(document_base64) — Constancia de Situacion Fiscal
  • extract_ine(document_base64) — INE / Voter ID
  • extract_cfdi(document_base64) — CFDI Invoice
  • extract_curp(document_base64) — CURP
  • extract_domicilio(document_base64) — Proof of Address
  • extract_nomina(document_base64) — Payroll Receipt
  • extract_generic(document_base64) — Generic OCR

Utilities

  • hello() — Test API key
  • get_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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocilar-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for ocilar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42b96971a7026347186bab12aef13d76d4b8df58014cf8778198e31493eb195e
MD5 b165a88cda7fcffc0c849dbf70debc5b
BLAKE2b-256 ec635455ebf4b1c4a4609064b3e310f70b4e2561e0a29fa091793319a2981da1

See more details on using hashes here.

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

Hashes for ocilar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9f2b9285f54588168b9f289dfe8ad73369f7b1bfef8265146a0977c741fe3b
MD5 6776f11f677d78c37be5890b1876c719
BLAKE2b-256 1292eac71b4d5fa20df39bc9bcee1871bbd48901f99c4ca6b32e3ebdffb7315e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page