Official SDKs
Production-ready SDKs for Python and Node.js. Type-safe, well-documented, and battle-tested.
Python SDK
pip install alterlab
Full-featured async client with type hints, automatic retries, and comprehensive error handling.
Node.js SDK
npm install @alterlab/sdk
Modern TypeScript SDK with native fetch, full type definitions, and tree-shakeable exports.
Quick Comparison
Installation
# Using pippip install alterlab
# Using poetrypoetry add alterlab
# Using pipenvpipenv install alterlabQuick Start
from alterlab import AlterLab
# Initialize clientclient = AlterLab(api_key="sk_live_...")# or set ALTERLAB_API_KEY env var
# Scrape a websiteresult = client.scrape("https://example.com")print(result.text)# Extracted textprint(result.json)# Structured JSONprint(result.billing.cost_dollars)# Cost breakdown
# With JavaScript renderingresult = client.scrape_js("https://spa-app.com", screenshot=True)print(result.screenshot_url)Pricing
$1 = 5,000 Scrapes
| Tier | Name | Price | Per $1 | Use Case |
|---|---|---|---|---|
| 1 | Curl | $0.0002 | 5,000 | Static HTML sites |
| 2 | HTTP | $0.0003 | 3,333 | TLS fingerprinting |
| 3 | Stealth | $0.002 | 500 | Browser checks |
| 4 | Browser | $0.004 | 250 | JS-heavy SPAs |
| 5 | Captcha | $0.02 | 50 | CAPTCHA solving |
💰 BYOP (Bring Your Own Proxy): Get 20% off when using your own proxy integration!
Features
Anti-Bot Bypass
Automatic tier escalation handles any protection
JavaScript Rendering
Full Playwright browser for SPAs
Structured Extraction
JSON Schema, prompts, and pre-built profiles
Cost Controls
Set budgets, max tiers, and fail-fast options
Caching
Opt-in caching with configurable TTL
Error Handling
Typed exceptions for all error cases
Retry Logic
Automatic retries with exponential backoff
Async Jobs
Long-running scrapes with polling
Open Source
