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

# Map

> ウェブサイトを入力すると、サイト内のすべてのURLを超高速で取得

<div id="introducing-map">
  ## /map の紹介
</div>

単一のURLからウェブサイト全体のマップを素早く取得する最も簡単な方法です。次の用途に非常に有用です:

* エンドユーザーに、どのリンクをスクレイプするか選んでもらう必要があるとき
* サイト上のリンクをすぐに把握したいとき
* 特定のトピックに関連するページだけをスクレイプしたいとき (`search` パラメータを使用)
* サイトの特定ページだけをスクレイプすればよいとき

<Card title="Playground で試してみる" icon="play" href="https://www.firecrawl.dev/playground?endpoint=map">
  インタラクティブなPlaygroundでマッピングをテストできます。コードは不要です。
</Card>

<div id="mapping">
  ## マッピング
</div>

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

URL をマッピングし、サイト内の URL を取得するために使用します。サイト上に存在するリンクの大部分を返します。

URL は主にウェブサイトのサイトマップから検出され、カバレッジを向上させるために SERP (検索エンジン) の結果および以前にクロールされたページによって補完されます。`sitemap` パラメータでサイトマップの動作を制御できます。

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

### 使い方

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

  firecrawl = Firecrawl(api_key="fc-YOUR-API-KEY")
  res = firecrawl.map(url="https://firecrawl.dev", limit=50, sitemap="include")
  print(res)
  ```

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

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

  const res = await firecrawl.map('https://firecrawl.dev', { limit: 50, sitemap: 'include' });
  console.log(res);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.firecrawl.dev/v2/map \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -d '{
        "url": "https://firecrawl.dev"
      }'
  ```

  ```bash CLI theme={null}
  # ウェブサイトをマップしてURLを検出する
  firecrawl map https://firecrawl.dev

  # 制限付きでJSON形式で出力する
  firecrawl map https://firecrawl.dev --json --limit 100 --pretty
  ```
</CodeGroup>

<Info>
  各 map リクエストは、返される URL の数に関係なく、1 コールあたり 1 クレジットを消費します。例えば、`limit` を 100,000 に設定しても、使用するクレジットは 1 つだけです。
</Info>

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

SDKはデータオブジェクトを直接返します。cURLは下記のとおり、ペイロードをそのまま返します。

```json theme={null}
{
  "success": true,
  "links": [
    {
      "url": "https://docs.firecrawl.dev/features/scrape",
      "title": "スクレイプ | Firecrawl",
      "description": "あらゆるURLをクリーンなデータに変換",
    },
    {
      "url": "https://www.firecrawl.dev/blog/5_easy_ways_to_access_glm_4_5",
      "title": "GLM-4.5にアクセスする簡単な5つの方法",
      "description": "GLM-4.5モデルにローカル、チャットアプリ、公式API、そしてLLMマーケットプレイスAPIを通じてシームレスに統合する方法を解説...",
    },
    {
      "url": "https://www.firecrawl.dev/playground",
      "title": "Playground - Firecrawl",
      "description": "APIレスポンスをプレビューし、API用コードスニペットを取得",
    },
    {
      "url": "https://www.firecrawl.dev/?testId=2a7e0542-077b-4eff-bec7-0130395570d6",
      "title": "Firecrawl - AI向けWebデータAPI",
      "description": "AI向けのウェブクロール・スクレイプ・検索API。大規模運用に対応。Firecrawlはインターネット全体をAIエージェントとビルダーに提供。クリーンで構造化されたデータを...",
    },
    {
      "url": "https://www.firecrawl.dev/?testId=af391f07-ca0e-40d3-8ff2-b1ecf2e3fcde",
      "title": "Firecrawl - AI向けWebデータAPI",
      "description": "AI向けのウェブクロール・スクレイプ・検索API。大規模運用に対応。Firecrawlはインターネット全体をAIエージェントとビルダーに提供。クリーンで構造化されたデータを..."
    },
    ...
  ]
}
```

<Warning>
  タイトルや説明はサイトによって異なるため、常に含まれるとは限りません。
</Warning>

<div id="map-with-search">
  #### 検索付きのマップ
</div>

`search` パラメータを使うと、サイト内の特定のURLを検索できます。

```bash cURL theme={null}
curl -X POST https://api.firecrawl.dev/v2/map \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "url": "https://firecrawl.dev",
    "search": "docs"
  }'
```

返答は、関連性の高い順に並べた番号付きリストで提供されます。

```json theme={null}
{
  "status": "success",
  "links": [
    {
      "url": "https://docs.firecrawl.dev",
      "title": "Firecrawl ドキュメント",
      "description": "Firecrawl ドキュメント",
    },
    {
      "url": "https://docs.firecrawl.dev/sdks/python",
      "title": "Firecrawl Python SDK",
      "description": "Firecrawl Python SDK ドキュメント"
    },
    ...
  ]
}
```

<div id="location-and-language">
  ## 位置と言語
</div>

対象の地域と言語の優先度に基づいて関連コンテンツを取得するため、国と言語の優先設定を指定します。/scrape エンドポイントと同様です。

<div id="how-it-works">
  ### 仕組み
</div>

ロケーション設定を指定すると、Firecrawl は (利用可能であれば) 適切なプロキシを使用し、対応する言語とタイムゾーン設定をエミュレートします。指定がない場合、ロケーションは既定で「US」になります。

<div id="usage">
  ### 使用方法
</div>

位置情報と言語設定を利用するには、リクエストボディに `location` オブジェクトを含め、次のプロパティを指定してください。

* `country`: ISO 3166-1 alpha-2 の国コード (例: 'US'、'AU'、'DE'、'JP') 。デフォルトは 'US' です。
* `languages`: リクエストで優先する言語・ロケールの配列 (優先順) 。デフォルトは指定した国・地域の言語です。

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

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

  res = firecrawl.map('https://example.com',
      location={
          'country': 'US',
          'languages': ['en']
      }
  )

  print(res)
  ```

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

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

  const res = await firecrawl.map('https://example.com', {
    location: { country: 'US', languages: ['en'] },
  });

  console.log(res.metadata);
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.firecrawl.dev/v2/map" \
    -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://example.com",
      "location": { "country": "US", "languages": ["en"] }
    }'
  ```
</CodeGroup>

対応している国・地域の詳細は、[プロキシのドキュメント](/ja/features/proxies)を参照してください。

<div id="considerations">
  ## 留意事項
</div>

このエンドポイントは速度を優先しているため、Web サイト上のリンクをすべて取得できない場合があります。主に Web サイトのサイトマップを使用し、キャッシュ済みのクロールデータや検索エンジンの結果で補完しています。より網羅的かつ最新の URL リストが必要な場合は、代わりに [/crawl](/ja/features/crawl) エンドポイントを使用することをご検討ください。

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