Tutorials

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

Learn how to migrate from Oxylabs to AlterLab in under 30 minutes. Follow this technical guide to switch to pay-as-you-go scraping without enterprise contracts.

4 min read
17 views

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

Try it free

TL;DR

To migrate from Oxylabs to AlterLab, install the alterlab Python SDK, replace your Oxylabs Basic Auth requests with the alterlab.Client object, and update your API key. The transition is a direct swap of the request layer, keeping your target URLs and data parsing logic intact.

Why migrate?

Many developers find that Oxylabs' move toward enterprise contracts and the lack of self-serve onboarding for their scraping API creates friction for smaller projects or agile teams. AlterLab solves this by providing a fully self-serve experience with no subscription requirements.

Both APIs are capable — this guide is for developers prioritizing pay-as-you-go pricing and no subscription requirements. For a more detailed breakdown of feature sets, see our detailed Oxylabs comparison.

Prerequisites

Before starting the migration, ensure you have the following:

  • An AlterLab account (get a free sign-up to test your endpoints)
  • Your AlterLab API Key from the dashboard
  • 5 minutes of deployment time

Step 1: Install the AlterLab SDK

You can interact with AlterLab via a standard REST API using requests, but the SDK simplifies authentication and tier management. Follow our Getting started guide for advanced configurations.

Bash
pip install alterlab

Step 2: Replace your API calls

Oxylabs typically uses Basic Auth and a specific JSON payload. AlterLab simplifies this into a single client method.

Before: Oxylabs implementation

Python
import requests

payload = {
    'source': 'universal',
    'url': 'https://example.com',
    'render': 'html'
}
response = requests.post(
    'https://realtime.oxylabs.io/v1/queries', 
    auth=('username', 'password'), 
    json=payload
)
print(response.json())

After: AlterLab implementation

Python
import alterlab

# Initialize client with your API key
client = alterlab.Client("YOUR_ALTERLAB_API_KEY")

# Simple one-line scrape
response = client.scrape("https://example.com")
print(response.text)

Step 3: Handle response format differences

AlterLab returns a clean response object. If you were previously parsing the results array from an Oxylabs JSON response, you can now access the content directly via .text or .json().

If you need structured data without writing custom parsing logic, you can pass the cortex=True parameter to AlterLab to extract specific fields using AI, eliminating the need for complex BeautifulSoup selectors.

Step 4: Update your error handling

AlterLab uses standard HTTP status codes. If you have existing retry logic for 403s or 429s, it will still work. However, AlterLab's automatic anti-bot bypass handles most of these rotations internally.

If you encounter a site that requires higher-level JavaScript rendering, instead of manually adjusting proxy settings, simply set the min_tier=3 parameter in your request to skip straight to our browser-based rendering engines.

Cost comparison

The primary driver for this migration is usually the billing model. AlterLab removes the "enterprise contract" barrier.

For a volume of 10,000 successful requests:

  • Oxylabs: Typically requires a monthly commitment or a minimum contract spend.
  • AlterLab: 10,000 requests $\times$ $0.0002 = $2.00.

Check the AlterLab pricing page for current rates based on the scraping tier used.

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

Common issues and fixes

  • Authentication Errors: Ensure you are using the API key from the AlterLab dashboard, not the account password.
  • Rendering Issues: If a page appears blank, the site likely requires JS. Use min_tier=3 or higher to trigger a headless browser.
  • Timeout differences: AlterLab's default timeouts are optimized for speed. If scraping extremely heavy pages, adjust your client timeout settings.
  • Header mismatches: AlterLab automatically manages User-Agents. If you manually set headers in your Oxylabs code, try removing them first to let our engine optimize the request.

You're done

Your migration is complete. You now have a pay-as-you-go scraping pipeline with no recurring monthly fees. For more advanced features like cron-based scheduling or webhooks, visit our full documentation.

Hit reply if you have questions.

AlterLab // Web Data, Simplified.

Share

Was this article helpful?

Frequently Asked Questions

Most developers complete the migration in under 30 minutes. You only need to update your API client and replace your authentication key.
Yes, the REST API structures are highly compatible. If you use the Python SDK, replacing the Oxylabs request logic with the AlterLab client takes a few lines of code.
AlterLab offers a pure pay-as-you-go model starting at $0.0002 per request with no monthly minimums and no balance expiry, unlike Oxylabs' enterprise-focused contracts.