```yaml
product: AlterLab
title: "How to Migrate from ScrapingBee to AlterLab: Step-by-Step Guide (2026)"
category: Tutorials
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
last_updated: 2026-06-26
canonical_facts:
  - "Learn how to migrate from ScrapingBee to AlterLab in under an hour with pay-as-you-go pricing, no subscription, and minimal code changes."
source_url: https://alterlab.io/blog/how-to-migrate-from-scrapingbee-to-alterlab-step-by-step-guide-2026
```

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

## TL;DR
To migrate from ScrapingBee to AlterLab, install the AlterLab Python SDK, replace your ScrapingBee client with `alterlab.Client`, and update your API key. The request format and response structure are nearly identical, so most of your existing code works unchanged.

## Why migrate?
ScrapingBee requires a monthly subscription plan even if you use few credits. AlterLab offers a pure pay‑as‑you‑go model: you only pay for what you use, your balance never expires, and there are no mandatory monthly fees.

## Prerequisites
- An AlterLab account (create one for free at [/signup](/signup))
- Your AlterLab API key (found in the dashboard)
- About five minutes to install the SDK and update your calls

## Step 1: Install the AlterLab SDK
You can install the official Python package or call the REST API directly. The SDK mirrors the ScrapingBee client pattern.

```bash title="Terminal — Install AlterLab"
pip install alterlab
```

For full setup details, see the [Getting started guide](/docs/quickstart/installation).

## Step 2: Replace your API calls
Below is a direct before‑and‑after comparison. The only changes are the import, client initialization, and API key.

```python title="before_scrapingbee.py"
# ScrapingBee (before migration)
from scrapingbee import ScrapingBeeClient

client = ScrapingBeeClient(api_key="YOUR_SCRAPINGBEE_KEY")
response = client.get(
    url="https://example.com",
    params={"render_js": True}
)
print(response.content)
```

```python title="after_alterlab.py" {3-7}
# AlterLab (after migration)
import alterlab

client = alterlab.Client("YOUR_ALTERLAB_API_KEY")
response = client.scrape(
    url="https://example.com",
    params={"render_js": True}
)
print(response.text)  # Same data, pay‑as‑you‑go pricing
```

## Step 3: Handle response format differences
AlterLab returns a response object with the same attributes you used with ScrapingBee:
- `response.text` (or `response.content` for bytes)
- `response.status_code`
- `response.headers`

If you accessed `response.json()` on ScrapingBee, note that AlterLab does not auto‑parse JSON; you must `json.loads(response.text)` yourself. Otherwise, the structure is compatible.

## Step 4: Update your error handling
Both services use HTTP status codes to signal issues. AlterLab returns:
- `429` for rate limits (same as ScrapingBee)
- `402` when your balance is insufficient (ScrapingBee uses `403` for auth issues)
- `5xx` for upstream target errors

Adjust any custom retry logic to treat `402` as an out‑of‑balance condition rather than an authentication failure. Otherwise, your existing retry‑on‑`429` logic works unchanged.

## Cost comparison
Consider a workload of 10,000 requests per month.

| Platform | Cost for 10,000 requests | Monthly minimum | Balance expiry |
|----------|--------------------------|-----------------|----------------|
| AlterLab | $2.00 (10,000 × $0.0002) | $0              | Never          |
| ScrapingBee | $49.00 (base plan)   | $49.00          | Credits expire monthly |

- **$0.0002** — Per Request (AlterLab)
- **$0** — Monthly Minimum
- **Never** — Balance Expiry

Both APIs are capable — this guide is for developers prioritizing pay‑as‑you‑go pricing and no subscription requirements. See the [AlterLab pricing](/pricing) page for full details.

## Common issues and fixes
- **Missing `render_js` flag** – AlterLab uses smart‑tier routing; you can explicitly set `min_tier=3` for JavaScript sites instead of `render_js`.
- **JSON parsing** – AlterLab returns raw HTML/text by default. Add `params={"format": "json"}` if you need JSON output, then parse `response.text`.
- **Error `402`** – Check your balance in the dashboard or add a balance‑check endpoint before batch jobs.
- **Proxy headers** – If you relied on ScrapingBee’s `proxy_address` header, AlterLab provides equivalent data under `response.headers["X-AlterLab-Proxy"]`.

## You're done
Your migration is complete. Run your test suite to confirm everything works, then deploy. For more advanced options (scheduling, webhooks, Cortex AI), refer to the [full documentation](/docs).

AlterLab // Web Data, Simplified.

## Frequently Asked Questions

### How long does it take to migrate from ScrapingBee to AlterLab?

Typically under an hour. Most existing code remains unchanged; you only need to install the AlterLab SDK and replace your API key.

### Will my existing ScrapingBee code work with AlterLab?

Yes. AlterLab uses a compatible REST API and similar response format, so the Python SDK migration is straightforward with minimal adjustments.

### How does AlterLab pricing compare to ScrapingBee?

AlterLab charges $0.0002 per request with no monthly minimum and balance never expires. ScrapingBee requires a monthly plan (e.g., $49/mo for 1M credits) regardless of usage.

## Related

- [Lowe's Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/lowe-s-data-api-extract-structured-json-in-2026>)
- [How to Migrate from Scrapfly to AlterLab: Step-by-Step Guide \(2026\)](<https://alterlab.io/blog/how-to-migrate-from-scrapfly-to-alterlab-step-by-step-guide-2026>)
- [Scaling Web Scraping Pipelines for High-Volume Data](<https://alterlab.io/blog/scaling-web-scraping-pipelines-for-high-volume-data>)