Skip to main content
POST
Start an agent task for agentic data extraction
Are you an AI agent that needs a Firecrawl API key? See firecrawl.dev/agent-onboarding/SKILL.md for automated onboarding instructions.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required

The prompt describing what data to extract

Maximum string length: 10000
urls
string<uri>[]

Optional list of URLs to constrain the agent to

schema
object

Optional JSON schema to structure the extracted data

maxCredits
number

Maximum credits to spend on this agent task. Defaults to 2500 if not set. Values above 2,500 are always billed as paid requests.

strictConstrainToURLs
boolean

If true, agent will only visit URLs provided in the urls array

model
enum<string>
default:spark-2

The model to use for the agent task. spark-2 is the default and the model every run executes on. The Spark 1 model names remain accepted for backwards compatibility but are deprecated and route to spark-2.

Available options:
spark-2,
spark-1-mini,
spark-1-pro
effort
enum<string>

Reasoning budget for the agent task. Every run executes on spark-2, so effort can be sent with or without model.

Available options:
low,
medium,
high
webhook
object

A webhook specification object. Subscribes to agent lifecycle events (agent.started, agent.action, agent.completed, agent.failed, agent.cancelled).

auditMetadata
object

User attribution included with SIEM logging events when SIEM Logging is enabled for the organization.

threatProtection
Threat Protection Override · object

Per-request Threat Protection override. Fields you provide replace the corresponding fields of your organization's policy for this request only; omitted fields keep their organization-level values. Requires Threat Protection to be enabled for your team (enterprise feature) — otherwise the request is rejected with a 403. If your organization has disabled request overrides, any request that includes this object is rejected with a 403. If Threat Protection is enforced for your team, mode may not be set to off.

threadId
string<uuid>

Continue an existing thread: pass the threadId an earlier run returned, and this request runs as that thread's next turn. Omitted urls, schema, effort, mode and exchange settings carry over from the previous turn. Omit threadId to start a new thread.

mode
enum<string>
default:extract

extract returns the complete structured result in data every turn. chat lets a follow-up that asks for no new data get a short reply in message instead of a re-run. exchange.requireApproval needs chat on the same request. Omitted on a follow-up turn keeps the thread's mode.

Available options:
extract,
chat
exchange
object

Let the agent call your team's Alexandria data providers during the run. Without this object the run uses the web only (a follow-up turn inherits the previous turn's settings). See Use your connected Alexandria tools.

Response

Agent task started successfully

success
boolean
id
string<uuid>
threadId
string<uuid>

The thread this run belongs to. Pass it as threadId to continue the thread.

threadTurn
integer

This run's turn in the thread, starting at 1.