Apify Migration Guide
Migrate from Apify to AlterLab and simplify your scraping stack. This guide maps every Apify concept to its AlterLab equivalent with side-by-side code examples.
Different Philosophies
Concept Mapping
Here's how Apify concepts map to AlterLab:
| Apify Concept | AlterLab Equivalent | Key Difference |
|---|---|---|
| Actors | Scrape modes + extraction profiles | No code to deploy — configure via API parameters |
| Schedules | Scheduler API | Cron-based scheduling via REST API |
| Key-value store | Cloud Storage Export | Export results to S3, GCS, or webhook delivery |
| Webhooks | Webhooks | Near-identical — POST to your endpoint on completion |
| Datasets | Batch results + output formats | JSON, markdown, text, and structured extraction |
| Apify Proxy | Built-in proxies or BYOP | Automatic proxy rotation included, or bring your own |
Feature Parity
| Feature | Apify | AlterLab |
|---|---|---|
| Basic HTTP scraping | Yes | Yes |
| JavaScript rendering | Yes | Yes |
| Anti-bot bypass | Limited | Advanced |
| Auto tier escalation | No | Yes |
| LLM extraction | Via actors | Built-in |
| Structured output (JSON) | Yes | Yes |
| PDF / OCR extraction | Via actors | Built-in |
| Webhooks | Yes | Yes |
| Scheduling | Yes | Yes |
| Batch processing | Yes | Yes |
| Proxy management | Yes | Yes + BYOP |
| Custom code execution | Yes (actors) | No |
| Python SDK | Yes | Yes |
| Node.js SDK | Yes | Yes |
Custom Actors vs API Parameters
Actors → Scrape Modes + Extraction
Apify actors are self-contained scraping programs. In AlterLab, you configure the same behavior through API parameters — no code to deploy or maintain.
| Apify Actor | AlterLab Approach |
|---|---|
web-scraper | /api/v1/scrape with js_rendering: true |
cheerio-scraper | /api/v1/scrape (default mode, no JS rendering) |
playwright-scraper | /api/v1/scrape with js_rendering: true + wait options |
| Custom extraction actor | formats: ["json"] with json_schema for LLM-powered extraction |
from apify_client import ApifyClient
client = ApifyClient("apify_api_xxx")
# Run a web scraper actor
run = client.actor("apify/web-scraper").call(
run_input={
"startUrls": [{"url": "https://example.com"}],
"pageFunction": """
async function pageFunction(context) {
const { request, page } = context;
const title = await page.title();
return { url: request.url, title };
}
""",
}
)
# Fetch results from dataset
dataset = client.dataset(run["defaultDatasetId"])
for item in dataset.iterate_items():
print(item)Schedules → Scheduler API
Apify Schedules trigger actor runs on a cron schedule. AlterLab's Scheduler API provides the same functionality without actors.
from apify_client import ApifyClient
client = ApifyClient("apify_api_xxx")
# Create a schedule to run an actor every hour
client.schedules().create(
name="hourly-scrape",
cron_expression="0 * * * *",
actions=[{
"type": "RUN_ACTOR",
"actorId": "apify/web-scraper",
"runInput": {
"startUrls": [{"url": "https://example.com"}]
}
}]
)Simpler Scheduling
Storage → Cloud Storage Export
Apify provides key-value stores and datasets for persisting scrape results. AlterLab delivers results directly via API response, webhooks, or cloud storage export.
Apify Storage
- Key-value store (manual get/put)
- Datasets (append-only tables)
- Request queues (URL frontier)
- Stored on Apify platform
- Extra cost for storage retention
AlterLab Delivery
- Synchronous API response (instant)
- Webhook delivery (async jobs)
- Cloud storage export (S3, GCS)
- Multiple output formats per request
- No storage fees — you own the data
Webhooks
Both platforms support webhook notifications. The migration is straightforward — update the payload parsing in your webhook handler.
# Apify webhook payload
@app.post("/apify-webhook")
async def handle_apify(payload: dict):
event_type = payload["eventType"] # "ACTOR.RUN.SUCCEEDED"
resource = payload["resource"]
dataset_id = resource["defaultDatasetId"]
# Must fetch results separately from dataset API
results = apify_client.dataset(dataset_id).list_items()
process(results)Results in the Payload
Datasets → Batch Results + Formats
Apify datasets collect results from actor runs. In AlterLab, use batch scraping to process multiple URLs and get results in your preferred format.
from apify_client import ApifyClient
client = ApifyClient("apify_api_xxx")
# Run actor with multiple URLs
run = client.actor("apify/web-scraper").call(
run_input={
"startUrls": [
{"url": "https://example.com/page1"},
{"url": "https://example.com/page2"},
{"url": "https://example.com/page3"},
]
}
)
# Iterate through dataset results
dataset = client.dataset(run["defaultDatasetId"])
for item in dataset.iterate_items():
print(item["url"], item["title"])Proxy
Apify Proxy is a paid add-on with residential and datacenter pools. AlterLab includes proxy rotation in every request at no extra cost, and supports Bring Your Own Proxy (BYOP) for additional control.
Apify Proxy
- Separate pricing for residential proxies
- Must configure proxy groups per actor
proxyConfigurationin actor input- Geo-targeting available (extra cost)
AlterLab Proxy
- Automatic proxy rotation included
- Auto-escalation through proxy tiers
- BYOP support for your own proxy pools
- Geo-targeting via country parameter
# AlterLab — proxy handling is automatic, or use BYOP
curl -X POST https://api.alterlab.io/api/v1/scrape \
-H "X-API-Key: sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"country": "US",
"proxy_url": "http://user:pass@your-proxy:8080"
}'Pricing Comparison
| Aspect | Apify | AlterLab |
|---|---|---|
| Pricing model | Monthly subscription + usage | Pay-as-you-go only |
| Platform fee | $49-$499/mo base fee | $0 — no subscription |
| Basic scrape cost | ~$2.50-5 per 1,000 results | $0.20 per 1,000 (Tier 1) |
| JS rendering cost | Higher compute units | $1.00 per 1,000 (Tier 2) |
| Proxy cost | Extra per residential GB | Included in tier pricing |
| Storage cost | Retention fees after 7 days | No storage fees |
| Free tier | $5/mo in credits | $1 free credit on signup |
No Platform Fee
Step-by-Step Migration Checklist
Create an AlterLab account
Sign up at alterlab.io and grab your API key from the dashboard. You get $1 in free credits to test.
Install the SDK
Replace the Apify client with the AlterLab SDK:
# Remove Apify
pip uninstall apify-client
# Install AlterLab
pip install alterlab
# or: npm install @alterlab/sdkMap your actors to API calls
For each Apify actor you use, identify the equivalent AlterLab API parameters. See the Actors mapping section above.
Update webhook handlers
Update your webhook endpoints to parse AlterLab's payload format. Results are included directly — no dataset fetch needed.
Migrate schedules
Recreate your Apify schedules using the AlterLab Scheduler API. Use the same cron expressions — they're compatible.
Test and validate
Run your scraping jobs in parallel on both platforms. Compare results and costs. Once satisfied, cut over to AlterLab.
Decommission Apify
Cancel your Apify subscription, disable schedules, and remove the Apify SDK from your dependencies.
Why AlterLab
No Actors to Maintain
Stop writing, deploying, and debugging actor code. AlterLab handles rendering, anti-bot bypass, and extraction through API parameters.
Advanced Anti-Bot
Automatic tier escalation bypasses Cloudflare, DataDome, and other anti-bot systems. Sites that fail on Apify often succeed on AlterLab.
Built-in LLM Extraction
Extract structured JSON using AI — no custom actor code or third-party LLM integration needed. Just pass a JSON schema.
Pay-As-You-Go Pricing
No monthly platform fee. No compute unit calculations. Pay only for the scrapes you make, starting at $0.0002 per request.