Passer au contenu principal
POST
/
agent
Démarrer une tâche d’agent pour l’extraction de données pilotée par un agent
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"
}

Autorisations

Authorization
string
header
requis

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

Corps

application/json
prompt
string
requis

Le prompt décrivant les données à extraire

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

Liste facultative d’URL servant à limiter l’agent

schema
object

Schéma JSON facultatif pour structurer les données extraites

maxCredits
number

Nombre maximal de crédits à utiliser pour la tâche de cet agent

strictConstrainToURLs
boolean

Si la valeur est true, l’agent ne visitera que les URL fournies dans le tableau urls

Réponse

La tâche de l’agent a démarré avec succès

success
boolean
id
string<uuid>