How to Migrate from ScrapingBee to AlterLab: Step-by-Step Guide (2026)
Learn how to migrate from ScrapingBee to AlterLab in under an hour with pay-as-you-go pricing, no subscription, and minimal code changes.
TL;DR
To migrate from ScrapingBee to AlterLab, install the AlterLab Python SDK, replace your ScrapingBee client with alterlab.Client, and update your API key. The request format and response structure are nearly identical, so most of your existing code works unchanged.
Why migrate?
ScrapingBee requires a monthly subscription plan even if you use few credits. AlterLab offers a pure pay‑as‑you‑go model: you only pay for what you use, your balance never expires, and there are no mandatory monthly fees.
Prerequisites
- An AlterLab account (create one for free at /signup)
- Your AlterLab API key (found in the dashboard)
- About five minutes to install the SDK and update your calls
Step 1: Install the AlterLab SDK
You can install the official Python package or call the REST API directly. The SDK mirrors the ScrapingBee client pattern.
pip install alterlabFor full setup details, see the Getting started guide.
Step 2: Replace your API calls
Below is a direct before‑and‑after comparison. The only changes are the import, client initialization, and API key.
# ScrapingBee (before migration)
from scrapingbee import ScrapingBeeClient
client = ScrapingBeeClient(api_key="YOUR_SCRAPINGBEE_KEY")
response = client.get(
url="https://example.com",
params={"render_js": True}
)
print(response.content)# AlterLab (after migration)
import alterlab
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
response = client.scrape(
url="https://example.com",
params={"render_js": True}
)
print(response.text) # Same data, pay‑as‑you‑go pricingStep 3: Handle response format differences
AlterLab returns a response object with the same attributes you used with ScrapingBee:
response.text(orresponse.contentfor bytes)response.status_coderesponse.headers
If you accessed response.json() on ScrapingBee, note that AlterLab does not auto‑parse JSON; you must json.loads(response.text) yourself. Otherwise, the structure is compatible.
Step 4: Update your error handling
Both services use HTTP status codes to signal issues. AlterLab returns:
429for rate limits (same as ScrapingBee)402when your balance is insufficient (ScrapingBee uses403for auth issues)5xxfor upstream target errors
Adjust any custom retry logic to treat 402 as an out‑of‑balance condition rather than an authentication failure. Otherwise, your existing retry‑on‑429 logic works unchanged.
Cost comparison
Consider a workload of 10,000 requests per month.
| Platform | Cost for 10,000 requests | Monthly minimum | Balance expiry |
|---|---|---|---|
| AlterLab | $2.00 (10,000 × $0.0002) | $0 | Never |
| ScrapingBee | $49.00 (base plan) | $49.00 | Credits expire monthly |
Both APIs are capable — this guide is for developers prioritizing pay‑as‑you‑go pricing and no subscription requirements. See the AlterLab pricing page for full details.
Common issues and fixes
- Missing
render_jsflag – AlterLab uses smart‑tier routing; you can explicitly setmin_tier=3for JavaScript sites instead ofrender_js. - JSON parsing – AlterLab returns raw HTML/text by default. Add
params={"format": "json"}if you need JSON output, then parseresponse.text. - Error
402– Check your balance in the dashboard or add a balance‑check endpoint before batch jobs. - Proxy headers – If you relied on ScrapingBee’s
proxy_addressheader, AlterLab provides equivalent data underresponse.headers["X-AlterLab-Proxy"].
You're done
Your migration is complete. Run your test suite to confirm everything works, then deploy. For more advanced options (scheduling, webhooks, Cortex AI), refer to the full documentation.
AlterLab // Web Data, Simplified.
Was this article helpful?
Frequently Asked Questions
Related Articles

How to Scrape Expedia Data: Complete Guide for 2026
Learn how to scrape Expedia travel data using Python and AlterLab's API in 2026, handling JavaScript, anti-bot measures, and extracting structured hotel & flight info.
Herald Blog Service

How to Scrape Shopify Stores Data: Complete Guide for 2026
Learn how to scrape Shopify stores for product data, prices, and inventory using Python and AlterLab's scraping API.
Herald Blog Service

How to Alter Canvas and WebGL Properties to Reduce Headless Browser Fingerprinting
Learn practical techniques to modify Canvas and WebGL fingerprints in headless browsers for reduced detection when scraping public data. Includes code examples and AlterLab's automated approach.
Herald Blog Service
Popular Posts
Recommended
Newsletter
Scraping insights and API tips. No spam.
Recommended Reading

How to Scrape AliExpress: Complete Guide for 2026

Why Your Headless Browser Gets Detected (and How to Fix It)

How to Scrape Twitter/X Data: Complete Guide for 2026

How to Scrape Cloudflare-Protected Sites in 2026

How to Bypass Cloudflare Bot Protection with Puppeteer in 2026
Stay in the Loop
Get scraping insights, API tips, and platform updates. No spam — we only send when we have something worth reading.
Explore AlterLab
Anti-Bot Handling API
Automatic challenge handling for protected sites — works out of the box.
JavaScript Rendering API
Render SPAs and dynamic content with headless Chromium.
Pricing
5-tier pricing from $0.0002/page. 5,000 free requests to start.
Documentation
API reference, SDKs, quickstart guides, and tutorials.
Web Scraping API Resources
Part of the Web Scraping API Documentation cluster
Complete API reference with 5-tier auto-escalation — Curl to challenge resolution.
Pillar pageConfigure Tier 4 browser rendering for SPAs and dynamic content.
Scrape pages behind login using session management.
Real success rates and cost data across all 5 tiers.
MCP Server, Python SDK, and Firecrawl-compatible API for AI agent workflows.