```yaml
product: AlterLab
title: Firecrawl Compat API Reference
category: api
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/docs/api/generated/firecrawl-compat
```

# Firecrawl Compat API Reference

Auto-generated API reference for firecrawl compat endpoints, built from the OpenAPI spec.

## POST /api/v0/crawl

Crawl a website (Firecrawl-compatible)
Firecrawl-compatible crawl endpoint. Starts an asynchronous crawl and returns a job ID. Poll `GET /v0/crawl/{id}` for progress and results. **Authentication:** - `Authorization: Bearer <api_key>` (Firecrawl-style) - `X-API-Key: <api_key>` (AlterLab-style) **Example:** ```bash curl -X POST https://api.alterlab.io/v0/crawl \ -H "Authorization: Bearer sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "limit": 50, "maxDepth": 2}' ```

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `url` | body | `string` | yes | The URL to crawl |
| `excludePaths` | body | `string[]` | no |  |
| `includePaths` | body | `string[]` | no |  |
| `maxDepth` | body | `integer` | no | Maximum depth to crawl relative to the entered URL |
| `ignoreSitemap` | body | `boolean` | no | Ignore the website sitemap when crawling |
| `limit` | body | `integer` | no | Maximum number of pages to crawl |
| `scrapeOptions` | body | `object` | no | Scrape options embedded in a Firecrawl crawl request. |

## DELETE /api/v0/crawl/{crawl_id}

Cancel a crawl (Firecrawl-compatible)
Cancel a running crawl and refund credits for unprocessed pages.

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `crawl_id` | path | `string` | yes |  |

## GET /api/v0/crawl/{crawl_id}

Get crawl status (Firecrawl-compatible)
Poll the status of an ongoing or completed crawl. Returns the current progress, number of pages completed, and scraped data when the crawl is finished.

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `crawl_id` | path | `string` | yes |  |

## POST /api/v0/map

Map a website (Firecrawl-compatible)
Firecrawl-compatible site mapping endpoint. Returns a list of URLs discovered on the website via sitemap parsing and link extraction. **Authentication:** - `Authorization: Bearer <api_key>` (Firecrawl-style) - `X-API-Key: <api_key>` (AlterLab-style) **Example:** ```bash curl -X POST https://api.alterlab.io/v0/map \ -H "Authorization: Bearer sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "limit": 100}' ```

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `url` | body | `string` | yes | The URL to map |
| `search` | body | `string` | no |  |
| `ignoreSitemap` | body | `boolean` | no | Ignore the website sitemap when crawling |
| `sitemapOnly` | body | `boolean` | no | Only return URLs found in the sitemap |
| `includeSubdomains` | body | `boolean` | no | Include subdomains of the website |
| `limit` | body | `integer` | no | Maximum number of links to return |

## POST /api/v0/scrape

Scrape a URL (Firecrawl-compatible)
Firecrawl-compatible scraping endpoint. This endpoint accepts requests in Firecrawl's format and returns responses in Firecrawl's format, making it easy to migrate from Firecrawl to AlterLab. **Authentication:** - `Authorization: Bearer <api_key>` (Firecrawl-style) - `X-API-Key: <api_key>` (AlterLab-style) **Example:** ```bash curl -X POST https://api.alterlab.io/v0/scrape \ -H "Authorization: Bearer sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "formats": ["markdown", "html"]}' ``` **Migration from Firecrawl:** Simply change the base URL from `https://api.firecrawl.dev` to `https://api.alterlab.io` and use your AlterLab API key instead of Firecrawl's.

Authentication: `X-API-Key: <your key>`

| Parameter | In | Type | Required | Description |
|-----------|----|------|----------|-------------|
| `url` | body | `string` | yes | The URL to scrape |
| `formats` | body | `string[]` | no |  |
| `onlyMainContent` | body | `boolean` | no | Only return the main content of the page excluding headers, navs, footers, etc. |
| `includeTags` | body | `string[]` | no |  |
| `excludeTags` | body | `string[]` | no |  |
| `waitFor` | body | `integer` | no |  |
| `timeout` | body | `integer` | no |  |
| `headers` | body | `object` | no |  |
| `mobile` | body | `boolean` | no | Emulate mobile device |
| `skipTlsVerification` | body | `boolean` | no | Skip TLS certificate verification |
| `removeBase64Images` | body | `boolean` | no | Remove base64 encoded images from output |
| `proxy` | body | `"basic" \| "stealth" \| "auto"` | no |  |
| `storeInCache` | body | `boolean` | no | Store result in cache |
| `maxAge` | body | `integer` | no |  |
| `extract` | body | `object` | no |  |
| `actions` | body | `object[]` | no |  |
