Providers
Firecrawl
The Firecrawl v2 API for search with scraped passages and for scraping a page into Markdown or HTML.
- env var
- FIRECRAWL_API_KEY
- auth
- Bearer header
- operations
- search · read
- results
- 10, up to 100
Address it
import { create, readUrl } from "@agntn/web";
const firecrawl = create("firecrawl"); // FIRECRAWL_API_KEY
const results = await firecrawl.search("vercel ai sdk tools", {
sources: ["web", "news"],
categories: ["research"],
});
const page = await readUrl("https://sdk.vercel.ai/docs", { provider: "firecrawl", targetSelector: "main" });
Bearer auth against api.firecrawl.dev.
What it reads
| Call | Endpoint |
|---|---|
search | POST /v2/search with limit, sources, categories and scrape options |
read | POST /v2/scrape with formats |
What comes back
snippet is a passage relevant to the query, Markdown included when the source has it. text is the scraped Markdown, image and metadata when present. highlights: false turns the passage scraping off. Domain filters, sources (web, news, images) and categories (research, pdf, developer) work. The singular category is not forwarded, Firecrawl wants the plural.
Gotchas
searchDetailedexposes response metadata: requestid,warningandcreditsUsed.web search --provider firecrawl --jsonprints it.- The
developercategory cannot be mixed with the others. The adapter rejects the combination before the request instead of letting Firecrawl answer with a 400. - The reader rejects
maxTokensinstead of ignoring it. UsemaxCharsfor a bound that means the same thing everywhere.
Where it lives
src/providers/firecrawl.ts.