> ## 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.

# Visão geral

> Notificações em tempo real para suas operações no Firecrawl

Webhooks permitem que você receba notificações em tempo real conforme suas operações progridem, em vez de consultar o status periodicamente.

<div id="supported-operations">
  ## Operações compatíveis
</div>

| Operação     | Eventos                                                 |
| ------------ | ------------------------------------------------------- |
| Crawl        | `started`, `page`, `completed`                          |
| Batch Scrape | `started`, `page`, `completed`                          |
| Extract      | `started`, `completed`, `failed`                        |
| Agent        | `started`, `action`, `completed`, `failed`, `cancelled` |

<div id="configuration">
  ## Configuração
</div>

Adicione um objeto `webhook` à sua requisição:

```json JSON theme={null}
{
  "webhook": {
    "url": "https://your-domain.com/webhook",
    "metadata": {
      "any_key": "any_value"
    },
    "events": ["iniciado", "página", "concluído", "fracassou"]
  }
}
```

| Campo      | Tipo   | Obrigatório | Descrição                                                         |
| ---------- | ------ | ----------- | ----------------------------------------------------------------- |
| `url`      | string | Sim         | URL do endpoint do seu webhook (HTTPS)                            |
| `headers`  | object | Não         | Cabeçalhos personalizados para incluir nas requisições do webhook |
| `metadata` | object | Não         | Dados personalizados incluídos nas cargas do webhook              |
| `events`   | array  | Não         | Tipos de evento a receber (padrão: todos)                         |

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

<div id="crawl-with-webhook">
  ### Rastreamento com 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": ["iniciado", "página", "concluído"]
      }
    }'
```

<div id="batch-scrape-with-webhook">
  ### Raspagem em lote com 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">
  ## Timeouts e tentativas
</div>

Seu endpoint deve responder com um status `2xx` em até **10 segundos**.

Se a entrega falhar (timeout, status não `2xx` ou erro de rede), o Firecrawl fará novas tentativas automaticamente:

| Tentativa | Atraso após falha |
| --------- | ----------------- |
| 1ª        | 1 minuto          |
| 2ª        | 5 minutos         |
| 3ª        | 15 minutos        |

Após 3 tentativas sem sucesso, o webhook é marcado como falho e nenhuma nova tentativa é feita.
