Scrape any website. No blocks. No hassle.
Official SDKs for the AlterLab Web Scraping API
Documentation • Python Docs • Node.js Docs • Playground
AlterLab is a web scraping API that handles the hard parts for you. Instead of managing proxies, fighting CAPTCHAs, and reverse-engineering anti-bot systems, you make one API call and get clean data back.
Under the hood, AlterLab maintains a fleet of residential proxies, headless browsers, and machine learning models trained to bypass protection systems like Cloudflare, DataDome, and PerimeterX. When a simple HTTP request fails, the system automatically escalates through increasingly sophisticated methods until it succeeds—and you only pay for what actually works.
The result: reliable data extraction from sites that block traditional scrapers, without the infrastructure overhead or the cat-and-mouse game of maintaining your own anti-detection stack.
| Simple Integration | Three lines of code. No proxy configuration, no browser setup, no CAPTCHA solving logic. Just a URL in, structured data out. |
| Handles Anti-Bot Systems | Automatic escalation through 5 tiers: fast HTTP requests for simple sites, full browser automation with CAPTCHA solving for protected ones. |
| Predictable Pricing | Pay-as-you-go with no monthly fees. $1 gets you 5,000 simple scrapes or 50 CAPTCHA solves. Credits never expire. |
| Production Ready | Battle-tested infrastructure serving millions of requests. 99.9% uptime SLA with real-time status monitoring. |
| Full Transparency | Every response includes the tier used and exact cost. No surprises on your bill. |
# Python
pip install alterlab
# Node.js
npm install alterlabfrom alterlab import AlterLab
client = AlterLab(api_key="sk_live_...")
result = client.scrape("https://example.com")
print(result.text) # Extracted text
print(result.json) # Structured data
print(f"Cost: ${result.billing.cost_dollars}") # $0.0002import { AlterLab } from 'alterlab';
const client = new AlterLab({ apiKey: 'sk_live_...' });
const result = await client.scrape('https://example.com');
console.log(result.text); // Extracted text
console.log(result.json); // Structured data
console.log(`Cost: $${result.billing.costDollars}`); // $0.0002| Feature | Description |
|---|---|
| Intelligent Scraping | Auto-selects the best approach for each site |
| JavaScript Rendering | Full Playwright browser for SPAs and dynamic content |
| Structured Extraction | JSON Schema, AI prompts, or pre-built profiles (product, article, etc.) |
| BYOP Support | Bring Your Own Proxy for 20% discount |
| Cost Controls | Set max tier, budget limits, prefer cost vs speed |
| Async Support | Native async/await for concurrent scraping |
| Full TypeScript | Complete type definitions for excellent DX |
| Auto Retries | Exponential backoff with configurable retry logic |
| Screenshots & PDFs | Capture visual snapshots of any page |
| OCR | Extract text from images |
$1 = 5,000 scrapes (Tier 1) — The API automatically escalates through tiers until successful.
| Tier | Name | Price | Per $1 | Best For |
|---|---|---|---|---|
| 1 | Curl | $0.0002 | 5,000 | Static HTML, blogs, docs |
| 2 | HTTP | $0.0003 | 3,333 | Sites with TLS fingerprinting |
| 3 | Stealth | $0.0005 | 2,000 | Cloudflare, DataDome |
| 4 | Browser | $0.001 | 1,000 | React/Vue SPAs, infinite scroll |
| 5 | Captcha | $0.02 | 50 | hCaptcha, reCAPTCHA |
No subscriptions. No monthly fees. Credits never expire.
Structured Extraction with JSON Schema
result = client.scrape(
"https://amazon.com/dp/B08N5WRWNW",
extraction_schema={
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"},
"rating": {"type": "number"},
"reviews_count": {"type": "integer"}
}
}
)
print(result.json)
# {"title": "Product Name", "price": 29.99, "rating": 4.5, "reviews_count": 1234}JavaScript Rendering with Screenshot
result = client.scrape_js(
"https://spa-app.com",
screenshot=True,
wait_for="#main-content"
)
print(result.screenshot_url) # URL to screenshot imageCost Controls
from alterlab import AlterLab, CostControls
result = client.scrape(
"https://example.com",
cost_controls=CostControls(
max_tier="2", # Never use browser/captcha tiers
prefer_cost=True, # Optimize for lowest cost
fail_fast=True # Error instead of escalating
)
)Async Concurrent Scraping
import asyncio
from alterlab import AsyncAlterLab
async def main():
async with AsyncAlterLab(api_key="sk_live_...") as client:
urls = ["https://example.com/1", "https://example.com/2", "https://example.com/3"]
results = await asyncio.gather(*[client.scrape(url) for url in urls])
for r in results:
print(f"{r.url}: ${r.billing.cost_dollars}")
asyncio.run(main())BYOP (Bring Your Own Proxy)
from alterlab import AlterLab, AdvancedOptions
result = client.scrape(
"https://example.com",
advanced=AdvancedOptions(
use_own_proxy=True,
proxy_country="US"
)
)
if result.billing.byop_applied:
print("Saved 20%!")| Language | Package | Version | Docs |
|---|---|---|---|
| Python | alterlab |
Python Docs | |
| Node.js | alterlab |
Node.js Docs |
| SDK | Requirements |
|---|---|
| Python | Python 3.8+ |
| Node.js | Node.js 18+ (uses native fetch) |
- Documentation: alterlab.io/docs
- Playground: alterlab.io/playground
- API Status: status.alterlab.io
- Discord: Join our community
- Email: support@alterlab.io
- Issues: GitHub Issues
We welcome contributions! See CONTRIBUTING.md for guidelines.
MIT License — see LICENSE for details.
Website • Docs • Twitter • Discord
Built by the AlterLab team
