2 Months Free - Annually

Firecrawl + Mastra

Give Mastra agents the web.
Use Firecrawl Search and Scrape as typed tools, and attach FirecrawlBrowser so agents can log in, click, and fill forms on pages a scrape can't reach.

//
Used by over 1.25M developers
//
Trusted by 150,000+
companies
of all sizes
[ 01 / 04 ]
·
Features
Hosted Browser
FirecrawlBrowser
The @mastra/browser-firecrawl package plugs into an agent's browser field. The agent gets the standard AgentBrowser tools, and the page runs in a Firecrawl session instead of a local Chromium.
// Example code
const result =
await firecrawl.scrape()
Profiles
Logged-in Pages
Save a login once to a named Firecrawl profile and later sessions start signed in. Each Mastra thread gets its own browser session, so users never share a login.
// Example code
const result =
await firecrawl.scrape()
Agent Tools
Search and Scrape Tools
Wrap Firecrawl Search and Scrape with createTool and Zod schemas. Agents find pages, then read them as clean markdown.
// Example code
const result =
await firecrawl.scrape()
Batch Pipelines
Workflows
Chain search, scrape, and summarize steps in a Mastra workflow and get typed JSON back.
// Example code
const result =
await firecrawl.scrape()

Key Features

Official FirecrawlBrowser provider in the Mastra repo
Standard AgentBrowser tools, hosted by Firecrawl
One browser session per Mastra thread
Named profiles that keep agents logged in
Search and Scrape as typed Mastra tools
TypeScript-native, works with any model provider
[ 02 / 04 ]
·
Installation

Give a Mastra agent a browser

FirecrawlBrowser was built by the Firecrawl team and lives in the Mastra repo. Add it to an agent in three steps.

1

Install the package

Add the Mastra browser provider. The agent-browser pin keeps the current release's import working.

Terminal
npm install @mastra/core @mastra/memory @mastra/browser-firecrawl agent-browser@0.19.0
2

Set your API keys

Set FIRECRAWL_API_KEY and the key for your model provider. Get a Firecrawl key from your dashboard.

3

Attach the browser to an agent

Pass a FirecrawlBrowser to the agent's browser field. The agent snapshots the page, then types and clicks by element ref.

src/mastra/agents/portal-agent.ts
import { Agent } from "@mastra/core/agent";
import { Memory } from "@mastra/memory";
import { FirecrawlBrowser } from "@mastra/browser-firecrawl";

export const portalAgent = new Agent({
  id: "portal-agent",
  name: "Portal Agent",
  model: "openai/gpt-5.6-sol",
  browser: new FirecrawlBrowser({ apiKey: process.env.FIRECRAWL_API_KEY }),
  memory: new Memory(),
  defaultOptions: { maxSteps: 40 },
  instructions: "Snapshot the page before each action and use the refs to type and click.",
});
[ 03 / 04 ]
·
What Our Customers Say
//
Community
//

People love
building with Firecrawl

Discover why developers choose Firecrawl every day.
//
FAQ
//

Frequently
asked questions

Everything you need to know about this integration.
General
FirecrawlBrowser is a Mastra browser provider from the @mastra/browser-firecrawl package. It extends Mastra's AgentBrowser, so agents use the same browser tools, but the browser runs in a Firecrawl session. No browser runs on your machine.
Use Scrape when the page is public and the content loads on its own. Use Search when the agent starts from a question instead of a URL. Use FirecrawlBrowser when the content sits behind a login, a form, or a few clicks.
Technical
Pass a Firecrawl profile in the provider's firecrawl options. Log in once with saveChanges set to true and close the browser so the state is saved. Run later sessions with saveChanges set to false. Every session then starts signed in, and the password never reaches the model.
The Firecrawl team built FirecrawlBrowser and contributed it to the Mastra monorepo, where it ships as an official Mastra package. Mastra's docs list it under browser providers.
Why Firecrawl?
The world's most comprehensive web data API. Our custom browser stack and semantic index deliver superior data quality across any website, handling more content types and edge cases than any competitor.
JavaScript rendering, dynamic content, and robust request handling built-in.
Process millions of pages with automatic rate limiting, caching, and distributed infrastructure.
Optimized scraping engine with parallel processing and smart caching for instant results.
Comprehensive docs, SDKs for all major languages, and dedicated support to help you succeed.
[ 04 / 04 ]
·
Pricing

Flexible pricing

Start for free, then scale as you grow.

Free Plan

A lightweight way to get started.
No cost, no card, no hassle.
$0
/month
500 searches or 1,000 pages scraped
2 concurrent requests
Low rate limits

Hobby

Great for side projects and small tools.
Fast, simple, no overkill.
$16
/month
Billed yearly
Save $38
2,500 searches or 5,000 pages scraped
5 concurrent requests
Basic support
$9 per extra 1.5k credits

Standard
Most popular

Perfect for scaling with less effort.
Simple, solid, dependable.
$83
/month
Billed yearly
Save $198
50,000 searches or 100,000 pages scraped
25 concurrent requests
Standard support
$47 per extra 35k credits

Growth

Built for high volume and speed.
Firecrawl at full force.
$333
/month
Billed yearly
Save $798
250,000 searches or 500,000 pages scraped
50 concurrent requests
Priority support
$177 per extra 175k credits

Scale Plans

High-volume plans for teams that need more power and dedicated support. Get access to higher rate limits, more concurrent browsers, and priority support. Scale checks out instantly, no sales call needed.

Need more? Contact us

Also on AWS Marketplace and Google Cloud Marketplace.

Scale

For teams scaling their data pipelines
1,000,000 credits / month
$599/month
Billed yearly
Save $1,798
500,000 searches or 1,000,000 pages scraped
100 concurrent requests
Priority support
$397 per extra 350k credits

Enterprise

Power at your pace with custom solutions
Custom credits
Custom concurrent requests
Dedicated support & SLA
Bulk discounts
Zero-data retention
SSO & advanced security
//
Get started
//
Ready to build with Mastra?
Give your Mastra agents search, scrape, and a hosted browser.
Are you an AI agent? See setup options