> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-docs-remove-capabilities-from-sidebar.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 概要

> Firecrawl のオペレーションに対するリアルタイム通知

クロール、バッチスクレイプ、抽出、エージェントジョブ、またはモニターチェックが開始、進行、完了した瞬間に通知を受け取れます。ステータスをポーリングする代わりに、HTTPS エンドポイントを指定すると、Firecrawl がそこにイベントをリアルタイムで配信します。

<div id="supported-operations">
  ## サポートされているオペレーション
</div>

| Operation | イベント |
| - | - |
| Crawl | `started`, `page`, `completed` |
| Batch Scrape | `started`, `page`, `completed` |
| Extract | `started`, `completed`, `failed` |
| Agent | `started`, `action`, `completed`, `failed`, `cancelled` |
| Monitor | `check.completed` |

完全なペイロードの詳細と例については、[Event Types](/ja/webhooks/events)を参照してください。

<div id="configuration">
  ## 設定
</div>

リクエストに `webhook` オブジェクトを追加します:

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

| フィールド | 型 | 必須 | 説明 |
| - | - | - | - |
| `url` | string | Yes | Webhook エンドポイントの URL (HTTPS) |
| `headers` | object | No | Webhook リクエストに含めるカスタムヘッダー |
| `metadata` | object | No | ペイロードに含めるカスタムデータ |
| `events` | array | No | 受信するイベントタイプ (既定: すべて) |

<div id="usage">
  ## 使い方
</div>

<div id="crawl-with-webhook">
  ### 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">
  ### 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">
  ## タイムアウトとリトライ
</div>

エンドポイントは **10秒以内** に `2xx` ステータスで応答する必要があります。

配信に失敗した場合 (タイムアウト、非2xx、またはネットワークエラー) 、Firecrawl は自動的にリトライします:

| リトライ回数 | 失敗後の遅延時間 |
| - | - |
| 1回目 | 1分 |
| 2回目 | 5分 |
| 3回目 | 15分 |

3回のリトライがすべて失敗すると、Webhook は失敗としてマークされ、それ以上のリトライは行われません。
