> ## Documentation Index
> Fetch the complete documentation index at: https://lava.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Firecrawl

> Firecrawl turns any website into LLM-ready data: scrape single pages to markdown or JSON, crawl entire sites, map all URLs, search the web with full page content inlined, or run autonomous agents and scripted browser sessions.

Firecrawl turns any website into LLM-ready data: scrape single pages to markdown or JSON, crawl entire sites, map all URLs, search the web with full page content inlined, or run autonomous agents and scripted browser sessions. Best when you need clean structured content from a URL or site — unlike search APIs (Serper, Brave, Exa) that return result links, Firecrawl renders pages (JS included) and extracts readable content. Unlike Cloudflare Browser Rendering, Firecrawl adds multi-page crawl orchestration, sitemap-aware mapping, AI-powered structured extraction, and an agent runtime.

23 endpoints available through Lava's AI Gateway. See the [Firecrawl API docs](https://docs.firecrawl.dev/api-reference/v2-introduction) for full documentation.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Endpoints

### Scrape a single URL and return clean markdown and/or structured JSON. Supports JavaScript rendering, main-content extraction, and multiple output formats (markdown, html, rawHtml, links, screenshot, screenshot\@fullPage, json). 1 credit per page.

**POST** `https://api.firecrawl.dev/v2/scrape` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/scrape', { body: {"url":"https://example.com","formats":["markdown"]} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fscrape" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com","formats":["markdown"]}'
    ```
  </Tab>
</Tabs>

### Get a complete list of URLs from a website fast. Use this before crawling to scope a site, or as a lightweight sitemap discovery. 1 credit.

**POST** `https://api.firecrawl.dev/v2/map` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/map', { body: {"url":"https://example.com","limit":100} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fmap" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com","limit":100}'
    ```
  </Tab>
</Tabs>

### Search the web and return full page content inline in markdown. Combines a search query with page scraping in one call. 2 credits per 10 results.

**POST** `https://api.firecrawl.dev/v2/search` — \$0.002 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/search', {
      body: {
    "query": "latest AI agent frameworks",
    "limit": 10,
    "scrapeOptions": {
      "formats": [
        "markdown"
      ]
    }
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fsearch" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"latest AI agent frameworks","limit":10,"scrapeOptions":{"formats":["markdown"]}}'
    ```
  </Tab>
</Tabs>

### Kick off a recursive site crawl — returns a job id. Poll /v2/crawl/\{id} for results. Billed 1 credit per page crawled (not captured at kick-off; heavy crawls under-collect at the gateway).

**POST** `https://api.firecrawl.dev/v2/crawl` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl', {
      body: {
    "url": "https://example.com",
    "limit": 25,
    "scrapeOptions": {
      "formats": [
        "markdown"
      ]
    }
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com","limit":25,"scrapeOptions":{"formats":["markdown"]}}'
    ```
  </Tab>
</Tabs>

### List currently active crawl jobs. Free.

**GET** `https://api.firecrawl.dev/v2/crawl/active` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl/active', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl%2Factive" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get status and results of a crawl job. Free status poll.

**GET** `https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get errors from a crawl job. Free.

**GET** `https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000/errors` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000/errors', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl%2F550e8400-e29b-41d4-a716-446655440000%2Ferrors" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Cancel an in-progress crawl job. Free.

**DELETE** `https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl/550e8400-e29b-41d4-a716-446655440000', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Preview the params Firecrawl will derive for a crawl from a natural-language prompt, without kicking a job off. Free.

**POST** `https://api.firecrawl.dev/v2/crawl/params-preview` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/crawl/params-preview', {
      body: {
    "url": "https://example.com",
    "prompt": "Extract pricing and documentation pages"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fcrawl%2Fparams-preview" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com","prompt":"Extract pricing and documentation pages"}'
    ```
  </Tab>
</Tabs>

### Submit a list of URLs to scrape as a single job. Returns a job id — poll /v2/batch/scrape/\{id}. Billed 1 credit per URL (not captured at kick-off).

**POST** `https://api.firecrawl.dev/v2/batch/scrape` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/batch/scrape', {
      body: {
    "urls": [
      "https://example.com",
      "https://example.org"
    ],
    "formats": [
      "markdown"
    ]
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbatch%2Fscrape" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"urls":["https://example.com","https://example.org"],"formats":["markdown"]}'
    ```
  </Tab>
</Tabs>

### Get status and results of a batch scrape job. Free.

**GET** `https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbatch%2Fscrape%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get errors from a batch scrape job. Free.

**GET** `https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000/errors` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000/errors', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbatch%2Fscrape%2F550e8400-e29b-41d4-a716-446655440000%2Ferrors" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Cancel an in-progress batch scrape job. Free.

**DELETE** `https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/batch/scrape/550e8400-e29b-41d4-a716-446655440000', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbatch%2Fscrape%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Extract structured data from one or more URLs against a prompt or schema. Returns a job id — poll /v2/extract/\{id}. Upstream pricing is token-based; flat kick-off cost under-collects on heavy extractions.

**POST** `https://api.firecrawl.dev/v2/extract` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/extract', {
      body: {
    "urls": [
      "https://example.com"
    ],
    "prompt": "Extract the title and main heading"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fextract" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"urls":["https://example.com"],"prompt":"Extract the title and main heading"}'
    ```
  </Tab>
</Tabs>

### Get status and results of an extract job. Free.

**GET** `https://api.firecrawl.dev/v2/extract/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/extract/550e8400-e29b-41d4-a716-446655440000', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fextract%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a remote browser session for scripted interaction. Upstream bills 2 credits/minute; gateway bills flat kick-off and under-collects on long sessions.

**POST** `https://api.firecrawl.dev/v2/browser` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/browser', { body: {} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbrowser" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{}'
    ```
  </Tab>
</Tabs>

### Execute JavaScript in a live browser session. 5 credits per action upstream.

**POST** `https://api.firecrawl.dev/v2/browser/550e8400-e29b-41d4-a716-446655440000/execute` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/browser/550e8400-e29b-41d4-a716-446655440000/execute', { body: {"code":"return document.title;"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbrowser%2F550e8400-e29b-41d4-a716-446655440000%2Fexecute" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"code":"return document.title;"}'
    ```
  </Tab>
</Tabs>

### List active browser sessions. Free.

**GET** `https://api.firecrawl.dev/v2/browser` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/browser', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbrowser" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### End a browser session. Free.

**DELETE** `https://api.firecrawl.dev/v2/browser/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/browser/550e8400-e29b-41d4-a716-446655440000', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fbrowser%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Execute JavaScript or run an AI agent prompt inside a live browser session bound to a prior scrape. Provide `code` OR `prompt`, never both. 5 credits per action upstream.

**POST** `https://api.firecrawl.dev/v2/scrape/550e8400-e29b-41d4-a716-446655440000/interact` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/scrape/550e8400-e29b-41d4-a716-446655440000/interact', {
      body: {
    "code": "const title = await page.title(); JSON.stringify({ title });",
    "language": "node"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fscrape%2F550e8400-e29b-41d4-a716-446655440000%2Finteract" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"code":"const title = await page.title(); JSON.stringify({ title });","language":"node"}'
    ```
  </Tab>
</Tabs>

### Run an autonomous web-gathering agent against a goal. Returns a job id. Upstream pricing is dynamic (5 free daily runs, then variable); flat kick-off cost under-collects on long runs.

**POST** `https://api.firecrawl.dev/v2/agent` — \$0.001 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/agent', {
      body: {
    "prompt": "Find the pricing page on https://example.com and return the lowest paid tier"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fagent" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"prompt":"Find the pricing page on https://example.com and return the lowest paid tier"}'
    ```
  </Tab>
</Tabs>

### Get status and output of an agent run. Free.

**GET** `https://api.firecrawl.dev/v2/agent/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/agent/550e8400-e29b-41d4-a716-446655440000', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fagent%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Cancel an in-progress agent run. Free.

**DELETE** `https://api.firecrawl.dev/v2/agent/550e8400-e29b-41d4-a716-446655440000` — Free / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.firecrawl.dev/v2/agent/550e8400-e29b-41d4-a716-446655440000', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.firecrawl.dev%2Fv2%2Fagent%2F550e8400-e29b-41d4-a716-446655440000" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
