Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api-reference/v2-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,10 @@
"type": "number",
"description": "Maximum credits to spend on this agent task"
},
"zeroDataRetention": {
"type": "boolean",
"description": "If true, request metadata is redacted and outputs are removed after the retention window"
},
"strictConstrainToURLs": {
"type": "boolean",
"description": "If true, agent will only visit URLs provided in the urls array"
Expand Down
31 changes: 31 additions & 0 deletions features/agent.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Agent"
description: "Gather data wherever it lives on the web."
og:title: "Agent | Firecrawl"

Check warning on line 4 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L4

Did you really mean 'Firecrawl'?
og:description: "Gather data wherever it lives on the web. Describe what you want, /agent handles the rest."
sidebarTitle: "Agent"
---
Expand Down Expand Up @@ -45,7 +45,7 @@

## Using `/agent`

The only required parameter is `prompt`. Simply describe what data you want to extract. For structured output, provide a JSON schema. The SDKs support Pydantic (Python) and Zod (Node) for type-safe schema definitions:

Check warning on line 48 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L48

Did you really mean 'SDKs'?

Check warning on line 48 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L48

Did you really mean 'Pydantic'?

Check warning on line 48 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L48

Did you really mean 'Zod'?

<CodeGroup>

Expand Down Expand Up @@ -108,7 +108,7 @@

## Model Selection

Firecrawl Agent offers two models. **Spark 1 Mini is 60% cheaper** and is the default — perfect for most use cases. Upgrade to Spark 1 Pro when you need maximum accuracy on complex tasks.

Check warning on line 111 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L111

Did you really mean 'Firecrawl'?

| Model | Cost | Accuracy | Best For |
|-------|------|----------|----------|
Expand Down Expand Up @@ -159,6 +159,37 @@
| `model` | string | No | Model to use: `spark-1-mini` (default) or `spark-1-pro` |
| `urls` | array | No | Optional list of URLs to focus the extraction |
| `schema` | object | No | Optional JSON schema for structured output |
| `zeroDataRetention` | boolean | No | Redact request metadata and schedule output cleanup after the retention window |

## Zero Data Retention

When `zeroDataRetention` is enabled, agent runs without storing activity logs or step traces. We keep the final output in GCS for up to 24 hours so status polling can succeed, then delete it when the ZDR cleanup job runs (after cleanup, `GET /v2/agent/:id` returns 404). ClickHouse activity and snapshot events are removed at completion.

<CodeGroup>

```python
from firecrawl import FirecrawlApp

app = FirecrawlApp(api_key="fc-YOUR_API_KEY")

result = app.agent(
prompt="Extract the main features and benefits of Firecrawl",
zero_data_retention=True,
)
```

```ts
import Firecrawl from "@mendable/firecrawl-js";

const firecrawl = new Firecrawl({ apiKey: "fc-YOUR_API_KEY" });

const result = await firecrawl.agent({
prompt: "Extract the main features and benefits of Firecrawl",
zeroDataRetention: true,
});
```

</CodeGroup>

## Agent vs Extract: What's Improved

Expand All @@ -185,7 +216,7 @@

## Pricing

Firecrawl Agent uses **dynamic billing** that scales with the complexity of your data extraction request. You pay based on the actual work Agent performs, ensuring fair pricing whether you're extracting simple data points or complex structured information from multiple sources.

Check warning on line 219 in features/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (firecrawl) - vale-spellcheck

features/agent.mdx#L219

Did you really mean 'Firecrawl'?

### How Agent pricing works

Expand Down
Loading