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

# Firecrawl Integration for AI Agents & Workflows

> AI-powered web scraping, crawling, and search tool for extracting content from websites with advanced options for JavaScript rendering, caching, and structured data extraction.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/zKB2qsP6Q61VNLfB/logos/firecrawl.svg?fit=max&auto=format&n=zKB2qsP6Q61VNLfB&q=85&s=da3b0544c12b41910e24de5b96168220" alt="Firecrawl logo" width="72" height="72" data-path="logos/firecrawl.svg" />

## Overview

Add **Firecrawl** to any ModuleX agent or workflow. AI-powered web scraping, crawling, and search against the Firecrawl v1 REST API (`api.firecrawl.dev/v1`). Covers single-URL scraping, URL discovery (map), web search, multi-page crawls with job-id + status polling, LLM-based structured extraction, and batch scraping.

<Info>
  **Categories**: Web Search & Scraping · Data · Search · **Auth**: API Key, ModuleX Managed Key · **Actions**: 7
</Info>

## Authentication

<Tabs>
  <Tab title="API Key">
    ### API Key Authentication

    Authenticate using your Firecrawl API key

    #### Required Credentials

    | Field             | Description                               | Required | Format                                |
    | ----------------- | ----------------------------------------- | -------- | ------------------------------------- |
    | Firecrawl API Key | Your Firecrawl API key for authentication | Yes      | `fc-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
  </Tab>

  <Tab title="ModuleX Managed Key">
    ### ModuleX Managed Key

    Use ModuleX's managed API keys with usage tracked against your weekly credit limit
  </Tab>
</Tabs>

## Available Actions

<AccordionGroup>
  <Accordion title="scrape — Scrape content from a single URL with advanced options. Best for single page content extraction when you know exactly which page contains the information.">
    ### Parameters

    <ResponseField name="url" type="string" required>
      The URL to scrape
    </ResponseField>

    <ResponseField name="formats" type="array">
      Content formats: markdown, html, rawHtml, screenshot, links, summary (Default: `["markdown"]`)
    </ResponseField>

    <ResponseField name="only_main_content" type="boolean">
      Extract only the main content, filtering out navigation/footers (Default: `true`)
    </ResponseField>

    <ResponseField name="include_tags" type="array">
      HTML tags to specifically include in extraction
    </ResponseField>

    <ResponseField name="exclude_tags" type="array">
      HTML tags to exclude from extraction
    </ResponseField>

    <ResponseField name="wait_for" type="integer">
      Time in milliseconds to wait for dynamic content
    </ResponseField>

    <ResponseField name="mobile" type="boolean">
      Use mobile viewport
    </ResponseField>

    <ResponseField name="remove_base64_images" type="boolean">
      Remove base64-encoded images from output
    </ResponseField>

    <ResponseField name="max_age" type="integer">
      Maximum age in milliseconds for cached content. Enables faster scrapes for cached pages.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "ScrapeOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="map_website — Map a website to discover all indexed URLs. Best for discovering URLs before deciding what to scrape.">
    ### Parameters

    <ResponseField name="url" type="string" required>
      Starting URL for URL discovery
    </ResponseField>

    <ResponseField name="search" type="string">
      Optional search term to filter URLs
    </ResponseField>

    <ResponseField name="sitemap" type="string">
      Sitemap handling: 'include', 'skip', or 'only'
    </ResponseField>

    <ResponseField name="include_subdomains" type="boolean">
      Include URLs from subdomains in results
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum number of URLs to return
    </ResponseField>

    <ResponseField name="ignore_query_parameters" type="boolean">
      Do not return URLs with query parameters (Default: `true`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "MapWebsiteOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="search — Search the web and optionally extract content from search results. Supports operators: site:, inurl:, intitle:, and exact match with quotes.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      Search query string (supports operators)
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum number of results to return (Default: `5`)
    </ResponseField>

    <ResponseField name="tbs" type="string">
      Time-based search filter
    </ResponseField>

    <ResponseField name="location" type="string">
      Location parameter for search results
    </ResponseField>

    <ResponseField name="scrape_options" type="object">
      Options for scraping search results
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="crawl — Start a crawl job on a website. Returns a job ID — use check_crawl_status to monitor.">
    ### Parameters

    <ResponseField name="url" type="string" required>
      Starting URL for the crawl
    </ResponseField>

    <ResponseField name="exclude_paths" type="array">
      URL paths to exclude from crawling
    </ResponseField>

    <ResponseField name="include_paths" type="array">
      Only crawl these URL paths
    </ResponseField>

    <ResponseField name="max_depth" type="integer">
      Maximum depth to crawl relative to the entered URL
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum number of pages to crawl (Default: `100`)
    </ResponseField>

    <ResponseField name="allow_external_links" type="boolean">
      Allow crawling links to external domains (Default: `false`)
    </ResponseField>

    <ResponseField name="allow_backward_links" type="boolean">
      Allow crawling links to parent paths (Default: `false`)
    </ResponseField>

    <ResponseField name="ignore_sitemap" type="boolean">
      Ignore the website sitemap when crawling (Default: `false`)
    </ResponseField>

    <ResponseField name="scrape_options" type="object">
      Options for scraping each page
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "CrawlOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="check_crawl_status — Check the status of a crawl job and retrieve results once complete.">
    ### Parameters

    <ResponseField name="crawl_id" type="string" required>
      Crawl job ID returned from the crawl action
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "CheckCrawlStatusOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="extract — Extract structured information from web pages using LLM capabilities. Best for extracting specific structured data.">
    ### Parameters

    <ResponseField name="urls" type="array" required>
      Array of URLs to extract information from
    </ResponseField>

    <ResponseField name="prompt" type="string">
      Custom prompt for the LLM extraction
    </ResponseField>

    <ResponseField name="schema_definition" type="object">
      JSON schema for structured data extraction
    </ResponseField>

    <ResponseField name="allow_external_links" type="boolean">
      Allow extraction from external links (Default: `false`)
    </ResponseField>

    <ResponseField name="enable_web_search" type="boolean">
      Enable web search for additional context (Default: `false`)
    </ResponseField>

    <ResponseField name="include_subdomains" type="boolean">
      Include subdomains in extraction (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "ExtractOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="batch_scrape — Batch scrape multiple URLs efficiently. More efficient than calling scrape multiple times.">
    ### Parameters

    <ResponseField name="urls" type="array" required>
      Array of URLs to scrape
    </ResponseField>

    <ResponseField name="formats" type="array">
      Content formats to extract (Default: `["markdown"]`)
    </ResponseField>

    <ResponseField name="only_main_content" type="boolean">
      Extract only the main content (Default: `true`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "BatchScrapeOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* HTTP timeouts: 120s for scrape/map/search/status; 180s for
  crawl/extract/batch (long-running jobs).
* Snake\_case input parameters are converted to camelCase for the
  upstream API (`only_main_content` → `onlyMainContent`, etc.).
* Response `data` carries the upstream JSON body unchanged so callers
  see the rich nested metadata Firecrawl returns.
* Failures (non-2xx, timeouts, parse errors) surface as
  `success=False` + `error`; empty/blank API keys short-circuit.

## Related integrations

<CardGroup cols={3}>
  <Card title="Exa Search" href="/integrations/tools/exa-search" />

  <Card title="Linkup" href="/integrations/tools/linkup" />

  <Card title="Serper" href="/integrations/tools/serper" />
</CardGroup>

## Links

* [Firecrawl](https://firecrawl.dev)
