How to Migrate from Zyte to AlterLab: Step-by-Step Guide (2026)
Learn how to migrate from Zyte to AlterLab in under an hour. This guide covers SDK replacement, API updates, and moving to a unified pay-as-you-go model.
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeTL;DR
To migrate from Zyte to AlterLab, replace your zyte-api client with the alterlab SDK, swap your API key, and update your request method. Because AlterLab follows a similar RESTful pattern and provides unified anti-bot bypass, most of your existing URL logic and data parsing code will remain unchanged.
Why migrate?
The primary driver for migration is the fragmented product suite found in many large-scale scraping setups. At Zyte, developers often manage separate billing and configurations for Zyte API, Smart Proxy, and Scrapy Cloud.
AlterLab consolidates these into a single engine. We provide automatic anti-bot bypass, rotating proxies, and smart-tier routing (from T1 curl requests to T5 captcha-solving browsers) under one unified balance. Both APIs are capable — this guide is for developers prioritizing pay-as-you-go pricing and no subscription requirements. For a deeper look at the technical differences, see our detailed Zyte comparison.
Prerequisites
Before you begin, ensure you have the following:
- An AlterLab account (free sign-up)
- Your AlterLab API key from the dashboard
- Python 3.8+ installed in your environment
- Approximately 15 minutes for testing and deployment
Step 1: Install the AlterLab SDK
While you can interact with AlterLab via standard curl commands or any HTTP client, using our native SDK is the fastest way to migrate.
Run the following command in your terminal:
pip install alterlabFor more details on environment configuration, refer to our Getting started guide.
Step 2: Replace your API calls
The core of your migration involves swapping the client initialization and the request method. Zyte typically uses client.scrape(), whereas AlterLab uses client.scrape(). The syntax is nearly identical, making this a low-friction change.
Below is a side-by-side comparison of a standard implementation.
# Zyte (before migration)
from zyte_api import ZyteAPI
client = ZyteAPI(api_key="YOUR_ZYTE_API_KEY")
target_url = "https://example.com"
# Zyte specific request structure
response = client.scrape(url=target_url)
print(response.text)# AlterLab (after migration)
import alterlab
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
target_url = "https://example.com"
# AlterLab request (Supports automatic tier escalation)
response = client.scrape(target_url)
print(response.text) # Same data, pay-as-you-go pricingStep 3: Handle response format differences
Zyte often returns deeply nested JSON objects if you are using their specific extraction features. AlterLab is designed to be flexible. By default, we return the raw page content, but you can request specific formats directly in the call.
If your existing pipeline expects JSON, use the formats parameter. This prevents you from having to write custom parsing logic to wrap the response.
response = client.scrape(
"https://example.com",
formats=["json"]
)
print(response.json())If you need to extract specific data points without writing selectors, we recommend moving your logic to Cortex AI. Instead of maintaining complex CSS paths, you can simply pass a schema to the API.
Step 4: Update your error handling
When moving from a subscription-based model to a balance-based model, your error handling should account for balance depletion.
- Authentication Errors: Ensure your
.envfile is updated with the newALTERLAB_API_KEY. - Balance Errors: If your balance hits zero, the API will return a
402 Payment Requiredstatus. In Zyte, you might encounter service interruptions based on tier limits; in AlterLab, the service is limited strictly by your current balance. - Tier Escalation: If a site requires JavaScript rendering (like a React or Vue app), AlterLab will automatically escalate from T1 to higher tiers if configured. You don't need to manually switch between "browser" and "proxy" settings.
Cost comparison
The biggest shift for most teams is moving away from monthly "buckets" of credits. AlterLab operates on a pure pay-as-you-go model. There are no monthly minimums and your balance never expires.
For a detailed breakdown of how different request tiers affect your spend, visit our AlterLab pricing page. Generally, for standard high-volume scraping (10,000 requests), you will find that the ability to pay only for what you use eliminates the "wasted credit" problem common in subscription models.
Common issues and fixes
- Selector Failures: If your existing Scrapy or BeautifulSoup selectors fail, the site may have triggered a bot challenge. Instead of upgrading your proxy plan, simply set
min_tier=3in your AlterLab request to force JavaScript rendering. - Missing Data in JSON: If you were using Zyte's automatic extraction, you'll need to transition to AlterLab's Cortex AI. This allows you to send a natural language instruction (e.g., "extract all product prices") and receive structured JSON.
- Webhook Latency: If you are using webhooks to push data to your server, ensure your endpoint is ready to receive the AlterLab payload structure, which is flatter and more direct than Zyte's extraction responses.
You're done
Once your tests pass with the AlterLab SDK, you are ready to deploy. Most developers find that the combination of a single API key and automatic tier escalation reduces the complexity of their scraping infrastructure significantly.
For further assistance or specific implementation questions, check our documentation or hit reply to our support email.
Was this article helpful?
Frequently Asked Questions
Related Articles

AutoTrader Data API: Extract Structured JSON in 2026
Build a robust data pipeline for automotive market intelligence. Learn how to use an autotrader data api to get structured JSON without writing fragile parsers.
Herald Blog Service

IMDB Data API: Extract Structured JSON in 2026
Learn how to extract structured IMDB data (title, rating, genre) via API using AlterLab's Extract API for reliable JSON output in 2026.
Herald Blog Service

CarGurus Data API: Extract Structured JSON in 2026
Learn how to retrieve structured CarGurus data through a modern data API. Get JSON with make, model, year, price, mileage and location using AlterLab's Extract API. Simple, compliant, and built for developers.
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.