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

# Firecrawl Tools

> This is an example of how to use the FirecrawlTools.

```python firecrawl_tools.py theme={null}
"""
This is an example of how to use the FirecrawlTools.

Prerequisites:
- Create a Firecrawl account and get an API key
- Set the API key as an environment variable:
    export FIRECRAWL_API_KEY=<your-api-key>
"""

from agno.agent import Agent
from agno.tools.firecrawl import FirecrawlTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


agent = Agent(
    tools=[
        FirecrawlTools(
            enable_scrape=False, enable_crawl=True, enable_search=True, poll_interval=2
        )
    ],
    markdown=True,
)

# Should use search

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response(
        "Search for the web for the latest on 'web scraping technologies'",
        formats=["markdown", "links"],
    )

    # Should use crawl
    agent.print_response("Summarize this https://docs.agno.com/introduction/")
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno firecrawl-py openai
    ```
  </Step>

  <Step title="Export your API keys">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export FIRECRAWL_API_KEY="your_firecrawl_api_key_here"
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:FIRECRAWL_API_KEY="your_firecrawl_api_key_here"
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `firecrawl_tools.py`, then run:

    ```bash theme={null}
    python firecrawl_tools.py
    ```
  </Step>
</Steps>

Full source: [cookbook/91\_tools/firecrawl\_tools.py](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/firecrawl_tools.py)
