Providers
Firecrawl
The Firecrawl v2 API for search with scraped passages and for scraping a page into Markdown or HTML.
Provider
Firecrawl
- create("firecrawl")
- FIRECRAWL_API_KEY
- Auth
- Bearer header
- Results
- 10, up to 100 · one page
- Free tier
- credit based
Options
- Filters
includeDomains, excludeDomains, sources, categories - Fields
publishedDate, image, text, metadata - Read
markdown, html · format, targetSelector, removeSelector, timeout, noCache
Address it
import { create, readUrl } from "@agntn/web";
const firecrawl = await 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. Sometimes that passage is the whole page, almost 80,000 characters of Node.js release notes, so it stops at 500 characters with …. 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. - A read comes back with the URL Firecrawl landed on after redirects. Its
metadatais only about the fetch:originalUrl,statusCode,error,contentType,language,cachedAt,creditsUsedandwarning. The page's meta tags are left out, because they ran to dozens of keys (71 on a GitHub repo page) that mostly repeat the title and description. - An explicit read rejects
maxTokensinstead of ignoring it. An automatic read that lands here leaves it out and says so inignoredOptions. UsemaxCharsfor a bound that means the same thing everywhere.
Where it lives
src/providers/firecrawl.ts.