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

# クロール



## OpenAPI

````yaml ja/api-reference/v2-openapi.json post /crawl
openapi: 3.0.0
info:
  title: Firecrawl API
  version: v2
  description: Firecrawlのサービスを利用して、Webスクレイピングやクロールを行うためのAPIです。
  contact:
    name: Firecrawl Support
    url: https://firecrawl.dev/support
    email: support@firecrawl.dev
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /crawl:
    post:
      tags:
        - Crawling
      summary: オプション設定に基づいて複数のURLをクロールする
      operationId: crawlUrls
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: クロールを開始するベースURL
                prompt:
                  type: string
                  description: >-
                    自然言語からクローラーオプション（以下のすべてのパラメーター）を生成するために使用するプロンプトです。明示的に設定されたパラメーターは、生成された対応する値よりも優先されます。
                excludePaths:
                  type: array
                  items:
                    type: string
                  description: >-
                    クロールから除外する URL パス名の正規表現パターンです。たとえば、ベース URL が firecrawl.dev
                    の場合に `"excludePaths": ["blog/.*"]`
                    を設定すると、`https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap`
                    のようにそのパターンにマッチする URL はすべて除外されます。
                includePaths:
                  type: array
                  items:
                    type: string
                  description: >-
                    クロールに含めるURLを指定するための、URLパス名に対する正規表現パターンです。指定したパターンにマッチしたパスのみがレスポンスに含まれます。注意：開始URLもこれらのパターンでチェックされるため、マッチしない場合は1ページもクロールされず、ページ数が0になる可能性があります。例えば、ベースURLが
                    firecrawl.dev/blog のときに "includePaths": ["blog/.*"]
                    を指定すると、/blog/
                    配下のページのみが結果に含まれます（例：https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap）。
                maxDiscoveryDepth:
                  type: integer
                  description: >-
                    検出順序に基づいてクロールする最大深度です。ルートサイトおよびサイトマップに含まれるページの検出深度は 0
                    です。例えば、これを 1 に設定し、かつ `sitemap: 'skip'` を指定した場合、入力した URL
                    と、そのページからリンクされているすべての URL だけをクロールします。
                sitemap:
                  type: string
                  enum:
                    - skip
                    - include
                    - only
                  description: >-
                    クロール時のサイトマップモードを指定します。`skip`
                    を指定すると、クローラーはウェブサイトのサイトマップを無視し、指定した開始URLを起点として、そこから発見したページだけをクロールします。`only`
                    を指定すると、クローラーはサイトマップ内のURL（＋開始URL）のみをクロールし、HTML内のリンクから新たなページをたどることはありません。
                  default: include
                ignoreQueryParameters:
                  type: boolean
                  description: 同じパスを、クエリパラメータの有無や値を変えて再スクレイプしないでください
                  default: false
                regexOnFullURL:
                  type: boolean
                  description: >-
                    true の場合、includePaths および excludePaths の正規表現パターンは、URL
                    パス名だけでなく、クエリパラメータを含む URL 全体に対してマッチングされます。クエリ文字列に基づいて URL
                    をフィルタリングしたい場合に便利です。
                  default: false
                limit:
                  type: integer
                  description: クロールするページ数の最大値。デフォルトの上限は 10,000 です。
                  default: 10000
                crawlEntireDomain:
                  type: boolean
                  description: |-
                    クローラーが子パスだけでなく、同一階層（兄弟）や親の URL への内部リンクもたどれるようにします。

                    false: より深い（子）URL だけをクロールします。
                    → 例: /features/feature-1 → /features/feature-1/tips ✅
                    → /pricing や / には遷移しません ❌

                    true: 同一階層や親階層を含む、あらゆる内部リンクをクロールします。
                    → 例: /features/feature-1 → /pricing、/ など ✅

                    入れ子になったパスよりも広く内部ページ全体をカバーしたい場合は true を使用します。
                  default: false
                allowExternalLinks:
                  type: boolean
                  description: クローラーが外部のウェブサイトへのリンクをたどれるようにします。
                  default: false
                allowSubdomains:
                  type: boolean
                  description: クローラーがメインドメイン配下のサブドメインへのリンクをたどれるようにします。
                  default: false
                delay:
                  type: number
                  description: スクレイプ実行間の待機時間（秒）。ウェブサイト側のレート制限を尊重するのに役立ちます。
                maxConcurrency:
                  type: integer
                  description: >-
                    同時スクレイプ数の上限。このパラメータで、このクロールに対する同時実行数の上限を設定できます。指定しない場合、このクロールはチームに設定されている同時実行数の上限に従います。
                webhook:
                  type: object
                  description: Webhook 仕様オブジェクト。
                  properties:
                    url:
                      type: string
                      description: >-
                        Webhook の送信先 URL
                        です。クロールの開始時（crawl.started）、各ページのクロール時（crawl.page）、およびクロール完了または失敗時（crawl.completed
                        または crawl.failed）にトリガーされます。レスポンスは `/scrape`
                        エンドポイントのものと同じです。
                    headers:
                      type: object
                      description: Webhook URL に送信する HTTP ヘッダー。
                      additionalProperties:
                        type: string
                    metadata:
                      type: object
                      description: このクロールのすべてのウェブフックペイロードに含まれるカスタムメタデータ
                      additionalProperties: true
                    events:
                      type: array
                      description: 'Webhook URL に送信するイベントの種類です。（デフォルト: all）'
                      items:
                        type: string
                        enum:
                          - completed
                          - page
                          - failed
                          - started
                  required:
                    - url
                scrapeOptions:
                  $ref: '#/components/schemas/ScrapeOptions'
                zeroDataRetention:
                  type: boolean
                  default: false
                  description: >-
                    true
                    の場合、このクロールではデータを一切保持しないゼロデータ保持モードが有効になります。この機能を有効化するには、help@firecrawl.dev
                    までご連絡ください。
              required:
                - url
      responses:
        '200':
          description: 成功時のレスポンス
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrawlResponse'
        '402':
          description: お支払いが必要です
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: リクエストが多すぎます
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Request rate limit exceeded. Please wait and try again
                      later.
        '500':
          description: サーバーエラー
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
      security:
        - bearerAuth: []
components:
  schemas:
    ScrapeOptions:
      type: object
      properties:
        formats:
          $ref: '#/components/schemas/Formats'
        onlyMainContent:
          type: boolean
          description: ヘッダーやナビゲーション、フッターなどを除外し、ページのメインコンテンツのみを返します。
          default: true
        includeTags:
          type: array
          items:
            type: string
          description: 出力に含めるタグ。
        excludeTags:
          type: array
          items:
            type: string
          description: 出力結果から除外するタグ。
        maxAge:
          type: integer
          description: >-
            ページのキャッシュが、この値（ミリ秒）で指定した有効期間より新しい場合は、そのキャッシュ版を返します。キャッシュがこの値より古い場合は、新たにページのスクレイピングを行います。極めて最新のデータが不要であれば、これを有効にすることでスクレイピングを最大500%高速化できます。デフォルトは2日です。
          default: 172800000
        headers:
          type: object
          description: リクエストに含めるヘッダー。Cookie や User-Agent などを送信するために使用できます。
        waitFor:
          type: integer
          description: >-
            コンテンツを取得する前に待機する時間をミリ秒単位で指定します。ページが十分に読み込まれるまでの時間を確保するための遅延です。この待機時間は、Firecrawl
            のスマート待機機能に加えて発生します。
          default: 0
        mobile:
          type: boolean
          description: >-
            モバイル端末からのスクレイピングをエミュレートしたい場合は、true
            に設定します。レスポンシブページのテストやモバイル向けスクリーンショットの取得に便利です。
          default: false
        skipTlsVerification:
          type: boolean
          description: リクエストを送信する際に TLS 証明書の検証を行わないようにします。
          default: true
        timeout:
          type: integer
          description: リクエストのタイムアウト（ミリ秒単位）。デフォルトは 30000 ミリ秒（30 秒）、上限は 300000 ミリ秒（300 秒）です。
          default: 30000
          maximum: 300000
        parsers:
          type: array
          description: >-
            スクレイピング時のファイルの処理方法を制御します。"pdf" が含まれている場合（デフォルト）、PDF の内容が抽出されて
            markdown 形式に変換され、課金はページ数に基づきます（1ページあたり1クレジット）。空の配列を渡した場合、PDF ファイルは
            base64 エンコード形式で返され、PDF 全体で一律1クレジットが請求されます。
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - pdf
                  mode:
                    type: string
                    enum:
                      - fast
                      - auto
                      - ocr
                    default: auto
                    description: >-
                      PDF
                      の解析モード。"fast"：テキストベースの抽出のみ（埋め込みテキストのみを対象とし、最速）。"auto"（デフォルト）：まず
                      fast で抽出を試し、必要に応じて OCR にフォールバックします。"ocr"：すべてのページで必ず OCR
                      解析を実行します。
                  maxPages:
                    type: integer
                    minimum: 1
                    maximum: 10000
                    description: PDF から解析するページの最大数です。1〜10000 の正の整数で指定してください。
                required:
                  - type
                additionalProperties: false
          default:
            - pdf
        actions:
          type: array
          description: コンテンツを取得する前にページに対して実行するアクション
          items:
            oneOf:
              - title: Wait
                oneOf:
                  - type: object
                    title: Wait by Duration
                    properties:
                      type:
                        type: string
                        enum:
                          - wait
                        description: 指定したミリ秒数だけ待機します
                      milliseconds:
                        type: integer
                        minimum: 1
                        description: 待機する時間（ミリ秒）
                    required:
                      - type
                      - milliseconds
                    additionalProperties: false
                  - type: object
                    title: Wait for Element
                    properties:
                      type:
                        type: string
                        enum:
                          - wait
                        description: 特定の要素が表示されるまで待機します
                      selector:
                        type: string
                        description: 対象要素のCSSセレクター
                        example: '#my-element'
                    required:
                      - type
                      - selector
                    additionalProperties: false
              - type: object
                title: Screenshot
                properties:
                  type:
                    type: string
                    enum:
                      - screenshot
                    description: >-
                      スクリーンショットを撮影します。リンクはレスポンスの `actions.screenshots`
                      配列内に含まれます。
                  fullPage:
                    type: boolean
                    description: >-
                      ページ全体のスクリーンショットを取得するか（その場合は viewport.height
                      を無視）、または現在のビューポート範囲内のスクリーンショットにするかを指定します。
                    default: false
                  quality:
                    type: integer
                    description: スクリーンショットの画質を1〜100で指定します。100が最高画質です。
                  viewport:
                    type: object
                    properties:
                      width:
                        type: integer
                        description: ビューポートの幅（ピクセル単位）
                      height:
                        type: integer
                        description: ビューポートの高さ（ピクセル単位）
                    required:
                      - width
                      - height
                required:
                  - type
              - type: object
                title: Click
                properties:
                  type:
                    type: string
                    enum:
                      - click
                    description: 要素をクリック
                  selector:
                    type: string
                    description: 要素を検索するためのクエリセレクタ
                    example: '#load-more-button'
                  all:
                    type: boolean
                    description: >-
                      セレクターに一致したすべての要素をクリックし、最初の要素だけを対象とするわけではありません。セレクターに一致する要素が存在しない場合でも、エラーは発生しません。
                    default: false
                required:
                  - type
                  - selector
              - type: object
                title: Write text
                properties:
                  type:
                    type: string
                    enum:
                      - write
                    description: >-
                      入力フィールド、テキストエリア、または contenteditable 要素にテキストを書き込みます。注意:
                      テキストを書き込む前に、必ず 'click'
                      アクションでその要素にフォーカスしてください。テキストはキーボード入力をシミュレートするため、1文字ずつタイプされます。
                  text:
                    type: string
                    description: 入力テキスト
                    example: Hello, world!
                required:
                  - type
                  - text
              - type: object
                title: Press a key
                description: >-
                  このページでキーを押してください。キーコードについては
                  https://asawicki.info/nosense/doc/devices/keyboard/key_codes.html
                  を参照してください。
                properties:
                  type:
                    type: string
                    enum:
                      - press
                    description: このページでキーを押してください
                  key:
                    type: string
                    description: 押すキー
                    example: Enter
                required:
                  - type
                  - key
              - type: object
                title: Scroll
                properties:
                  type:
                    type: string
                    enum:
                      - scroll
                    description: ページまたは特定の要素をスクロールする
                  direction:
                    type: string
                    enum:
                      - up
                      - down
                    description: スクロール方向
                    default: down
                  selector:
                    type: string
                    description: スクロールする要素を指定するクエリセレクター
                    example: '#my-element'
                required:
                  - type
              - type: object
                title: Scrape
                properties:
                  type:
                    type: string
                    enum:
                      - scrape
                    description: 現在のページのコンテンツを取得し、URL と HTML を返します。
                required:
                  - type
              - type: object
                title: Execute JavaScript
                properties:
                  type:
                    type: string
                    enum:
                      - executeJavascript
                    description: ページ上でJavaScriptコードを実行する
                  script:
                    type: string
                    description: 実行する JavaScript コード
                    example: document.querySelector('.button').click();
                required:
                  - type
                  - script
              - type: object
                title: Generate PDF
                properties:
                  type:
                    type: string
                    enum:
                      - pdf
                    description: >-
                      現在のページのPDFを生成します。生成されたPDFは、レスポンスの `actions.pdfs`
                      配列内で返されます。
                  format:
                    type: string
                    enum:
                      - A0
                      - A1
                      - A2
                      - A3
                      - A4
                      - A5
                      - A6
                      - Letter
                      - Legal
                      - Tabloid
                      - Ledger
                    description: 出力されるPDFのページサイズ
                    default: Letter
                  landscape:
                    type: boolean
                    description: PDF を横向きで生成するかどうかを指定します
                    default: false
                  scale:
                    type: number
                    description: 生成されるPDFの拡大縮小倍率
                    default: 1
                required:
                  - type
        location:
          type: object
          description: >-
            リクエストのロケーション設定です。指定すると、利用可能な場合は適切なプロキシが使用され、対応する言語およびタイムゾーン設定がエミュレートされます。指定されていない場合は、デフォルトで「US」が使用されます。
          properties:
            country:
              type: string
              description: ISO 3166-1 alpha-2 国コード（例：'US'、'AU'、'DE'、'JP'）
              pattern: ^[A-Z]{2}$
              default: US
            languages:
              type: array
              description: >-
                リクエストに対して優先順で指定する言語とロケール。デフォルトは、指定された location の言語になります。詳しくは
                https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
                を参照してください。
              items:
                type: string
                example: en-US
        removeBase64Images:
          type: boolean
          description: >-
            出力からすべての Base64 画像を削除します。これらは非常に長くなる場合があります。画像の alt
            テキストは出力内に残りますが、URL はプレースホルダーに置き換えられます。
          default: true
        blockAds:
          type: boolean
          description: 広告およびCookie同意ポップアップのブロックを有効化します。
          default: true
        proxy:
          type: string
          enum:
            - basic
            - enhanced
            - auto
          description: |-
            使用するプロキシの種類を指定します。

             - **basic**: ボット対策がない、または基本的なボット対策のみを行っているサイト向けのプロキシです。高速で、多くのケースではこれで十分です。
             - **enhanced**: 高度なボット対策を行っているサイト向けの強化プロキシです。basic よりは遅くなりますが、一部のサイトではより高い成功率が期待できます。1 リクエストあたり最大 5 クレジット消費します。
             - **auto**: basic プロキシでのスクレイピングに失敗した場合、Firecrawl が自動的に enhanced プロキシで再試行します。enhanced での再試行が成功した場合、そのスクレイプには 5 クレジットが課金されます。最初の basic で成功した場合は、通常のコストのみが課金されます。
          default: auto
        storeInCache:
          type: boolean
          description: >-
            true の場合、そのページは Firecrawl
            のインデックスおよびキャッシュに保存されます。スクレイピング活動でデータ保護上の懸念が生じる可能性がある場合は、これを false
            に設定すると有用です。機密性の高いスクレイピングに関連する一部のパラメータ（例:
            actions、headers）を使用すると、このパラメータは強制的に false になります。
          default: true
    CrawlResponse:
      type: object
      properties:
        success:
          type: boolean
        id:
          type: string
        url:
          type: string
          format: uri
    Formats:
      type: array
      items:
        oneOf:
          - type: object
            title: Markdown
            properties:
              type:
                type: string
                enum:
                  - markdown
            required:
              - type
          - type: object
            title: Summary
            properties:
              type:
                type: string
                enum:
                  - summary
            required:
              - type
          - type: object
            title: HTML
            properties:
              type:
                type: string
                enum:
                  - html
            required:
              - type
          - type: object
            title: Raw HTML
            properties:
              type:
                type: string
                enum:
                  - rawHtml
            required:
              - type
          - type: object
            title: Links
            properties:
              type:
                type: string
                enum:
                  - links
            required:
              - type
          - type: object
            title: Images
            properties:
              type:
                type: string
                enum:
                  - images
            required:
              - type
          - type: object
            title: Screenshot
            properties:
              type:
                type: string
                enum:
                  - screenshot
              fullPage:
                type: boolean
                description: >-
                  ページ全体のスクリーンショットを取得するか（その場合は viewport.height
                  を無視）、または現在のビューポート範囲内のスクリーンショットにするかを指定します。
                default: false
              quality:
                type: integer
                description: スクリーンショットの画質を1〜100で指定します。100が最高画質です。
              viewport:
                type: object
                properties:
                  width:
                    type: integer
                    description: ビューポートの幅（ピクセル単位）
                  height:
                    type: integer
                    description: ビューポートの高さ（ピクセル単位）
                required:
                  - width
                  - height
            required:
              - type
          - type: object
            title: JSON
            properties:
              type:
                type: string
                enum:
                  - json
              schema:
                type: object
                description: >-
                  JSON出力用のスキーマ。[JSON Schema](https://json-schema.org/)
                  に準拠している必要があります。
              prompt:
                type: string
                description: JSON出力用プロンプト
            required:
              - type
          - type: object
            title: Change Tracking
            properties:
              type:
                type: string
                enum:
                  - changeTracking
              modes:
                type: array
                items:
                  type: string
                  enum:
                    - git-diff
                    - json
                description: >-
                  変更追跡に使用するモードです。'git-diff' は詳細な差分を表示し、'json' は抽出した JSON
                  データを比較します。
              schema:
                type: object
                description: >-
                  「json」モードでのJSON抽出用スキーマです。抽出および比較するデータの構造を定義します。[JSON
                  Schema](https://json-schema.org/) に準拠する必要があります。
              prompt:
                type: string
                description: json モードで変更追跡を行う際に使用するプロンプトです。指定しない場合はデフォルトのプロンプトが使用されます。
              tag:
                type: string
                nullable: true
                default: null
                description: >-
                  変更追跡に使用するタグ。タグを使うことで、変更追跡の履歴を個別の「ブランチ」に分割できます。特定のタグを指定した場合、そのタグに対する変更追跡は、同じタグで実行されたスクレイプとのみ比較されます。指定しない場合は、デフォルトタグ（null）が使用されます。
            required:
              - type
          - type: object
            title: Branding
            properties:
              type:
                type: string
                enum:
                  - branding
            required:
              - type
      description: >-
        レスポンスに含める出力フォーマットを指定します。1つ以上のフォーマットを、文字列（例:
        `'markdown'`）または追加オプションを含むオブジェクト（例: `{ type: 'json', schema: {...}
        }`）として指定できます。一部のフォーマットでは、特定のオプションの設定が必須です。例: `['markdown', { type:
        'json', schema: {...} }]`。
      default:
        - markdown
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````