Skip to main content
Integrate Firecrawl with LlamaIndex to build AI applications with vector search and embeddings powered by web content.

Setup

Create .env file:
Note: If using Node < 20, install dotenv and add import 'dotenv/config' to your code.
This example demonstrates how to use LlamaIndex with Firecrawl to crawl a website, create embeddings, and query the content using RAG.

Python: FireCrawlWebReader

In Python, LlamaIndex’s FireCrawlWebReader loads Firecrawl results as LlamaIndex documents. Set mode to scrape, crawl, map, or search, and pass Firecrawl options in params.
Use load_data(url=...) for scrape, crawl, and map, and load_data(query=...) for search. See the FireCrawlWebReader reference for details. For more examples, check the LlamaIndex documentation.