Overview
Integration details
Class | Package | Local | Serializable | PY support |
---|---|---|---|---|
FireCrawlLoader | @langchain/community | 🟠 (see details below) | beta | ✅ |
Loader features
Source | Web Loader | Node Envs Only |
---|---|---|
FireCrawlLoader | ✅ | ❌ |
FireCrawlLoader
in LangChain.
Setup
To accessFireCrawlLoader
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 theFIRECRAWL_API_KEY
environment variable:
Installation
The LangChain FireCrawlLoader integration lives in the@langchain/community
package:
Instantiation
Here’s an example of how to use theFireCrawlLoader
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
Forparams
you can pass any of the params according to the Firecrawl documentation.