Commit Graph
1 Commits
Author SHA1 Message Date
Juampi 0ba8b6f0a8 docs: add Firecrawl integration page (#4706)
I work at Firecrawl. This adds a Firecrawl page to Integrations > Data
Platforms & Frameworks: a Python recipe that crawls a site with
Firecrawl, stores the pages as Markdown chunks with their source URL in
a LanceDB table that embeds them through the embedding registry,
searches the table, and then adds web search results to the same table.

It follows the docs workflow in CONTRIBUTING.md:

- The example is a test, `docs/web-tests/py/test_firecrawl.py`, split
into five `--8<--` snippets. Like the other integration snippets that
need a provider key, it skips unless `FIRECRAWL_API_KEY` is set.
- `docs/web/snippets/firecrawl.mdx` is generated from it with `uv run
docs/web-tests/mdx_snippets_gen.py -s docs/web-tests/py -s
docs/web-tests/ts -s docs/web-tests/rs -o docs/web/snippets`. The
generator also rewrites other snippet files on current `main` without
this change, so I left those out.
- `docs/web/integrations/data/firecrawl.mdx` imports the snippets with
`<CodeBlock>` like the dlt page, and every heading has an explicit
`{#anchor}`.
- `docs/web/docs.json` adds the page at the end of the Data Platforms &
Frameworks group.

The embedding function is `sentence-transformers` with
`all-MiniLM-L6-v2`, so the recipe needs no API key besides Firecrawl's.
Each Firecrawl call passes `integration="_lancedb"`, a label that tells
Firecrawl a request came from this guide; the page says it is optional.
It needs `firecrawl-py` 4.3.3 or later.

## Testing

```
$ FIRECRAWL_API_KEY=... pytest docs/web-tests/py/test_firecrawl.py -v
test_firecrawl.py::test_firecrawl_crawl_and_search PASSED     (lancedb 0.40.0, Python 3.12)
$ pytest docs/web-tests/py/test_firecrawl.py -rs              (no key)
SKIPPED [1] Set FIRECRAWL_API_KEY to run this integration snippet
$ ruff format --check docs/web-tests/py/test_firecrawl.py && ruff check docs/web-tests/py/test_firecrawl.py
1 file already formatted
All checks passed!
```

Regenerating the snippets from the test produces the same
`docs/web/snippets/firecrawl.mdx`. I have not run the Mintlify site
checks (`mint validate`, broken-links), so please run them in CI or on
your side.

I drafted this with an AI coding assistant and ran the test above
myself.
2026-11-30 21:13:16 +08:00