Firecrawl Migration Guide
Migrate from Firecrawl to AlterLab with minimal code changes. Our compatibility endpoint accepts Firecrawl-format requests and returns Firecrawl-format responses.
Quick Start
Near Drop-in Replacement
Before (Firecrawl)
curl -X POST https://api.firecrawl.dev/v0/scrape \
-H "Authorization: Bearer fc-xxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'After (AlterLab)
curl -X POST https://api.alterlab.io/api/v0/scrape \
-H "Authorization: Bearer sk_live_xxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'What Changes
api.firecrawl.dev→api.alterlab.io/v0/scrape→/api/v0/scrapefc-xxx→sk_live_xxxWhat Stays the Same
- Request body format
- Response structure
- Auth header format (Bearer token)
- Error response format
Compatibility Mapping
| Firecrawl Feature | AlterLab Support | Notes |
|---|---|---|
formats: ["markdown"] | Supported | Returns clean markdown |
formats: ["html"] | Supported | Processed HTML |
formats: ["rawHtml"] | Supported | Original HTML |
formats: ["links"] | Supported | Extracted hrefs from page |
formats: ["screenshot"] | Partial | Requires JS rendering mode |
waitFor | Supported | Milliseconds delay |
timeout | Supported | Milliseconds (auto-converted) |
proxy: "stealth" | Supported | Maps to JS rendering mode |
extract | Supported | Structured data extraction |
onlyMainContent | Supported | Default behavior in AlterLab |
Authentication
The compatibility endpoint supports both Firecrawl-style and AlterLab-style authentication:
Firecrawl Style (Bearer)
Authorization: Bearer sk_live_xxxAlterLab Style (X-API-Key)
X-API-Key: sk_live_xxxUse Either Auth Method
Request Format
/api/v0/scrapeFirecrawl-compatible scrape endpoint. Accepts Firecrawl request format, returns Firecrawl response format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Required | The URL to scrape |
| formats | array | Optional | Output formats: markdown, html, rawHtml, links, screenshot, extractDefault: ["markdown"] |
| onlyMainContent | boolean | Optional | Only return main content (default behavior)Default: true |
| waitFor | integer | Optional | Wait time in milliseconds before fetchingDefault: 0 |
| timeout | integer | Optional | Timeout in millisecondsDefault: 30000 |
| proxy | string | Optional | Proxy mode: basic, stealth, auto |
| extract | object | Optional | Schema for structured data extraction |
Request Example
curl -X POST https://api.alterlab.io/api/v0/scrape \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"formats": ["markdown", "html"],
"waitFor": 1000,
"timeout": 30000
}'Response Format
Responses match Firecrawl's format with an optional alterlab extension containing additional metadata:
{
"success": true,
"data": {
"markdown": "# Example Domain\n\nThis domain is for use...",
"html": "<h1>Example Domain</h1><p>This domain is for use...</p>",
"rawHtml": "<!doctype html><html>...</html>",
"links": [
"https://iana.org/domains/example"
],
"metadata": {
"title": "Example Domain",
"description": "Example description",
"sourceURL": "https://example.com/",
"statusCode": 200
}
},
"alterlab": {
"tier_used": "1",
"credits": 1,
"response_time_ms": 842,
"cached": false
}
}Code Examples
import requests
# Minimal change: just update the base URL and API key
response = requests.post(
"https://api.alterlab.io/api/v0/scrape", # Changed from api.firecrawl.dev
headers={
"Authorization": "Bearer sk_live_xxx", # Your AlterLab key
"Content-Type": "application/json"
},
json={
"url": "https://example.com",
"formats": ["markdown", "html"]
}
)
data = response.json()
if data["success"]:
print(f"Markdown: {data['data']['markdown'][:100]}...")
print(f"Cost: {data['alterlab']['credits']}")
else:
print(f"Error: {data.get('error')}")Key Differences
1. Endpoint Path
AlterLab uses /api/v0/scrape instead of/v0/scrape due to API routing conventions.
2. Additional Response Data
AlterLab includes an optional alterlab object in responses with billing info, tier used, and performance metrics. This doesn't break Firecrawl compatibility.
3. Anti-Bot Capabilities
AlterLab has more aggressive anti-bot bypass capabilities with automatic tier escalation. Sites that fail on Firecrawl may succeed on AlterLab.
4. Pricing Model
AlterLab uses pay-as-you-go pricing instead of subscriptions. Check the pricing page for details.
AlterLab Extensions
While maintaining Firecrawl compatibility, you can also leverage AlterLab-specific features by using our native /api/v1/scrape endpoint:
Native Features
- Cost controls (max tier limits)
- OCR for image-based content
- PDF extraction
- Async/webhook mode
- Bring Your Own Proxy (BYOP)
When to Use Native API
- Need advanced cost controls
- Processing PDFs or images
- Using webhooks for results
- Integrating with your own proxies
Gradual Migration