Skip to main content
This notebook provides a quick overview for getting started with FireCrawlLoader. For detailed documentation of all FireCrawlLoader features and configurations head to the API reference.

Overview

Integration details

Loader features

FireCrawl crawls and convert any website into LLM-ready data. It crawls all accessible sub-pages and give you clean markdown and metadata for each. No sitemap required. FireCrawl handles complex tasks such as reverse proxies, caching, rate limits, and content blocked by JavaScript. Built by the mendable.ai team. This guide shows how to scrap and crawl entire websites and load them using the FireCrawlLoader in LangChain.

Setup

To access FireCrawlLoader document loader you’ll need to install the @langchain/community integration, and the @mendable/firecrawl-js@0.0.36 package. Then create a FireCrawl account and get an API key.

Credentials

Sign up and get your free FireCrawl API key to start. FireCrawl offers 300 free credits to get you started, and it’s open-source in case you want to self-host. Once you’ve done this set the FIRECRAWL_API_KEY environment variable:
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:

Installation

The LangChain FireCrawlLoader integration lives in the @langchain/community package:

Instantiation

Here’s an example of how to use the FireCrawlLoader to load web search results: Firecrawl offers 3 modes: scrape, crawl, and map. In scrape mode, Firecrawl will only scrape the page you provide. In crawl mode, Firecrawl will crawl the entire website. In map mode, Firecrawl will return semantic links related to the website. The formats (scrapeOptions.formats for crawl mode) parameter allows selection from "markdown", "html", or "rawHtml". However, the Loaded Document will return content in only one format, prioritizing as follows: markdown, then html, and finally rawHtml. Now we can instantiate our model object and load documents:

Load

Additional parameters

For params you can pass any of the params according to the Firecrawl documentation.

API reference

For detailed documentation of all FireCrawlLoader features and configurations head to the API reference.