> ## Documentation Index
> Fetch the complete documentation index at: https://student-213fb9fc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Vue d’ensemble

> Notifications en temps réel pour vos opérations Firecrawl

Les webhooks vous permettent de recevoir des notifications en temps réel au fur et à mesure de l’exécution de vos opérations, au lieu d’interroger périodiquement leur statut.

<div id="supported-operations">
  ## Opérations prises en charge
</div>

| Opération    | Événements                                              |
| ------------ | ------------------------------------------------------- |
| Crawl        | `started`, `page`, `completed`                          |
| Batch Scrape | `started`, `page`, `completed`                          |
| Extract      | `started`, `completed`, `failed`                        |
| Agent        | `started`, `action`, `completed`, `failed`, `cancelled` |

<div id="configuration">
  ## Configuration
</div>

Ajoutez un objet `webhook` à votre requête :

```json JSON theme={null}
{
  "webhook": {
    "url": "https://your-domain.com/webhook",
    "metadata": {
      "any_key": "any_value"
    },
    "events": ["start", "page", "completed", "failed"]
  }
}
```

| Champ      | Type   | Requis | Description                                                               |
| ---------- | ------ | ------ | ------------------------------------------------------------------------- |
| `url`      | string | Oui    | L’URL de votre endpoint (HTTPS)                                           |
| `headers`  | object | Non    | En-têtes personnalisés à inclure dans les requêtes du webhook             |
| `metadata` | object | Non    | Données personnalisées incluses dans toutes les charges utiles du webhook |
| `events`   | array  | Non    | Types d’événements à recevoir (par défaut : tous les événements)          |

<div id="usage">
  ## Utilisation
</div>

<div id="crawl-with-webhook">
  ### Exploration avec webhook
</div>

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/crawl \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -d '{
      "url": "https://docs.firecrawl.dev",
      "limit": 100,
      "webhook": {
        "url": "https://your-domain.com/webhook",
        "metadata": {
          "any_key": "any_value"
        },
        "events": ["started", "page", "completed"]
      }
    }'
```

<div id="batch-scrape-with-webhook">
  ### Scrape par lots avec webhook
</div>

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/batch/scrape \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -d '{
      "urls": [
        "https://example.com/page1",
        "https://example.com/page2",
        "https://example.com/page3"
      ],
      "webhook": {
        "url": "https://your-domain.com/webhook",
        "metadata": {
          "any_key": "any_value"
        },
        "events": ["started", "page", "completed"]
      }
    }'
```

<div id="timeouts-retries">
  ## Expirations & Réessais
</div>

Votre endpoint doit répondre avec un statut `2xx` en **10 secondes** maximum.

Si la livraison échoue (expiration, statut non-2xx ou erreur réseau), Firecrawl réessaie automatiquement :

| Réessai | Délai après l'échec |
| ------- | ------------------- |
| 1er     | 1 minute            |
| 2e      | 5 minutes           |
| 3e      | 15 minutes          |

Après 3 réessais infructueux, le webhook est marqué comme échoué et aucune autre tentative n'est effectuée.
