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

How to Migrate from Smartproxy to AlterLab: Step-by-Step Guide (2026)

Learn how to migrate from Smartproxy to AlterLab in under an hour. Replace bandwidth-based billing with pay-as-you-go pricing and a streamlined API.

4 min read
4 views

AlterLab handles this automaticallyscrape any URL with one API call. No infrastructure required.

Try it free

TL;DR

To migrate from Smartproxy to AlterLab, install the alterlab Python SDK, replace your Smartproxy client initialization with alterlab.Client("YOUR_API_KEY"), and update your request calls to use the AlterLab .scrape() method. The transition typically takes less than 60 minutes as the REST API and response formats are designed for high compatibility.

Why migrate?

Many developers migrate because Smartproxy utilizes bandwidth-based proxy billing, which often requires a separate subscription for their scraping API. AlterLab solves this by offering a unified pay-as-you-go model. You pay only for the successful requests you make, with no monthly minimums or subscription requirements.

Both APIs are capable — this guide is for developers prioritizing pay-as-you-go pricing and no subscription requirements. For a deeper dive into the architectural differences, see our detailed Smartproxy comparison.

Prerequisites

Before starting the migration, ensure you have the following:

  • An AlterLab account (create one for free sign-up).
  • Your AlterLab API key from the dashboard.
  • Approximately 5 minutes of development time.

Step 1: Install the AlterLab SDK

You can interact with AlterLab via a direct REST API using curl or requests, but the SDK is the fastest way to migrate.

Bash
pip install alterlab

For more detailed setup instructions, refer to our Getting started guide.

Step 2: Replace your API calls

If you were using Smartproxy's proxy gateway or their scraping API, you can replace those blocks with a single AlterLab client.

Before: Smartproxy Implementation

Python
import requests

# Using the proxy gateway
proxies = {
    'http': 'http://user:[email protected]:PORT',
    'https': 'http://user:[email protected]:PORT'
}
response = requests.get("https://example.com", proxies=proxies)

# OR using the scraping API
api_url = "https://scraper-api.smartproxy.com/v2/scrape"
params = {"url": "https://example.com", "api_key": "YOUR_KEY"}
response = requests.get(api_url, params=params)

After: AlterLab Implementation

Python
import alterlab

# Initialize the client once
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")

# Single call handles rotation, anti-bot, and proxying
response = client.scrape("https://example.com")

print(response.text)  # Same data, pay-as-you-go pricing

Step 3: Handle response format differences

AlterLab returns a response object that mimics the standard requests library response. If your existing code uses .text, .json(), or .status_code, it will work without modification.

One key difference is that AlterLab handles the "tiering" (the level of proxy/browser needed) automatically. If you encounter a site with heavy bot protection, you can simply add the min_tier parameter:

Python
# Force JavaScript rendering for complex sites
response = client.scrape("https://example.com", min_tier=3)

Step 4: Update your error handling

Smartproxy and AlterLab use similar HTTP status codes for most errors (403 for Forbidden, 429 for Rate Limited). However, ensure your retry logic is updated to handle AlterLab's specific balance errors.

If your account balance reaches zero, AlterLab will return a specific error indicating insufficient balance. Since there is no monthly subscription, you simply top up your balance to resume service.

Cost comparison

The primary driver for this migration is the billing model. Smartproxy's bandwidth-based pricing can be unpredictable if your page sizes vary. AlterLab uses a request-based model.

Example: 10,000 successful requests

  • Smartproxy: Cost varies based on GB of bandwidth used + separate API subscription fee.
  • AlterLab: 10,000 requests $\times$ $0.0002 = $2.00 (approximate, depending on tier).
$0.0002Per Request (AlterLab)
$0Monthly Minimum
NeverBalance Expiry

Check the full AlterLab pricing page for current rates across different tiers.

Common issues and fixes

  • SSL Errors: If you are using a corporate proxy, ensure your environment variables are not overriding the AlterLab SDK's internal connection.
  • Timeout Settings: AlterLab's automatic anti-bot bypass may take slightly longer than a raw proxy request. Increase your timeout parameter to 30 seconds for high-tier scrapes.
  • Header Mismatches: AlterLab automatically manages User-Agents. If you were manually setting User-Agent in Smartproxy, try removing it first to let AlterLab's optimization engine handle the fingerprinting.

You're done

Your migration is complete. You now have a pay-as-you-go scraping pipeline with no recurring monthly costs. For more advanced features like scheduling or AI extraction, visit our documentation.

Share

Was this article helpful?

Frequently Asked Questions

Typically under an hour. Most of your existing scraping logic remains unchanged, as you only need to update the client library and API key.
Yes, the REST API structure is compatible and the response formats are similar. If using the Python SDK, the migration involves swapping the client initialization.
AlterLab uses a pay-as-you-go model starting at $0.0002 per request with no monthly minimums, whereas Smartproxy uses bandwidth-based proxy billing and separate scraping API subscriptions.