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

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

Learn how to migrate from ProxyCrawl to AlterLab in under an hour with this step‑by‑step guide. Copy‑paste ready code, pricing comparison, and common fixes.

4 min read
6 views

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

Try it free

Both APIs are capable — this guide is for developers prioritizing pay-as-you-go pricing and no subscription requirements.

TL;DR

To migrate from ProxyCrawl to AlterLab, install the AlterLab SDK, replace your ProxyCrawl client with alterlab.Client, and use the same scrape method. Your existing code works with minimal changes because the REST API format is compatible.

Why migrate?

ProxyCrawl requires separate tokens for normal and JavaScript scraping and does not provide a unified SDK. AlterLab offers a single API key that automatically routes requests to the appropriate tier, simplifying token management and removing the need for multiple SDKs.

Prerequisites

  • An AlterLab account (free at /signup)
  • Your AlterLab API key from the dashboard
  • About 5 minutes to update your code

Step 1: Install the AlterLab SDK

You can continue using the raw REST API, but the Python SDK reduces boilerplate. Install it with pip.

Bash
pip install alterlab

For full setup details, see the Getting started guide.

Step 2: Replace your API calls

Below is a direct before‑and‑after comparison. The request structure stays the same; only the client initialization and token source change.

Python
import requests

PROXYCRAWL_TOKEN = "your_proxycrawl_token"
target_url = "https://example.com"

response = requests.get(
    "https://api.proxycrawl.com/",
    params={"token": PROXYCRAWL_TOKEN, "url": target_url}
)
html = response.text
Python
import alterlab

# Initialize the AlterLab client with your API key
client = alterlab.Client("your_alterlab_key")
# The scrape method accepts a URL and optional parameters
response = client.scrape("https://example.com")
html = response.text  # Same HTML output as ProxyCrawl

If you prefer the REST API directly, replace the ProxyCrawl endpoint with AlterLab’s and keep the same query parameters:

Python
import requests

ALTERLAB_TOKEN = "your_alterlab_key"
target_url = "https://example.com"

response = requests.get(
    "https://api.alterlab.io/scrape",
    params={"token": ALTERLAB_TOKEN, "url": target_url}
)
html = response.text

Step 3: Handle response format differences

AlterLab returns a response object with the same attributes you used with ProxyCrawl: text for HTML, status_code for HTTP status, and headers for response headers. There are no breaking changes in the core payload.

If you accessed nested JSON data via response.json()['body'], note that AlterLab’s JSON output mirrors the HTML string under the text field. For structured data, consider using the Cortex AI extraction feature.

Step 4: Update your error handling

Both services use HTTP status codes to signal issues. AlterLab returns:

  • 200 for success
  • 429 when you exceed your balance‑based rate limit
  • 401 for invalid or missing API key
  • 500 for internal errors

Your existing retry logic based on status codes will work unchanged. If you relied on ProxyCrawl’s specific error messages in the JSON body, update them to match AlterLab’s format (see the API reference for details).

Cost comparison

AlterLab’s pricing is pure pay‑as‑you-go with no subscription. Below is a concrete example for 10,000 requests.

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

For 10,000 requests:

  • AlterLab: 10,000 × $0.0002 = $2.00
  • ProxyCrawl (typical middle tier): ~$25.00 – $40.00 depending on plan

See the full breakdown on the AlterLab pricing page.

Common issues and fixes

  • Missing API key error – Double‑check that you replaced the ProxyCrawl token with your AlterLab key in environment variables or config files.
  • Unexpected HTML encoding – AlterLab returns UTF‑8 encoded text by default. If you see garbled characters, ensure your client treats the response as UTF‑8 (most libraries do this automatically).
  • Rate limit responses – AlterLab’s 429 includes a Retry-After header. Implement a simple back‑off respecting that header if you hit limits.
  • Cortex AI extraction not returning data – The extraction feature requires adding extract: true to the request parameters. Consult the Cortex AI docs for examples.

You’re done

Your migration is complete. Run your test suite to confirm everything works, then deploy. For more advanced features like scheduling, monitoring, or webhooks, see the detailed ProxyCrawl comparison or explore the AlterLab documentation.

Happy scraping!
Hit reply if you have questions.

Share

Was this article helpful?

Frequently Asked Questions

Typically under an hour. Most existing code stays the same; you only need to install the AlterLab SDK and swap the API key.
Yes. The REST API endpoint and response structure are nearly identical, so only the client initialization and token parameter change.
AlterLab charges $0.0002 per request with no monthly minimum and no balance expiry. ProxyCrawl uses tiered subscriptions; AlterLab is pure pay‑as‑you-go.