Skip to main content
POST
/
agent
Start an agent task for agentic data extraction
curl --request POST \
  --url https://api.firecrawl.dev/v2/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "urls": [
    "<string>"
  ],
  "schema": {},
  "maxCredits": 123,
  "strictConstrainToURLs": true
}
'
{
  "success": true,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

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

strictConstrainToURLs
boolean

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

Response

Agent task started successfully

success
boolean
id
string<uuid>