Class | Package | Local | Serializable | PY support |
---|---|---|---|---|
FireCrawlLoader | @langchain/community | 🟠 (see details below) | beta | ✅ |
Source | Web Loader | Node Envs Only |
---|---|---|
FireCrawlLoader | ✅ | ❌ |
FireCrawlLoader
in LangChain.
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.
FIRECRAWL_API_KEY
environment variable:
@langchain/community
package:
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:
params
you can pass any of the params according to the Firecrawl documentation.