How to Migrate from Bright Data to AlterLab: Step-by-Step Guide (2026)
Tutorials

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.

Yash Dubey
Yash Dubey

May 18, 2026

5 min read
15 views

TL;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.

Bash
pip install alterlab

Step 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.

Python
# Bright Data (before migration)
import requests

# Credentials exposed in the proxy string
proxies = {
    "http": "http://brd-customer-USERNAME-zone-ZONE:[email protected]:22225",
    "https": "http://brd-customer-USERNAME-zone-ZONE:[email protected]:22225"
}

response = requests.get("https://example.com/data", proxies=proxies)
print(response.text)
Python
# 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.

Python
# 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())
Python
# 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.

Python
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.

Python
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.

$0.0002Per Request (AlterLab)
$0Monthly Minimum
NeverBalance Expiry

Common issues and fixes

  • Timeout exceptions: AlterLab defaults to a 30-second network timeout. Scraping single-page applications using min_tier=3 often requires more time to load external assets. Pass timeout=60 to 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=3 in 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 the client.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.

Share

Was this article helpful?

Frequently Asked Questions

You can complete the migration in under an hour. Because the REST API structures are similar, your existing extraction logic remains unchanged, requiring only an update to your API key and client library.
Yes, the REST API approach is highly compatible. The AlterLab Python SDK simplifies proxy configuration and handles headless browser rendering natively without requiring Playwright integration.
AlterLab utilizes strict pay-as-you-go pricing starting at $0.0002 per request with no subscription requirements. Your account balance never expires, contrasting with Bright Data's monthly commitments and bandwidth-based billing.