> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firecrawl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Web サイトのモニター

> スケジュールに沿って Web サイトをクロールし、検出されたすべてのページの変更を検出します

Web サイトモニターは、固定された URL のリストではなく、サイト全体を対象にします。各チェックでは対象の `url` に対してクロールを実行し、検出されたすべてのページをスクレイピングしたうえで、その結果を直近で保持されたスナップショットと照合します。これにより、あらかじめ指定したページへの編集だけでなく、追加・変更・削除されたページも検知できます。ドキュメントサイト、ブログ、更新履歴、ヘルプセンター、競合他社のサイトには最適な選択肢です。

このページでは `crawl` ターゲットを扱います。スケジューリング、ゴールと判定、変更追跡、通知、料金は、すべてのモニタータイプで共通です。[モニターの概要](/ja/features/monitoring) を参照してください。

<div className="firecrawl-cta-box" style={{ background: "transparent" }}>
  <div style={{ display: "flex", alignItems: "center", marginBottom: "12px" }}>
    <Icon icon="sack-dollar" color="#ff4d00" size={22} />
  </div>

  <div className="firecrawl-cta-title">
    <span style={{ color: "#ff4d00" }}>報酬: 5,000 credit</span>
    <span style={{ fontWeight: 400 }}> 有益な /monitor フィードバックに対して</span>
  </div>

  <p className="firecrawl-cta-description">
    対象となるには、Firecrawl Feedback Assistant との内容の濃いインタビュー (よく考えられた具体的なユースケースなど) を完了してください。数分で終わり、いつでも中断でき、さらに人間にもエージェントにも使いやすくなっています (リンクを agentic harness に貼り付けるだけです！) 。
  </p>

  <a href={"https://www.firecrawl.dev/interview?study=20260701-monitor-feedback&src=" + (props.src || "docs-monitor")} className="firecrawl-cta-btn-primary firecrawl-cta-btn-inline">
    インタビューを開始
  </a>
</div>

<div id="create-a-website-monitor">
  ## Web サイトモニターを作成する
</div>

各チェック時にクロールで検出されたすべてのページの差分を取得するには、`crawl` ターゲットを持つモニターを作成します。

<CodeGroup>
  ```python Python theme={null}
  from firecrawl import Firecrawl

  firecrawl = Firecrawl(api_key="fc-YOUR-API-KEY")

  monitor = firecrawl.create_monitor(
      name="Docs monitor",
      schedule={"cron": "7-59/15 * * * *", "timezone": "UTC"},
      goal="Notify me when docs pages add, remove, or materially change API behavior",
      targets=[
          {
              "type": "crawl",
              "url": "https://example.com/docs",
              "crawlOptions": {
                  "limit": 100,
                  "maxDiscoveryDepth": 3,
              },
          }
      ],
      webhook={
          "url": "https://example.com/webhooks/firecrawl",
          "events": ["monitor.page", "monitor.check.completed"],
      },
  )

  print(monitor.id)
  ```

  ```js Node theme={null}
  import Firecrawl from "@mendable/firecrawl-js";

  const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" });

  const monitor = await firecrawl.createMonitor({
    name: "Docs monitor",
    schedule: { cron: "7-59/15 * * * *", timezone: "UTC" },
    webhook: {
      url: "https://example.com/webhooks/firecrawl",
      events: ["monitor.page", "monitor.check.completed"],
    },
    goal: "Notify me when docs pages add, remove, or materially change API behavior",
    targets: [
      {
        type: "crawl",
        url: "https://example.com/docs",
        crawlOptions: {
          limit: 100,
          maxDiscoveryDepth: 3,
        },
      },
    ],
  });

  console.log(monitor.id);
  ```

  ```bash cURL theme={null}
  curl -s -X POST "https://api.firecrawl.dev/v2/monitor" \
    -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Docs monitor",
      "schedule": {
        "cron": "7-59/15 * * * *",
        "timezone": "UTC"
      },
      "webhook": {
        "url": "https://example.com/webhooks/firecrawl",
        "events": ["monitor.page", "monitor.check.completed"]
      },
      "goal": "Notify me when docs pages add, remove, or materially change API behavior",
      "targets": [
        {
          "type": "crawl",
          "url": "https://example.com/docs",
          "crawlOptions": {
            "limit": 100,
            "maxDiscoveryDepth": 3
          }
        }
      ]
    }'
  ```
</CodeGroup>

<div id="crawl-target">
  ## クロールターゲット
</div>

`crawl` ターゲットでは、`type` と 1 つの `url` が必要です。クロールの挙動は `crawlOptions`、検出された各ページをどのようにスクレイピングするかは `scrapeOptions` で指定します。

```json Crawl target theme={null}
{
  "type": "crawl",
  "url": "https://example.com/docs",
  "crawlOptions": {
    "limit": 100,
    "includePaths": ["/docs"]
  },
  "scrapeOptions": {
    "formats": ["markdown"]
  }
}
```

一般的な `crawlOptions` フィールド:

* `limit`: 1 回のチェックでクロールするページの最大数。
* `maxDiscoveryDepth`: 開始 `url` から何リンク先までページを検出するか。
* `maxDepth`: クロールの最大深度。
* `includePaths`: これらのパスパターンに一致する URL のみをモニターします (例: `/docs`) 。
* `excludePaths`: これらのパスパターンに一致する URL はスキップします。

ページ モニターと同様に、モニターによってトリガーされるスクレイピングでは `maxAge` のデフォルト値が `0` になるため、`scrapeOptions` で別の `maxAge` を設定しない限り、各チェックで検出されたページは毎回新たにスクレイピングされます。

<div id="what-each-check-reports">
  ## 各チェックで報告される内容
</div>

クロールチェックでは、検出されたすべてのページを前回のチェック結果と照合し、ページごとのステータスを記録します。

* `same`: ページが再度検出され、変更はありませんでした。
* `changed`: ページが再度検出され、変更がありました。
* `new`: ページが初めて検出されました。
* `removed`: 前回のチェックで検出されたページが、今回は検出されませんでした。
* `error`: ページをチェックできませんでした。

クロールされたページ全体の特定の構造化フィールドに対してアラートを出すには、`scrapeOptions` に `changeTracking` フォーマットを追加してください。[変更追跡](/ja/features/monitoring#change-tracking) を参照してください。

<div id="shared-configuration">
  ## 共通の構成
</div>

* [スケジュール](/ja/features/monitoring#schedules): cron または自然言語で設定する実行間隔。最短 5 分です。
* [ゴールと判定](/ja/features/monitoring#goals-and-judging): 意味のある変更があった場合にのみ通知します。
* [通知](/ja/features/monitoring#notifications): webhook とメールで配信します。
* [チェック結果](/ja/features/monitoring#check-results): 各チェックとページごとの差分を確認できます。
* [料金](/ja/features/monitoring#pricing): チェックごとに、検出された各ページにつき 1 クレジットを消費し、これに加えて任意の判定分が発生します。
