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

# 検索

> ウェブを検索し、結果から完全なコンテンツを取得

ウェブを検索し、1回のAPI呼び出しで各結果から整形された構造化コンテンツを取得できます。`/search` にクエリを渡すと、Firecrawl がタイトル、説明、URLを返します。`scrapeOptions` を追加すると、各結果についてページ全体のmarkdown、HTML、links、screenshotsも取得できます。

完全なパラメータ一覧は、[Search Endpoint API Reference](https://docs.firecrawl.dev/api-reference/endpoint/search)を参照してください。

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

    <div className="firecrawl-cta-title" style={{ margin: 0 }}>
      <span style={{ color: "#ff4d00" }}>報奨金：5,000クレジット</span>
      <span style={{ fontWeight: 400 }}>/search に関する質の高いフィードバック向け (GitHub) </span>
    </div>
  </div>

  <p className="firecrawl-cta-description">
    対象となるには、Firecrawl Feedback Assistant との高品質なインタビュー (よく練られた具体的なユースケースなど) を完了してください。所要時間は数分で、いつでも停止でき、人間にも agent にも使いやすくなっています (リンクを agentic harness に貼り付けるだけです！) 。
  </p>

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

  <p className="firecrawl-cta-description" style={{ fontSize: "12px", fontStyle: "italic", margin: "12px 0 0 0" }}>
    対象となるにはメールアドレスを含めてください。インタビューは毎週末に品質確認のうえ審査されます。
  </p>
</div>

<Card title="Playground で試す" icon="play" href="https://www.firecrawl.dev/playground?endpoint=search">
  インタラクティブな Playground で検索を試してみましょう。コードは不要です。
</Card>

<div id="performing-a-search-with-firecrawl">
  ## Firecrawl で検索を行う
</div>

<div id="search-endpoint">
  ### /search エンドポイント
</div>

ウェブ検索を実行し、必要に応じて結果からコンテンツを取得します。

<div id="installation">
  ### インストール
</div>

<CodeGroup>
  ```python Python theme={null}
  # pip install firecrawl-py

  from firecrawl import Firecrawl

  firecrawl = Firecrawl(
    # 開始にAPIキーは不要です — より高いrate limitsが必要な場合は追加してください:
    # api_key="fc-YOUR-API-KEY",
  )
  ```

  ```js Node theme={null}
  // npm install firecrawl

  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({
    // 開始にAPIキーは不要です — より高いrate limitsのために追加してください:
    // apiKey: "fc-YOUR-API-KEY",
  });
  ```

  ```bash CLI theme={null}
  # npmでグローバルにインストール
  npm install -g firecrawl

  # 認証（初回セットアップ）
  firecrawl login
  ```
</CodeGroup>

<div id="basic-usage">
  ### 基本的な使い方
</div>

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

  firecrawl = Firecrawl(
    # 開始にAPIキーは不要です。より高いrate limitsを得るには追加してください：
    # api_key="fc-YOUR-API-KEY",
  )

  results = firecrawl.search(
      query="firecrawl",
      limit=3,
  )
  print(results)
  ```

  ```js Node theme={null}
  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({
    // 開始にAPIキーは不要です — レート制限を引き上げるには追加してください:
    // apiKey: "fc-YOUR-API-KEY",
  });

  const results = await firecrawl.search('firecrawl', {
    limit: 3,
    scrapeOptions: { formats: ['markdown'] }
  });
  console.log(results);
  ```

  ```bash cURL theme={null}
  # 開始するためにAPI keyは不要です — より高いrate limitsを利用するには -H "Authorization: Bearer $FIRECRAWL_API_KEY" を追加してください:
  curl -s -X POST "https://api.firecrawl.dev/v2/search" \
    -H "Content-Type: application/json" \
    -d '{
      "query": "firecrawl",
      "limit": 3
    }'
  ```

  ```bash CLI theme={null}
  # ウェブを検索
  firecrawl search "firecrawl web scraping" --limit 5 --pretty
  ```
</CodeGroup>

<div id="response">
  ### レスポンス
</div>

SDKs は data オブジェクトを直接返します。cURL は完全なペイロードを返します。

```json JSON theme={null}
{
  "success": true,
  "data": {
    "web": [
      {
        "url": "https://www.firecrawl.dev/",
        "title": "Firecrawl - AI向けWebデータAPI",
        "description": "AI向けのウェブクローリング、スクレイピング、検索API。大規模運用に対応。Firecrawlはインターネット全体をAIエージェントやビルダーに提供します。",
        "position": 1
      },
      {
        "url": "https://github.com/firecrawl/firecrawl",
        "title": "mendableai/firecrawl: Turn entire websites into LLM-ready ... - GitHub",
        "description": "Firecrawl is an API service that takes a URL, crawls it, and converts it into clean markdown or structured data.",
        "position": 2
      },
      ...
    ],
    "images": [
      {
        "title": "Quickstart | Firecrawl",
        "imageUrl": "https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/logo/logo.png",
        "imageWidth": 5814,
        "imageHeight": 1200,
        "url": "https://docs.firecrawl.dev/",
        "position": 1
      },
      ...
    ],
    "news": [
      {
        "title": "Y Combinator startup Firecrawl is ready to pay $1M to hire three AI agents as employees",
        "url": "https://techcrunch.com/2025/05/17/y-combinator-startup-firecrawl-is-ready-to-pay-1m-to-hire-three-ai-agents-as-employees/",
        "snippet": "It's now placed three new ads on YC's job board for “AI agents only” and has set aside a $1 million budget total to make it happen.",
        "date": "3 months ago",
        "position": 1
      },
      ...
    ]
  }
}
```

<Note>
  **SDKユーザー:** 検索結果は汎用的な `.data` 配列の下ではなく、ソースタイプごとにグループ化されています。web の結果には `result.web`、news には `result.news`、images には `result.images` でアクセスします。

  ```python Python theme={null}
  result = firecrawl.search("query")
  for item in result.web or []:
      print(item.url, item.title)
  ```

  ```js JavaScript theme={null}
  const result = await firecrawl.search("query");
  for (const item of result.web ?? []) {
    console.log(item.url, item.title);
  }
  ```
</Note>

<div id="search-result-types">
  ## 検索結果の種類
</div>

通常のウェブ結果に加え、Search は `sources` パラメータで以下の特化タイプを指定できます:

* `web`: 標準的なウェブ結果 (デフォルト)
* `news`: ニュース特化の結果
* `images`: 画像検索の結果

1 回の呼び出しで複数のソースを指定できます (例: `sources: ["web", "news"]`) 。この場合、`limit` パラメータは**ソースタイプごと**に適用されます。そのため、`limit: 5` かつ `sources: ["web", "news"]` の場合、最大 5 件の web 結果と最大 5 件の news 結果 (合計 10 件) が返されます。ソースごとに異なるパラメータ (たとえば、異なる `limit` 値や異なる `scrapeOptions`) が必要な場合は、別々の呼び出しを行ってください。

<div id="search-categories">
  ## 検索カテゴリ
</div>

`categories` パラメータを使って、特定のカテゴリで検索結果を絞り込みます:

* `github`: GitHub のリポジトリ、コード、Issue、ドキュメントを検索
* `research`: 学術・研究サイト (arXiv、Nature、IEEE、PubMed など) を検索
* `pdf`: PDF を検索

<div id="github-category-search">
  ### GitHubカテゴリ検索
</div>

GitHub のリポジトリ内を対象に絞り込んで検索します：

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "web scraping python",
    "categories": ["github"],
    "limit": 10
  }'
```

<div id="research-category-search">
  ### 研究カテゴリー検索
</div>

学術・研究系のウェブサイトを検索します:

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "機械学習 トランスフォーマー",
    "categories": ["研究"],
    "limit": 10
  }'
```

<div id="mixed-category-search">
  ### 複合カテゴリ検索
</div>

1回の検索で複数のカテゴリを組み合わせる：

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "ニューラルネットワーク",
    "categories": ["github", "research"],
    "limit": 15
  }'
```

<div id="domain-filters">
  ## ドメインフィルター
</div>

`includeDomains` を使用すると、検索結果を特定のドメインに限定できます。`excludeDomains` を使用すると、検索対象から特定のドメインを除外できます。これらのフィールドは内部的にクエリへ `site:` および `-site:` 演算子を追加するため、プロトコルやパスは含めず、ドメインだけを指定してください。

<Note>
  `includeDomains` と `excludeDomains` は同時に使用できません。1 回のリクエストでは、どちらか一方のみを使用してください。
</Note>

<div id="include-domains">
  ### 含めるドメイン
</div>

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "web scraping",
    "includeDomains": ["firecrawl.dev", "docs.firecrawl.dev"],
    "limit": 10
  }'
```

<div id="exclude-domains">
  ### 除外ドメイン
</div>

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "web scraping tools",
    "excludeDomains": ["example.com"],
    "limit": 10
  }'
```

<div id="category-response-format">
  ### カテゴリのレスポンス形式
</div>

各検索結果には、出所を示す `category` フィールドが含まれます。

```json theme={null}
{
  "success": true,
  "data": {
    "web": [
      {
        "url": "https://github.com/example/neural-network",
        "title": "ニューラルネットワーク実装",
        "description": "PyTorch によるニューラルネットワークの実装",
        "category": "github"
      },
      {
        "url": "https://arxiv.org/abs/2024.12345",
        "title": "ニューラルネットワークアーキテクチャの進展",
        "description": "ニューラルネットワークの改良に関する研究論文"
        "category": "research"
      }
    ]
  }
}
```

例：

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "openai",
    "sources": ["news"],
    "limit": 5
  }'
```

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "jupiter",
    "sources": ["images"],
    "limit": 8
  }'
```

<div id="hd-image-search-with-size-filtering">
  ### サイズフィルタ付きHD画像検索
</div>

高解像度の画像を見つけるには、画像検索の演算子を使います：

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "sunset imagesize:1920x1080",
    "sources": ["images"],
    "limit": 5
  }'
```

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "mountain wallpaper larger:2560x1440",
    "sources": ["images"],
    "limit": 8
  }'
```

**一般的なHDの解像度:**

* `imagesize:1920x1080` - フルHD (1080p)
* `imagesize:2560x1440` - QHD (1440p)
* `imagesize:3840x2160` - 4K UHD
* `larger:1920x1080` - HD以上
* `larger:2560x1440` - QHD以上

<div id="search-with-content-scraping">
  ## コンテンツのスクレイピング付き検索
</div>

1回の操作で検索し、検索結果からコンテンツを取得します。

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

  firecrawl = Firecrawl(
    # 開始するためにAPI keyは不要です — より高いRate Limitsを得るには追加してください:
    # api_key="fc-YOUR_API_KEY",
  )

  # 検索してコンテンツを取得する
  results = firecrawl.search(
      "firecrawl web scraping",
      limit=3,
      scrape_options={
          "formats": ["markdown", "links"]
      }
  )
  ```

  ```js Node theme={null}
  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({
    // 開始にAPIキーは不要です — より高いレート制限が必要な場合は追加してください:
    // apiKey: "fc-YOUR-API-KEY",
  });

  const results = await firecrawl.search('firecrawl', {
    limit: 3,
    scrapeOptions: { formats: ['markdown'] }
  });
  console.log(results);
  ```

  ```bash cURL theme={null}
  # 開始するにはAPI keyは不要です — より高いRate Limitsを利用するには -H "Authorization: Bearer fc-YOUR_API_KEY" を追加してください:
  curl -X POST https://api.firecrawl.dev/v2/search \
    -H "Content-Type: application/json" \
    -d '{
      "query": "firecrawl web scraping",
      "limit": 3,
      "scrapeOptions": {
        "formats": ["markdown", "links"]
      }
    }'
  ```

  ```bash CLI theme={null}
  # 検索とスクレイピング結果
  firecrawl search "firecrawl" --scrape --scrape-formats markdown --limit 5 --pretty
  ```
</CodeGroup>

この /search エンドポイントは、`scrapeOptions` パラメータ経由で /scrape エンドポイントのすべてのオプションに対応しています。

<div id="response-with-scraped-content">
  ### スクレイプ済みコンテンツを含むレスポンス
</div>

```json theme={null}
{
  "success": true,
  "data": [
    {
      "title": "Firecrawl - 究極のWebスクレイピングAPI",
      "description": "Firecrawl は、あらゆるウェブサイトを AI や分析向けのクリーンで構造化されたデータに変換する強力なWebスクレイピングAPIです。",
      "url": "https://firecrawl.dev/",
      "markdown": "# Firecrawl\n\n究極のWebスクレイピングAPI\n\n## あらゆるウェブサイトをクリーンで構造化されたデータに変換\n\nFirecrawl は、AIアプリケーション、市場調査、コンテンツ集約などに向けて、ウェブサイトからデータを手軽に抽出できます...",
      "links": [
        "https://firecrawl.dev/pricing",
        "https://firecrawl.dev/docs",
        "https://firecrawl.dev/guides"
      ],
      "metadata": {
        "title": "Firecrawl - 究極のWebスクレイピングAPI",
        "description": "Firecrawl は、あらゆるウェブサイトを AI や分析向けのクリーンで構造化されたデータに変換する強力なWebスクレイピングAPIです。"
        "sourceURL": "https://firecrawl.dev/",
        "statusCode": 200
      }
    }
  ]
}
```

<div id="search-then-scrape-two-step-pattern">
  ## Searchしてからスクレイピング (2ステップパターン)
</div>

スクレイピングの前に検索結果を絞り込んだり処理したりする必要がある場合は、2ステップのアプローチを使います。まず検索し、その後、必要なURLをスクレイピングします。

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

  firecrawl = Firecrawl(api_key="fc-YOUR_API_KEY")

  # ステップ 1: 検索
  results = firecrawl.search("firecrawl web scraping", limit=5)

  # ステップ 2: 各結果のURLをスクレイピングしてページ全体のコンテンツを取得
  for item in results.web or []:
      page = firecrawl.scrape(item.url, formats=["markdown"])
      print(page.markdown[:200])
  ```

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

  const firecrawl = new Firecrawl({ apiKey: "fc-YOUR_API_KEY" });

  // ステップ 1: 検索
  const results = await firecrawl.search("firecrawl web scraping", { limit: 5 });

  // ステップ 2: 各結果のURLをスクレイピングしてページ全体のコンテンツを取得
  for (const item of results.web ?? []) {
    const page = await firecrawl.scrape(item.url, { formats: ["markdown"] });
    console.log(page.markdown?.substring(0, 200));
  }
  ```
</CodeGroup>

<Tip>
  **アプローチの使い分け:**

  * **1ステップ** (search の `scrapeOptions`) : すべての結果からコンテンツを取得したい場合。よりシンプルで高速です。
  * **2ステップ** (検索してからスクレイピング) : 結果を絞り込んだり、順位付けしたり、必要なものだけを選んでスクレイピングしたい場合。より柔軟です。

  どちらのアプローチでも、スクレイピングのステップには Firecrawl を使用します。汎用的なHTTPフェッチを使ったり、検索スニペットだけを要約したりしないでください。結果の根拠と網羅性を支えるのは、Firecrawl の scrape で取得するページ全体のコンテンツです。
</Tip>

<div id="advanced-search-options">
  ## 高度な検索オプション
</div>

Firecrawlの検索APIは、検索をカスタマイズできる各種パラメータに対応しています。

<div id="location-customization">
  ### 場所のカスタマイズ
</div>

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

  firecrawl = Firecrawl(
    # 開始にAPIキーは不要です。より高いrate limitsが必要な場合は追加してください:
    # api_key="fc-YOUR_API_KEY",
  )

  # ロケーション（ドイツ）を指定して検索
  search_result = firecrawl.search(
      "web scraping tools",
      limit=5,
      location="Germany"
  )

  # 結果を処理
  for result in search_result.data:
      print(f"Title: {result['title']}")
      print(f"URL: {result['url']}")
  ```

  ```js Node theme={null}
  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({
    // 開始にAPIキーは不要です。より高いrate limitsのために追加してください：
    // apiKey: "fc-YOUR-API-KEY",
  });

  // ロケーションを指定して検索（ドイツ）
  const results = await firecrawl.search('web scraping tools', {
    limit: 5,
    location: "Germany"
  });

  // 結果を処理する
  console.log(results);
  ```

  ```bash cURL theme={null}
  # 開始にAPI keyは不要です — より高いrate limitsを得るには -H "Authorization: Bearer fc-YOUR_API_KEY" を追加してください:
  curl -X POST https://api.firecrawl.dev/v2/search \
    -H "Content-Type: application/json" \
    -d '{
      "query": "web scraping tools",
      "limit": 5,
      "location": "Germany"
    }'
  ```

  ```bash CLI theme={null}
  # 位置情報を使用した検索
  firecrawl search "local restaurants" --location "San Francisco,California,United States" --country US --pretty
  ```
</CodeGroup>

<div id="time-based-search">
  ### 時間指定検索
</div>

`tbs` パラメータを使って、結果を時間範囲でフィルタリングします。`tbs` は `web` ソースの結果にのみ適用され、`news` や `images` の結果には適用されない点に注意してください。時間で絞り込んだニュース結果が必要な場合は、特定のニュースドメインを対象にするために、`site:` 演算子と組み合わせた `web` ソースの利用を検討してください。

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

  firecrawl = Firecrawl(
    # 開始にAPIキーは不要です。より高いレート制限を利用するには追加してください:
    # api_key="fc-YOUR-API-KEY",
  )

  results = firecrawl.search(
      query="firecrawl",
      limit=5,
      tbs="qdr:d",
  )
  print(len(results.get('web', [])))
  ```

  ```js Node theme={null}
  import { Firecrawl } from 'firecrawl';

  const firecrawl = new Firecrawl({
    // 開始にAPIキーは不要です — より高いレート制限のために追加してください:
    // apiKey: "fc-YOUR-API-KEY",
  });

  const results = await firecrawl.search('firecrawl', {
    limit: 5,
    tbs: 'qdr:d', // 過去24時間
  });

  console.log(results.web);
  ```

  ```bash cURL theme={null}
  # 開始にAPIキーは不要です — より高いレート制限を利用するには -H "Authorization: Bearer fc-YOUR_API_KEY" を追加してください:
  curl -X POST https://api.firecrawl.dev/v2/search \
    -H "Content-Type: application/json" \
    -d '{
      "query": "latest web scraping techniques",
      "limit": 5,
      "tbs": "qdr:w"
    }'
  ```

  ```bash CLI theme={null}
  # 時間フィルター付きで検索（過去1週間）
  firecrawl search "firecrawl updates" --tbs qdr:w --limit 5 --pretty
  ```
</CodeGroup>

一般的な `tbs` の値:

* `qdr:h` - 過去1時間
* `qdr:d` - 過去24時間
* `qdr:w` - 過去1週間
* `qdr:m` - 過去1か月
* `qdr:y` - 過去1年
* `sbd:1` - 日付順にソート (新しい順)

より細かく絞り込みたい場合は、カスタム日付範囲フォーマットで日付範囲を指定できます:

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

  # APIキーでクライアントを初期化
  firecrawl = Firecrawl(api_key="fc-YOUR_API_KEY")

  # 2024年12月の結果を検索
  search_result = firecrawl.search(
      "firecrawl updates",
      limit=10,
      tbs="cdr:1,cd_min:12/1/2024,cd_max:12/31/2024"
  )
  ```

  ```js JavaScript theme={null}
  import { Firecrawl } from 'firecrawl';

  // APIキーでクライアントを初期化
  const firecrawl = new Firecrawl({apiKey: "fc-YOUR_API_KEY"});

  // 2024年12月の結果を検索
  firecrawl.search("firecrawl updates", {
    limit: 10,
    tbs: "cdr:1,cd_min:12/1/2024,cd_max:12/31/2024"
  })
  .then(searchResult => {
    console.log(searchResult.data);
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.firecrawl.dev/v2/search \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer fc-YOUR_API_KEY" \
    -d '{
      "query": "firecrawl updates",
      "limit": 10,
      "tbs": "cdr:1,cd_min:12/1/2024,cd_max:12/31/2024"
    }'
  ```
</CodeGroup>

`sbd:1` を時間フィルタと組み合わせることで、指定した期間内の結果を日付順にソートして取得できます。たとえば、`sbd:1,qdr:w` は過去1週間の結果を新しい順で返し、`sbd:1,cdr:1,cd_min:12/1/2024,cd_max:12/31/2024` は2024年12月の結果を日付順に返します。

<div id="custom-timeout">
  ### カスタムタイムアウト
</div>

検索処理のタイムアウトを任意に設定します:

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

  # APIキーでクライアントを初期化
  firecrawl = Firecrawl(api_key="fc-YOUR_API_KEY")

  # タイムアウトを30秒に設定
  search_result = firecrawl.search(
      "complex search query",
      limit=10,
      timeout=30000  # ミリ秒単位で30秒
  )
  ```

  ```js JavaScript theme={null}
  import { Firecrawl } from 'firecrawl';

  // APIキーでクライアントを初期化
  const firecrawl = new Firecrawl({apiKey: "fc-YOUR_API_KEY"});

  // タイムアウトを30秒に設定
  firecrawl.search("complex search query", {
    limit: 10,
    timeout: 30000  // ミリ秒単位で30秒
  })
  .then(searchResult => {
    // 結果を処理
    console.log(searchResult.data);
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.firecrawl.dev/v2/search \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer fc-YOUR_API_KEY" \
    -d '{
      "query": "complex search query",
      "limit": 10,
      "timeout": 30000
    }'
  ```
</CodeGroup>

<div id="zero-data-retention-zdr">
  ## ゼロデータ保持 (ZDR)
</div>

厳格なデータ取り扱い要件を持つチーム向けに、Firecrawl では `enterprise` パラメータを通じて `/search` エンドポイント用のゼロデータ保持 (ZDR) オプションを提供しています。ZDR 検索は Enterprise プランで利用可能です。利用を開始するには、[firecrawl.dev/enterprise](https://www.firecrawl.dev/enterprise) をご覧ください。

<Note>
  これは、スクレイピング操作における ZDR を制御する `zeroDataRetention` スクレイプオプションとは別のものです。詳細は [Scrape ZDR](/ja/features/scrape#zero-data-retention-zdr) を参照してください。`enterprise` パラメータは、リクエストの検索部分にのみ適用されます。
</Note>

<div id="end-to-end-zdr">
  ### エンドツーエンド ZDR
</div>

エンドツーエンド ZDR では、Firecrawl と上流の検索プロバイダーの両方でゼロデータ保持が適用されます。クエリや結果データは、パイプラインのどの時点でも保存されません。

* **コスト:** 10 件の結果につき 10 クレジット
* **パラメータ:** `enterprise: ["zdr"]`

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "sensitive topic",
    "limit": 10,
    "enterprise": ["zdr"]
  }'
```

<div id="anonymized-zdr">
  ### 匿名化された ZDR
</div>

匿名化された ZDR では、Firecrawl は当社側で完全なゼロデータ保持を適用します。検索プロバイダーがクエリをキャッシュする場合がありますが、それは完全に匿名化されており、識別可能な情報は一切付随しません。

* **コスト:** 10 件の結果につき 2 クレジット
* **パラメータ:** `enterprise: ["anon"]`

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "sensitive topic",
    "limit": 10,
    "enterprise": ["anon"]
  }'
```

<div id="combining-search-zdr-with-scrape-zdr">
  ### 検索 ZDR と Scrape ZDR の組み合わせ
</div>

コンテンツのスクレイピング (`scrapeOptions`) とあわせて検索を使用している場合、`enterprise` パラメータは検索部分を対象とし、`scrapeOptions` の `zeroDataRetention` はスクレイピング部分を対象とします。両方にわたって完全な ZDR を実現するには、両方を設定してください。

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -d '{
    "query": "sensitive topic",
    "limit": 5,
    "enterprise": ["zdr"],
    "scrapeOptions": {
      "formats": ["markdown"],
      "zeroDataRetention": true
    }
  }'
```

<div id="cost-implications">
  ## コストへの影響
</div>

検索1回あたりのコストは、検索結果10件ごとに2クレジットで、端数は切り上げられます (1〜10件 = 2クレジット、11〜20件 = 4クレジット、以降同様) 。スクレイピングオプションを有効にすると、各検索結果に対して標準のスクレイピングコストが適用されます：

* **Basic scrape**: ウェブページ1枚あたり1クレジット
* **PDF parsing**: PDFページ1枚あたり1クレジット
* **Enhanced proxy mode**: ウェブページ1枚あたり追加で4クレジット
* **JSON mode**: ウェブページ1枚あたり追加で4クレジット

コストを抑えるために:

* PDF解析が不要な場合は `parsers: []` を設定する
* 可能な場合は `"enhanced"` の代わりに `proxy: "basic"` を使用するか、`"auto"` に設定する
* `limit` パラメータで検索結果数を制限する

<div id="advanced-scraping-options">
  ## 高度なスクレイピングオプション
</div>

スクレイピングオプションの詳細については、[Scrape 機能のドキュメント](https://docs.firecrawl.dev/features/scrape)を参照してください。FIRE-1 エージェント機能と変更追跡機能を除き、これらはすべてこの Search エンドポイントでサポートされています。

> Firecrawl API キーが必要な AI エージェントですか？ 自動オンボーディング手順については、[firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) を参照してください。

<div id="search-feedback">
  ## 検索フィードバック
</div>

検索結果が有用だった場合や重要なコンテンツが欠けていた場合は、`POST /v2/search/{jobId}/feedback` でフィードバックを送信してください。検索ジョブに対する最初のフィードバック送信では、チームの上限の範囲内で 1 クレジットが返還される場合があり、Firecrawl の検索品質の改善にも役立ちます。詳細は [Search Feedback](/ja/api-reference/endpoint/search-feedback) を参照してください。
