
How to Migrate from Smartproxy to AlterLab: Step-by-Step Guide (2026)
TL;DR To migrate from Smartproxy to AlterLab, install the alterlab Python SDK, replace your Smartproxy client initialization with...
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeTL;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.
pip install alterlabFor 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
import requests
# Using the proxy gateway
proxies = {
'http': 'http://user:pwd@gate.smartproxy.com:PORT',
'https': 'http://user:pwd@gate.smartproxy.com: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
from alterlab import AlterLabSync
# Initialize the client once
client = AlterLabSync("YOUR_ALTERLAB_API_KEY")
# Single call handles rotation, anti-bot, and proxying
response = client.scrape("https://example.com")
print(response["content"]) # Same data, pay-as-you-go pricingStep 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:
# 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).
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
timeoutparameter to 30 seconds for high-tier scrapes. - Header Mismatches: AlterLab automatically manages User-Agents. If you were manually setting
User-Agentin 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.
Was this article helpful?
Frequently Asked Questions
Related Articles

SOCKS Proxy: A Practical Developer Guide
Learn how a SOCKS proxy routes TCP traffic, handles DNS, and fits into ethical scraping pipelines, with practical Python and cURL examples for developers.
Herald Blog Service

Scraped Data Validation: A Practical Guide
Build reliable data pipelines with scraped data validation: schemas, type checks, freshness tests, anomaly detection, and quarantine workflows in Python.
Herald Blog Service

Akamai Bot Manager Sensor Checks: Technical Guide
Learn how Akamai Bot Manager sensor checks work, why requests fail, and how ethical scraping pipelines use browser execution, sessions, and tiered requests.
Herald Blog Service
Popular Posts
Recommended

Selenium Bot Detection: Why You Get Flagged and How to Fix It

Understanding Anti-Bot Detection: Fingerprinting and Rate Limits

Ethical Web Scraping: Robots.txt, Rate Limits, and ToS

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

Mastering Playwright Stealth for Agentic Web Workflows
Newsletter
Scraping insights and API tips. No spam.
Recommended Reading

Selenium Bot Detection: Why You Get Flagged and How to Fix It

Understanding Anti-Bot Detection: Fingerprinting and Rate Limits

Ethical Web Scraping: Robots.txt, Rate Limits, and ToS

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

Mastering Playwright Stealth for Agentic Web Workflows
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.