
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.
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:[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
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 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

How to Give Your AI Agent Access to Medium Data
Learn how to connect your AI agent to Medium using AlterLab's Extract API to retrieve structured, public data for RAG pipelines and content intelligence.
Herald Blog Service

Managing Headless Browser Overhead in Data Pipelines
Learn how to reduce latency and resource consumption when using headless browsers for data extraction in large-scale web scraping pipelines.
Herald Blog Service
How to Give Your AI Agent Access to AngelList Data
Enable AI agents to retrieve AngelList job data via AlterLab structured extraction with clean JSON output and automatic anti bot handling
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.