2 Months Free - Annually

Firecrawl + LlamaIndex

Add Firecrawl web search and crawling to LlamaIndex agents and RAG pipelines.
Load search results, single pages or whole sites as LlamaIndex documents.

//
Used by over 1.25M developers
//
Trusted by 150,000+
companies
of all sizes
[ 01 / 04 ]
·
Features

Key Features

Native LlamaIndex data connector
Search, scrape, crawl and map modes in FireCrawlWebReader
Support for complex queries
Built-in caching and optimization
Compatible with all LLMs
Perfect for knowledge bases
[ 02 / 04 ]
·
Installation

How do I give a LlamaIndex agent web search?

To give a LlamaIndex agent web search, wrap Firecrawl search in a FunctionTool and pass it to a FunctionAgent. The agent decides when to search the live web. For RAG pipelines, FireCrawlWebReader in search mode loads the results of a web query straight into LlamaIndex documents you can index.

1

Install the packages

Install LlamaIndex, the Firecrawl Python SDK, the LlamaIndex web readers, and OpenAI integrations for the LLM and embeddings. Set FIRECRAWL_API_KEY from your Firecrawl dashboard and the key for your model provider.

Terminal
pip install -U llama-index-core llama-index-llms-openai llama-index-embeddings-openai llama-index-readers-web firecrawl-py
export FIRECRAWL_API_KEY="fc-YOUR-API-KEY"
export OPENAI_API_KEY="sk-YOUR-API-KEY"
2

Wrap Firecrawl search as a tool

FunctionTool turns a Python function into a LlamaIndex tool, using the docstring as the tool description. This function calls the Firecrawl search API and returns each result's title, URL and description.

agent.py
from firecrawl import Firecrawl
from llama_index.core.tools import FunctionTool

firecrawl = Firecrawl()

def web_search(query: str) -> str:
    """Search the web with Firecrawl and return titles, URLs and descriptions."""
    results = firecrawl.search(query, limit=5)
    return "\n\n".join(f"{r.title}\n{r.url}\n{r.description}" for r in (results.web or []))

search_tool = FunctionTool.from_defaults(fn=web_search)
3

Give the tool to an agent

FunctionAgent calls web_search whenever a question needs current information, then answers with the sources in context.

agent.py
import asyncio

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

agent = FunctionAgent(
    tools=[search_tool],
    llm=OpenAI(model="gpt-6-luna"),
    system_prompt="Use web_search for anything current and cite the URLs you used.",
)

async def main():
    response = await agent.run("What did LlamaIndex release this month?")
    print(response)

asyncio.run(main())
4

Load search results for RAG

FireCrawlWebReader runs one search and returns LlamaIndex documents. Pass a query in search mode, or a URL in scrape, crawl or map mode.

rag.py
import os

from llama_index.core import VectorStoreIndex
from llama_index.readers.web import FireCrawlWebReader

reader = FireCrawlWebReader(
    api_key=os.environ["FIRECRAWL_API_KEY"],
    mode="search",
    params={"limit": 5},
)
documents = reader.load_data(query="LlamaIndex agent workflows")
index = VectorStoreIndex.from_documents(documents)
[ 03 / 04 ]
·
What Our Customers Say
//
Community
//

People love
building with Firecrawl

Discover why developers choose Firecrawl every day.
//
FAQ
//

Frequently
asked questions

Everything you need to know about this integration.
General
LlamaIndex agents can call any Python function as a tool through FunctionTool, which is how Firecrawl search plugs in. One function that calls the Firecrawl SDK works with FunctionAgent, ReActAgent and AgentWorkflow.
Use the reader when you want to run a search once and index the results, as in a RAG pipeline. Use a search tool when the agent should decide during a conversation when to search and what to search for.
Technical
Each document from FireCrawlWebReader in search mode holds the result's title, URL and description, with metadata that records its position in the results and the query that produced it.
A Firecrawl search costs 2 credits per 10 results, rounded up, and scraping a page costs 1 credit. The Free plan includes 1,000 credits a month with no credit card.
Why Firecrawl?
The world's most comprehensive web data API. Our custom browser stack and semantic index deliver superior data quality across any website, handling more content types and edge cases than any competitor.
JavaScript rendering, dynamic content, and robust request handling built-in.
Process millions of pages with automatic rate limiting, caching, and distributed infrastructure.
Optimized scraping engine with parallel processing and smart caching for instant results.
Comprehensive docs, SDKs for all major languages, and dedicated support to help you succeed.
[ 04 / 04 ]
·
Pricing

Flexible pricing

Start for free, then scale as you grow.Are you an AI agent? See pricing

Free Plan

A lightweight way to get started.
No cost, no card, no hassle.
$0
/month
500 searches or 1,000 pages scraped
2 concurrent requests
Low rate limits

Hobby

Great for side projects and small tools.
Fast, simple, no overkill.
$16
/month
Billed yearly
Save $38
2,500 searches or 5,000 pages scraped
5 concurrent requests
Basic support
$9 per extra 1.5k credits

Standard
Most popular

Perfect for scaling with less effort.
Simple, solid, dependable.
$83
/month
Billed yearly
Save $198
50,000 searches or 100,000 pages scraped
25 concurrent requests
Standard support
$47 per extra 35k credits

Growth

Built for high volume and speed.
Firecrawl at full force.
$333
/month
Billed yearly
Save $798
250,000 searches or 500,000 pages scraped
50 concurrent requests
Priority support
$177 per extra 175k credits

Scale Plans

High-volume plans for teams that need more power and dedicated support. Get access to higher rate limits, more concurrent browsers, and priority support. Scale checks out instantly, no sales call needed.

Need more? Contact us

Also on AWS Marketplace and Google Cloud Marketplace.

Scale

For teams scaling their data pipelines
1,000,000 credits / month
$599/month
Billed yearly
Save $1,798
500,000 searches or 1,000,000 pages scraped
100 concurrent requests
Priority support
$397 per extra 350k credits

Enterprise

Power at your pace with custom solutions
Custom credits
Custom concurrent requests
Dedicated support & SLA
Bulk discounts
Zero-data retention
SSO & advanced security
//
Get started
//
Ready to build with LlamaIndex?
Start creating intelligent data applications today.
Are you an AI agent? See setup options