Metadata-Version: 2.4
Name: langchain-firecrawl
Version: 0.1.0
Summary: An integration package connecting Firecrawl and LangChain
Project-URL: Homepage, https://www.firecrawl.dev
Project-URL: Documentation, https://docs.langchain.com/oss/python/integrations/providers/firecrawl
Project-URL: Repository, https://github.com/firecrawl/langchain-firecrawl
Project-URL: Issues, https://github.com/firecrawl/langchain-firecrawl/issues
Project-URL: Changelog, https://github.com/firecrawl/langchain-firecrawl/releases
Project-URL: Twitter, https://x.com/langchain_oss
Project-URL: Slack, https://www.langchain.com/join-community
Project-URL: Reddit, https://www.reddit.com/r/LangChain/
License: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <4.0.0,>=3.10.0
Requires-Dist: firecrawl-py<5.0.0,>=4.3.6
Requires-Dist: langchain-core<2.0.0,>=1.4.0
Description-Content-Type: text/markdown

# langchain-firecrawl

[![PyPI - Version](https://img.shields.io/pypi/v/langchain-firecrawl?label=%20)](https://pypi.org/project/langchain-firecrawl/#history)
[![PyPI - License](https://img.shields.io/pypi/l/langchain-firecrawl)](https://opensource.org/licenses/MIT)

This package contains the LangChain integration with [Firecrawl](https://www.firecrawl.dev),
an API that turns websites into clean, LLM-ready data. It lets you scrape, crawl,
map, extract structured data from, and search the web — as a document loader or
as agent tools.

## Quick Install

```bash
pip install langchain-firecrawl
```

Get an API key from [firecrawl.dev](https://www.firecrawl.dev) and set it as the
`FIRECRAWL_API_KEY` environment variable (or pass `api_key=...`).

```bash
export FIRECRAWL_API_KEY="fc-your-api-key"
```

## Document loader

`FirecrawlLoader` loads web content as LangChain `Document`s. Pick a `mode`:
`scrape` (one page), `crawl` (a whole site), `map` (discover URLs), `extract`
(structured data), or `search` (web search).

```python
from langchain_firecrawl import FirecrawlLoader

loader = FirecrawlLoader(url="https://www.firecrawl.dev", mode="scrape")
docs = loader.load()
print(docs[0].page_content[:200])
print(docs[0].metadata)
```

## Tools

Each Firecrawl capability is also available as a `BaseTool` you can bind to an
agent:

```python
from langchain_firecrawl import (
    FirecrawlScrape,
    FirecrawlCrawl,
    FirecrawlMap,
    FirecrawlExtract,
    FirecrawlSearch,
)

scrape = FirecrawlScrape()
result = scrape.invoke({"url": "https://www.firecrawl.dev"})
print(result["markdown"])

search = FirecrawlSearch()
print(search.invoke({"query": "best web scraping libraries", "limit": 5}))
```

## Documentation

- LangChain provider docs: [docs.langchain.com](https://docs.langchain.com/oss/python/integrations/providers/firecrawl)
- Firecrawl docs: [docs.firecrawl.dev](https://docs.firecrawl.dev)
- Firecrawl homepage: [firecrawl.dev](https://www.firecrawl.dev)
