AlterLabAlterLab
Guide
Migration

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

Change the base URL and API key - that's it! Your existing Firecrawl integration will work with AlterLab's compatibility endpoint.

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

Base URL
api.firecrawl.devapi.alterlab.io
Endpoint
/v0/scrape/api/v0/scrape
API key
fc-xxxsk_live_xxx

What Stays the Same

  • Request body format
  • Response structure
  • Auth header format (Bearer token)
  • Error response format

Compatibility Mapping

Firecrawl FeatureAlterLab SupportNotes
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_xxx

AlterLab Style (X-API-Key)

X-API-Key: sk_live_xxx

Use Either Auth Method

Both authentication methods work with the compatibility endpoint. Use whichever is more convenient for your existing codebase.

Request Format

POST
/api/v0/scrape

Firecrawl-compatible scrape endpoint. Accepts Firecrawl request format, returns Firecrawl response format.

Parameters

NameTypeRequiredDescription
urlstring
Required
The URL to scrape
formatsarrayOptionalOutput formats: markdown, html, rawHtml, links, screenshot, extractDefault: ["markdown"]
onlyMainContentbooleanOptionalOnly return main content (default behavior)Default: true
waitForintegerOptionalWait time in milliseconds before fetchingDefault: 0
timeoutintegerOptionalTimeout in millisecondsDefault: 30000
proxystringOptionalProxy mode: basic, stealth, auto
extractobjectOptionalSchema 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

Start with the compatibility endpoint to verify AlterLab works for your use case, then gradually migrate to the native API to unlock additional features.