
How to Migrate from Bright Data to AlterLab: Step-by-Step Guide (2026)
A practical guide to migrating your web scraping infrastructure from Bright Data to AlterLab. Swap your API client, update your keys, and switch to pay-as-you-go pricing.
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeTL;DR
To migrate from Bright Data to AlterLab, swap your Bright Data proxy authentication headers or brightdata.Browser() configuration with the AlterLab Python SDK client. Because AlterLab utilizes a standard REST API interface for data delivery, your downstream parsing logic remains identical. You update the network call, insert your new API key, and finalize the migration in under an hour.
Note: Both APIs are capable — this guide is for developers prioritizing pay-as-you-go pricing and no subscription requirements.
Why migrate?
Engineering teams evaluate alternatives to Bright Data when their project scale does not justify enterprise contracts and $500+ monthly minimums. Bandwidth-based billing also creates unpredictable costs when scraping heavy web pages laden with media. AlterLab solves this through a flat, per-request pricing model. You pay strictly for successful requests. Read our detailed Bright Data comparison for a full breakdown of the architectural differences.
Prerequisites
You need three things to complete this migration:
- An AlterLab account with a positive balance. Complete the free sign-up if you do not have one.
- Your AlterLab API key, generated in your project dashboard.
- Five minutes to update your request headers.
Step 1: Install the AlterLab SDK
We strongly recommend using the official Python SDK for new migrations. It handles connection pooling, automatic retries, and rate limiting natively. See the Getting started guide if your stack uses Node.js or Go.
pip install alterlabStep 2: Replace your API calls
Bright Data implementations generally require developers to route HTTP traffic through a superproxy endpoint using embedded credentials. This works, but it exposes zone passwords in the proxy string and requires manual management of session IDs.
AlterLab uses a direct SDK client. You pass the target URL to the client. The system automatically routes the request through the necessary proxy tiers.
# Bright Data (before migration)
import requests
# Credentials exposed in the proxy string
proxies = {
"http": "http://brd-customer-USERNAME-zone-ZONE:PASSWORD@brd.superproxy.io:22225",
"https": "http://brd-customer-USERNAME-zone-ZONE:PASSWORD@brd.superproxy.io:22225"
}
response = requests.get("https://example.com/data", proxies=proxies)
print(response.text)# AlterLab (after migration)
import alterlab
# Authentication handled securely via API key
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
response = client.scrape("https://example.com/data")
print(response.text) Migrating Headless Browsers
If your current Bright Data pipeline utilizes the Scraping Browser over CDP (Chrome DevTools Protocol), you are managing asynchronous Playwright connections. AlterLab simplifies this process. You request JavaScript execution by setting min_tier=3. AlterLab spins up the headless browser, executes the render, and returns the final DOM string.
# Bright Data Scraping Browser
import asyncio
from playwright.async_api import async_playwright
auth = 'brd-customer-USERNAME-zone-ZONE:PASSWORD'
browser_url = f'wss://{auth}@zproxy.lum-superproxy.io:9222'
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp(browser_url)
page = await browser.new_page()
await page.goto('https://example.com/spa-app')
print(await page.content())
await browser.close()
asyncio.run(main())# AlterLab JavaScript Rendering
import alterlab
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
# min_tier=3 forces headless browser evaluation
response = client.scrape("https://example.com/spa-app", min_tier=3)
print(response.text)Step 3: Handle response format differences
Because both platforms return standard HTTP responses, your BeautifulSoup or lxml parsing code will continue to function without modifications.
However, AlterLab includes dedicated formatting parameters that Bright Data does not offer natively. If you previously built custom parsers to convert Bright Data HTML into JSON, you can discard that code. Pass the formats array to the AlterLab client to receive structured data directly.
import alterlab
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
# Receive clean JSON instead of raw HTML
response = client.scrape(
"https://example.com/products",
formats=['json']
)
# Access the structured data
data = response.json_data
print(data['title'])Step 4: Update your error handling
Bright Data returns standard HTTP proxy errors like 403 Forbidden or 502 Bad Gateway when a target website blocks the connection.
AlterLab intercepts proxy failures at the network edge. If a specific proxy IP fails, AlterLab automatically retries the request using a different IP in the same geographic region. The SDK only raises an exception if the target site blocks the request across all automated retries. You must update your exception handling to catch AlterLab specific errors.
import alterlab
import time
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
try:
response = client.scrape("https://example.com/strict-endpoint")
except alterlab.errors.RateLimitError:
# Your application exceeded the concurrent connection limit
time.sleep(5)
except alterlab.errors.TargetBlockedError:
# The target blocked the request. Escalate the tier to use Captcha solving.
response = client.scrape("https://example.com/strict-endpoint", min_tier=5)Cost comparison
Understanding the cost difference requires comparing bandwidth billing to request billing. Bright Data charges per gigabyte of bandwidth transferred, plus a base request fee, plus a mandatory monthly minimum. Calculating costs for a 10,000 page run requires knowing the exact megabyte weight of the target domains.
AlterLab charges a flat fee per request based on the required tier. 10,000 standard requests cost exactly $2.00. You pay for the data you extract, not the bloated tracking scripts the target website loaded. Review the exact tier multipliers on the AlterLab pricing page.
Common issues and fixes
- Timeout exceptions: AlterLab defaults to a 30-second network timeout. Scraping single-page applications using
min_tier=3often requires more time to load external assets. Passtimeout=60to the client instantiation to prevent premature termination. - Missing JavaScript rendering: If your Bright Data setup utilized a Web Unlocker product, the target site likely requires JavaScript evaluation. Set
min_tier=3in your AlterLab request to enable full DOM execution. - Authentication rejection: Verify you replaced the Bright Data zone password string with your AlterLab API key. Do not include proxy ports or usernames in the AlterLab initialization.
- Geographic targeting: Bright Data handles geolocation via proxy string parameters. AlterLab handles this via a dedicated parameter. Pass
country="US"to theclient.scrape()method to enforce localization.
You're done
The migration is complete. Deploy your updated code to production and monitor your success rates in the dashboard. If you want to automate your infrastructure further, review our documentation on webhooks and scheduling to replace local cron jobs with serverless extractions.
Was this article helpful?
Frequently Asked Questions
Related Articles

Building Efficient RAG Pipelines with Clean Markdown and JSON to Reduce LLM Token Waste
Learn how to structure scraped data as Markdown and JSON to minimize token usage in RAG pipelines, improve retrieval accuracy, and lower LLM costs.
Herald Blog Service

Structured Extraction vs. Raw Scraping for LLM Apps
Learn the differences between raw HTML scraping and structured AI extraction. Discover how to optimize data pipelines for LLM and RAG applications.
Herald Blog Service

Weekly Product Roundup: SDK Drift Fix, CI Unblocking, Session Security & WAF Improvements
This week's AlterLab engineering updates resolve SDK response drift, unblock CI migrations, enhance session binding security, and reduce WAF false positives for more reliable scraping pipelines.
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)

AlterLab vs Firecrawl: Which Scraping API Is Better in 2026?

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

How to Scrape Cloudflare-Protected Sites 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
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.