Firecrawl tools for the Vercel AI SDK. Search, scrape, interact with pages, and crawl the web in your AI applications.
Install#
Set environment variables:
These examples use the Vercel AI Gateway string model format, but Firecrawl tools work with any AI SDK provider. You can also use provider imports like anthropic('claude-sonnet-4-5-20250514') from @ai-sdk/anthropic.
Quick Start#
FirecrawlTools() bundles search, scrape, and interact by default.
FirecrawlTools#
FirecrawlTools() gives you the default tools plus an auto-generated systemPrompt you can pass to generateText.
You can customize defaults, opt into async tools, or disable individual tools:
When scraping to answer a question about a page, use the question format:
Use formats: ['markdown'] only when you need the full page content.
Individual Tools#
Every tool can be used directly or called with options:
Search + Scrape#
Map#
Stream#
Interact#
interact() creates a scrape-backed interactive session. Call start(url) to bootstrap a session and get a live view URL, then let the model reuse that session through the interact tool.
If you need the explicit live view URL after startup, use interactTool.interactiveLiveViewUrl.
Reuse browser state across sessions with profiles:
browser() is deprecated. Prefer interact().
Async Tools#
Crawl, batch scrape, and agent return a job ID. Pair them with poll.
Crawl#
Batch Scrape#
Agent#
Autonomous web data gathering that searches, navigates, and extracts on its own.

