Introducing
Interact
Scrape a page, then take actions on it. Describe what you want in natural language — or write code for full control.
Scrape, then interact
Get clean data from any URL. The response includes a scrapeId you'll use to interact.
firecrawl scrape https://example.comDescribe what you want in natural language. Click buttons, fill forms, extract data.
firecrawl interact -p "Click the login button"Each call reuses the session. State carries over so you can perform multiple actions in 1 session.
firecrawl interact -p "Fill email with test@example.com"
firecrawl interact -p "Submit the form"Why interact?
Just describe what you want in natural language. Click buttons, fill forms, navigate pages — no selectors or Playwright code needed.
Need precision? Write Playwright code in Node.js, Python, or Bash. The page object is ready — execute anything the browser can do.
Save browser state across sessions with profiles. Stay logged in, preserve cookies, and pick up where you left off.
Each interact call reuses the same session. Chain prompts to complete multi-step workflows — state carries over automatically.
The Interact Toolkit in your terminal
$ firecrawl scrape https://example.com { "title": "Example", "markdown": "# Hello\n...", "metadata": { "scrapeId": "<string>", "statusCode": 200, "sourceURL": "https://example.com" } }
$ firecrawl interact -p "Click the sign up button" { "success": true, "output": "I clicked the sign up button...", "liveViewUrl": "..." }
$ firecrawl interact --stop Session stopped. Duration: 45.2s Credits billed: 2
Works with every agent framework
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createMCPClient } from "ai";
const client = await createMCPClient({
transport: { type: "sse",
url: "https://mcp.firecrawl.dev/sse" },
});
const { text } = await generateText({
model: openai("gpt-4o"),
tools: await client.tools(),
prompt: "Scrape example.com and click the "
+ "login button on the page",
});from agents import Agent, Runner
from agents.mcp import MCPServerSse
firecrawl = MCPServerSse(
url="https://mcp.firecrawl.dev/sse",
headers={
"Authorization": "Bearer fc-YOUR-API-KEY"
},
)
agent = Agent(
name="Interact Agent",
instructions="Scrape pages and interact "
"with them for the user.",
mcp_servers=[firecrawl],
)
result = await Runner.run(
agent, "Scrape example.com, click the "
"pricing tab and extract the plans"
)import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
tools=[{
"type": "mcp",
"server_url":
"https://mcp.firecrawl.dev/sse",
"server_label": "firecrawl",
}],
messages=[{
"role": "user",
"content": "Scrape example.com and "
"fill the contact form with "
"test data, then submit it"
}],
)from langchain_mcp_adapters.client \
import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
client = MultiServerMCPClient({
"firecrawl": {
"url": "https://mcp.firecrawl.dev/sse",
"transport": "sse",
}
})
tools = await client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"), tools
)
result = await agent.ainvoke({
"messages": "Scrape news.ycombinator.com "
"and extract the top 5 story titles"
})Go beyond static scraping
Scrape product pages and interact to add items to cart, check prices after login, or track inventory changes.
$ firecrawl interact -p "Add the first item to cart and check the total price"Fill out multi-step forms, submit applications, or complete signup flows with natural language.
$ firecrawl interact -p "Fill the registration form with test data and submit"Navigate paginated results, expand dropdowns, and click through tabs to extract data scraping alone can't reach.
$ firecrawl interact -p "Click next page and extract all product listings"Log in with credentials, navigate auth-gated dashboards, and extract protected content.
$ firecrawl interact -p "Log in and download the monthly report"Verify UI flows, check form validations, and test multi-step user journeys across pages.
$ firecrawl interact -p "Submit the form with invalid email and check the error message"Chain prompts to complete complex flows — search, filter, select, checkout — all in one session.
$ firecrawl interact -p "Search for laptops, filter by price under $1000, and extract the top 5 results"Scrape, prompt, done
Describe what you want in natural language, or write Playwright code for full control. Both use the same session.
Each interact call reuses the session. Chain prompts to complete multi-step flows — state carries over between calls.
Every response includes a live view URL. Watch the browser in real time or embed the interactive view in your own UI.
import Firecrawl from '@mendable/firecrawl-js'; const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" }); // Scrape the page const scrape = await firecrawl.scrapeUrl("https://news.ycombinator.com"); const scrapeId = scrape.metadata.scrapeId; // Interact with a prompt const result = await firecrawl.interact(scrapeId, { prompt: "Extract the top 5 story titles", }); console.log(result.output); // Or run Playwright code const result2 = await firecrawl.interact(scrapeId, { code: "return await page.title()", language: "node", }); console.log(result2.result); // Stop when done await firecrawl.interactStop(scrapeId);
from firecrawl import FirecrawlApp app = FirecrawlApp(api_key ="fc-YOUR-API-KEY") # Scrape the page scrape = app.scrape_url("https://news.ycombinator.com") scrape_id = scrape["metadata"]["scrapeId"] # Interact with a prompt result = app.interact(scrape_id, prompt ="Extract the top 5 story titles" ) print(result["output"]) # Or run Playwright code result = app.interact(scrape_id, code ="return await page.title()", language ="node", ) print(result["result"]) # Stop when done app.interact_stop(scrape_id)
# Scrape the page firecrawl scrape https://news.ycombinator.com # Interact with prompts firecrawl interact -p "Extract the top 5 story titles" firecrawl interact -p "Click the first story link" firecrawl interact -p "Summarize this page" # Or run code firecrawl interact -c "return await page.title()" # Stop when done firecrawl interact --stop
# 1. Scrape the page curl -X POST "https://api.firecrawl.dev/v2/scrape" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://news.ycombinator.com"}' # 2. Interact with a prompt curl -X POST "https://api.firecrawl.dev/v2/scrape/SCRAPE_ID/interact" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "Extract the top 5 story titles"}' # 3. Stop curl -X DELETE "https://api.firecrawl.dev/v2/scrape/SCRAPE_ID/interact" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY"
// Output (prompt) > Interacting with scraped page... Here are the top 5 stories on Hacker News: 1. Mass Recall of Tesla Cybertrucks 2. Show HN: I built a real-time flight tracker 3. The Art of PostgreSQL 4. Why SQLite Is So Great for the Edge 5. Ask HN: What are you working on? ✓ Prompt executed successfully
Frequently asked questions
data from the web