Documentation Index
Fetch the complete documentation index at: https://firecrawl-mog-monitoring-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ターミナルから直接、検索、スクレイピング、Interact、クロール、マッピング、エージェントジョブの実行を行えます。Firecrawl CLIは単体でも動作し、Claude Code、Antigravity、OpenCodeのようなAIコーディングエージェントが自動的に検出して利用できるスキルと組み合わせて使うこともできます。
Claude Code のような AI エージェントを使用している場合は、以下の Firecrawl スキル をインストールすると、エージェントがセットアップしてくれます。
npx -y firecrawl-cli@latest init --all --browser
--all は検出されたすべての AI コーディングエージェントに Firecrawl スキル をインストールします
--browser は Firecrawl の認証のためにブラウザを自動的に開きます
スキル をインストールした後、新しい スキル を認識させるためにエージェントを再起動してください。
npm を使って Firecrawl CLI をグローバルに手動でインストールすることもできます。
# npm でグローバルにインストール
npm install -g firecrawl-cli
CLI を使用する前に、Firecrawl API キーを使って認証する必要があります。
# 対話型ログイン(ブラウザを開くか、APIキーの入力を求めます)
firecrawl login
# Login with browser authentication (recommended for agents)
firecrawl login --browser
# Login with API key directly
firecrawl login --api-key fc-YOUR-API-KEY
# Or set via environment variable
export FIRECRAWL_API_KEY=fc-YOUR-API-KEY
# 現在の設定と認証ステータスを表示
firecrawl view-config
# 保存された認証情報をクリア
firecrawl logout
セルフホスト環境の Firecrawl インスタンスやローカル開発では、--api-url オプションを使用してください:
# ローカルのFirecrawlインスタンスを使用(APIキー不要)
firecrawl --api-url http://localhost:3002 scrape https://example.com
# Or set via environment variable
export FIRECRAWL_API_URL=http://localhost:3002
firecrawl scrape https://example.com
# Configure and persist the custom API URL
firecrawl config --api-url http://localhost:3002
カスタム API URL(https://api.firecrawl.dev 以外のもの)を使用している場合、API キー認証は自動的にスキップされるため、ローカルインスタンスでは API キーなしで利用できます。
インストールと認証が正しく行われているかを確認し、レート制限も確認します。
準備完了時の出力:
🔥 firecrawl cli v1.16.2
● Authenticated via FIRECRAWL_API_KEY
Concurrency: 0/100 jobs (parallel scrape limit)
Credits: 500,000 remaining
- 同時実行数 (Concurrency): 並列に実行できるジョブの最大数。この上限付近まで並列処理を行ってもよいが、超えないようにする。
- クレジット (Credits): 残りの API クレジット数。各
scrape/crawl はクレジットを消費する。
1つのURLをスクレイピングし、そのコンテンツをさまざまなフォーマットで抽出します。
--only-main-content を使用すると、ナビゲーション、フッター、広告を除いたクリーンな出力を取得できます。記事やメインページのコンテンツのみが必要なほとんどのユースケースで推奨されます。
# Scrape a URL (default: markdown output)
firecrawl https://example.com
# Or use the explicit scrape command
firecrawl scrape https://example.com
# 推奨: ナビゲーションやフッターを除いたクリーンな出力には --only-main-content を使用
firecrawl https://example.com --only-main-content
# Get HTML output
firecrawl https://example.com --html
# Multiple formats (returns JSON)
firecrawl https://example.com --format markdown,links
# Get images from a page
firecrawl https://example.com --format images
# Get a summary of the page content
firecrawl https://example.com --format summary
# Track changes on a page
firecrawl https://example.com --format changeTracking
# 利用可能なフォーマット: markdown, html, rawHtml, links, screenshot, json, images, summary, changeTracking, attributes, branding
# メインコンテンツのみを抽出(ナビゲーションとフッターを削除)
firecrawl https://example.com --only-main-content
# Wait for JavaScript rendering
firecrawl https://example.com --wait-for 3000
# Take a screenshot
firecrawl https://example.com --screenshot
# スキーマを使って構造化JSONを抽出
firecrawl https://example.com --format json --schema '{"type":"object","properties":{"title":{"type":"string"}}}'
# 抽出前に軽量なスクレイピングアクションを実行
firecrawl https://example.com --actions '[{"type":"wait","milliseconds":1000}]'
# プロキシモードを選択
firecrawl https://example.com --proxy basic
# Include/exclude specific HTML tags
firecrawl https://example.com --include-tags article,main
firecrawl https://example.com --exclude-tags nav,footer
# Save output to file
firecrawl https://example.com -o output.md
# Pretty print JSON output
firecrawl https://example.com --format markdown,links --pretty
# Force JSON output even with single format
firecrawl https://example.com --json
# Show request timing information
firecrawl https://example.com --timing
利用可能なオプション:
| Option | Short | Description |
|---|
--url <url> | -u | スクレイプする URL (位置引数の代わり) |
--format <formats> | -f | 出力フォーマット (カンマ区切り) :markdown, html, rawHtml, links, screenshot, json, images, summary, changeTracking, attributes, branding |
--html | -H | --format html のショートカット |
--only-main-content | | メインのコンテンツのみを抽出 |
--wait-for <ms> | | JS のレンダリングを待機する時間 (ミリ秒) |
--screenshot | | スクリーンショットを撮影 |
--full-page-screenshot | | ページ全体のスクリーンショットを撮影 |
--include-tags <tags> | | 含める HTML タグ (カンマ区切り) |
--exclude-tags <tags> | | 除外する HTML タグ (カンマ区切り) |
--schema <json> | | 構造化抽出用の JSONスキーマ |
--schema-file <path> | | JSONスキーマ ファイルのパス |
--actions <json> | | スクレイプ中に実行する JSON アクションの配列 |
--actions-file <path> | | JSON アクションファイルのパス |
--proxy <proxy> | | スクレイピング用のプロキシモード (例: auto または basic) |
--output <path> | -o | 出力をファイルに保存 |
--json | | 単一のフォーマット指定でも JSON 出力を強制 |
--pretty | | JSON 出力を整形して表示 |
--timing | | リクエストのタイミングやその他の有用な情報を表示 |
ウェブ検索を行い、必要に応じて結果をスクレイピングします。
# ウェブを検索する
firecrawl search "web scraping tutorials"
# 結果数を制限する
firecrawl search "AI news" --limit 10
# 結果を整形して表示する
firecrawl search "machine learning" --pretty
# Search specific sources
firecrawl search "AI" --sources web,news,images
# Search with category filters
firecrawl search "react hooks" --categories github
firecrawl search "machine learning" --categories research,pdf
# Time-based filtering
firecrawl search "tech news" --tbs qdr:h # Last hour
firecrawl search "tech news" --tbs qdr:d # Last day
firecrawl search "tech news" --tbs qdr:w # Last week
firecrawl search "tech news" --tbs qdr:m # 過去1ヶ月
firecrawl search "tech news" --tbs qdr:y # Last year
# Location-based search
firecrawl search "restaurants" --location "Berlin,Germany" --country DE
# Search and scrape results
firecrawl search "documentation" --scrape --scrape-formats markdown
# Save to file
firecrawl search "firecrawl" --pretty -o results.json
利用可能なオプション:
| オプション | 説明 |
|---|
--limit <number> | 最大結果数 (デフォルト: 5、最大: 100) |
--sources <sources> | 検索対象のソース: web、images、news (カンマ区切り) |
--categories <categories> | カテゴリでフィルタリング: github、research、pdf (カンマ区切り) |
--tbs <value> | 時間フィルタ: qdr:h (時間) 、qdr:d (日) 、qdr:w (週) 、qdr:m (月) 、qdr:y (年) |
--location <location> | ジオターゲティング (例: “Berlin,Germany”) |
--country <code> | ISO 国コード (デフォルト: US) |
--timeout <ms> | タイムアウト (ミリ秒単位、デフォルト: 60000) |
--ignore-invalid-urls | 他の Firecrawl エンドポイントで利用できない URL を除外 |
--scrape | 検索結果をスクレイピング |
--scrape-formats <formats> | スクレイピングしたコンテンツのフォーマット (デフォルト: markdown) |
--only-main-content | スクレイピング時にメインコンテンツのみを含める (デフォルト: true) |
--json | JSON として出力 |
--output <path> | 出力をファイルに保存 |
--pretty | JSON 出力を見やすく整形して表示 |
ウェブサイト内のすべてのURLを迅速に検出します。
# ウェブサイト上のすべてのURLを検出
firecrawl map https://example.com
# Output as JSON
firecrawl map https://example.com --json
# Limit number of URLs
firecrawl map https://example.com --limit 500
# Filter URLs by search query
firecrawl map https://example.com --search "blog"
# Include subdomains
firecrawl map https://example.com --include-subdomains
# Control sitemap usage
firecrawl map https://example.com --sitemap include # Use sitemap
firecrawl map https://example.com --sitemap skip # Skip sitemap
firecrawl map https://example.com --sitemap only # サイトマップのみを使用
# Ignore query parameters (dedupe URLs)
firecrawl map https://example.com --ignore-query-parameters
# Wait for map to complete with timeout
firecrawl map https://example.com --wait --timeout 60
# Save to file
firecrawl map https://example.com -o urls.txt
firecrawl map https://example.com --json --pretty -o urls.json
利用可能なオプション:
| オプション | 説明 |
|---|
--url <url> | マッピング対象の URL (位置引数の代替) |
--limit <number> | 検出する最大 URL 数 |
--search <query> | 検索クエリで URL を絞り込み |
--sitemap <mode> | サイトマップの処理モード: include, skip, only |
--include-subdomains | サブドメインを含める |
--ignore-query-parameters | クエリパラメータが異なる URL を同一として扱う |
--wait | マップ処理の完了を待機 |
--timeout <seconds> | タイムアウト時間 (秒) |
--json | JSON 形式で出力 |
--output <path> | 出力をファイルに保存 |
--pretty | JSON 出力を整形して表示 |
ページをスクレイピングした後、自然言語またはコードで操作できます。Interact は既定で最新のスクレイピング結果を使用しますが、特定のスクレイプ ID を指定することもできます。
# 1. AmazonのホームページをスクレイピングするスクレイピングIDは自動的に保存されます)
firecrawl scrape https://www.amazon.com
# 2. 操作する — 商品を検索して価格を取得する
firecrawl interact "Search for iPhone 16 Pro Max"
firecrawl interact "Click on the first result and tell me the price"
# 3. セッションを停止する
firecrawl interact stop
利用可能なオプション:
| Option | Description |
|---|
-p, --prompt <text> | AI プロンプト (位置引数の代わりに指定) |
-c, --code <code> | ライブページセッションで実行するコード |
-s, --scrape-id <id> | スクレイプジョブ ID (既定: 最新のスクレイピング) |
--python | Python/Playwright としてコードを実行 |
--node | Node.js/Playwright としてコードを実行 (既定) |
--bash | Bash としてコードを実行 |
--timeout <seconds> | タイムアウト (秒、1~300、既定: 30) |
--output <path> | 出力をファイルに保存 |
--json | JSON 形式で出力 |
指定した URL を起点に、ウェブサイト全体をクロールします。
# Start a crawl (returns job ID immediately)
firecrawl crawl https://example.com
# Wait for crawl to complete
firecrawl crawl https://example.com --wait
# 進行状況インジケーター付きで待機
firecrawl crawl https://example.com --wait --progress
# ジョブIDを使用してクロールステータスを確認
firecrawl crawl <job-id>
# 実際のジョブIDの例
firecrawl crawl 550e8400-e29b-41d4-a716-446655440000
# Limit crawl depth and pages
firecrawl crawl https://example.com --limit 100 --max-depth 3 --wait
# Include only specific paths
firecrawl crawl https://example.com --include-paths /blog,/docs --wait
# Exclude specific paths
firecrawl crawl https://example.com --exclude-paths /admin,/login --wait
# Include subdomains
firecrawl crawl https://example.com --allow-subdomains --wait
# Crawl entire domain
firecrawl crawl https://example.com --crawl-entire-domain --wait
# Rate limiting
firecrawl crawl https://example.com --delay 1000 --max-concurrency 2 --wait
# クロールされた各ページにスクレイピングのオプションを渡す
firecrawl crawl https://example.com --scrape-options '{"formats":["markdown"],"onlyMainContent":true}'
# クロール完了イベントをwebhookに送信する
firecrawl crawl https://example.com --webhook '{"url":"https://example.com/webhook","events":["completed"]}'
# アクティブなクロールをキャンセルする
firecrawl crawl <job-id> --cancel
# カスタムポーリング間隔とタイムアウト
firecrawl crawl https://example.com --wait --poll-interval 10 --timeout 300
# Save results to file
firecrawl crawl https://example.com --wait --pretty -o results.json
利用可能なオプション:
| Option | Description |
|---|
--url <url> | クロールするURL (位置引数の代わり) |
--wait | クロールの完了を待機 |
--progress | 待機中に進行状況インジケーターを表示 |
--poll-interval <seconds> | ポーリング間隔 (デフォルト: 5) |
--timeout <seconds> | 待機時のタイムアウト時間 |
--status | 既存のクロールジョブのステータスを確認 |
--limit <number> | クロールする最大ページ数 |
--max-depth <number> | クロールの最大深さ |
--include-paths <paths> | 含めるパス (カンマ区切り) |
--exclude-paths <paths> | 除外するパス (カンマ区切り) |
--sitemap <mode> | サイトマップの処理モード: include、skip、only |
--allow-subdomains | サブドメインも対象に含める |
--allow-external-links | 外部リンクをたどる |
--crawl-entire-domain | ドメイン全体をクロール |
--ignore-query-parameters | クエリパラメーターが異なるURLを同一として扱う |
--delay <ms> | リクエスト間の遅延時間 |
--max-concurrency <n> | 最大同時リクエスト数 |
--scrape-options <json> | 各ページに渡すスクレイピングのオプションのJSON |
--scrape-options-file <path> | スクレイピングのオプションのJSONファイルへのパス |
--webhook <url-or-json> | webhook のURLまたは設定 |
--cancel | ジョブIDを指定してアクティブなクロールジョブをキャンセル |
--output <path> | 出力をファイルに保存 |
--pretty | JSON出力を整形して表示 |
自然言語プロンプトを使用して、Web上からデータを検索・収集します。
# 基本的な使い方 - URLは省略可能
firecrawl agent "Find the top 5 AI startups and their funding amounts" --wait
# Focus on specific URLs
firecrawl agent "Compare pricing plans" --urls https://slack.com/pricing,https://teams.microsoft.com/pricing --wait
# Use a schema for structured output
firecrawl agent "Get company information" --urls https://example.com --schema '{"type":"object","properties":{"name":{"type":"string"},"founded":{"type":"number"}}}' --wait
# Use schema from a file
firecrawl agent "Get product details" --urls https://example.com --schema-file schema.json --wait
# より高精度な結果を得るにはSpark 1 Proを使用
firecrawl agent "Competitive analysis across multiple domains" --model spark-1-pro --wait
# Set max credits to limit costs
firecrawl agent "Gather contact information from company websites" --max-credits 100 --wait
# Check status of an existing job
firecrawl agent <job-id> --status
# エージェントイベントをwebhookに送信
firecrawl agent "Extract product details" --urls https://example.com --webhook '{"url":"https://example.com/webhook","events":["completed","failed"]}'
# 実行中のエージェントジョブをキャンセル
firecrawl agent <job-id> --cancel
# Custom polling interval and timeout
firecrawl agent "Summarize recent blog posts" --wait --poll-interval 10 --timeout 300
# Save output to file
firecrawl agent "Find pricing information" --urls https://example.com --wait -o pricing.json --pretty
利用可能なオプション:
| Option | Description |
|---|
--urls <urls> | エージェントが対象とするURLの任意のリスト (カンマ区切り) |
--model <model> | 使用するモデル: spark-1-mini (デフォルト、60%安価) または spark-1-pro (高精度) |
--schema <json> | 構造化出力用のJSONスキーマ (インラインJSON文字列) |
--schema-file <path> | 構造化出力用のJSONスキーマファイルへのパス |
--max-credits <number> | 消費するクレジットの上限 (上限に達するとジョブは失敗) |
--webhook <url-or-json> | webhook URLまたは設定 |
--status | 既存のエージェントジョブのステータスを確認 |
--cancel | ジョブ ID を指定して実行中のエージェントジョブをキャンセル |
--wait | 結果を返す前にエージェントの完了を待つ |
--poll-interval <seconds> | 待機中のポーリング間隔 (デフォルト: 5) |
--timeout <seconds> | 待機時のタイムアウト (デフォルト: タイムアウトなし) |
--output <path> | 出力をファイルに保存 |
--json | JSON形式で出力 |
チームのクレジット残高と利用状況を確認できます。
# クレジット使用量を確認
firecrawl credit-usage
# JSON形式で出力
firecrawl credit-usage --json --pretty
CLIのバージョンを表示します。
firecrawl version
# または
firecrawl --version
これらのオプションはすべてのコマンドで利用できます。
| オプション | 短縮形 | 説明 |
|---|
--status | | バージョン、認証情報、同時実行数、クレジット残高を表示する |
--api-key <key> | -k | このコマンドで使用する API キーを、保存されているキーより優先して指定する |
--api-url <url> | | カスタム API URL を使用する (セルフホスト環境/ローカル開発向け) |
--help | -h | コマンドのヘルプを表示する |
--version | -V | CLI のバージョン情報を表示する |
CLI はデフォルトで標準出力 (stdout) に出力するため、パイプやリダイレクトが容易です。
# マークダウンを別のコマンドにパイプする
firecrawl https://example.com | head -50
# ファイルにリダイレクトする
firecrawl https://example.com > output.md
# 整形されたJSON形式で保存する
firecrawl https://example.com --format markdown,links --pretty -o data.json
- 単一フォーマット: 生のコンテンツを出力します(markdown テキスト、HTML など)
- 複数フォーマット: 要求されたすべてのデータを含む JSON を出力します
# Raw markdown output
firecrawl https://example.com --format markdown
# 複数フォーマットを使用したJSON出力
firecrawl https://example.com --format markdown,links
# URLからMarkdownコンテンツを取得(クリーンな出力には --only-main-content を使用)
firecrawl https://docs.firecrawl.dev --only-main-content
# Get HTML content
firecrawl https://example.com --html -o page.html
# 制限付きでドキュメントサイトをクロールする
firecrawl crawl https://docs.example.com --limit 50 --max-depth 2 --wait --progress -o docs.json
# すべてのブログ投稿を検索
firecrawl map https://example.com --search "blog" -o blog-urls.txt
# リサーチ用の検索とスクレイピング結果
firecrawl search "machine learning best practices 2024" --scrape --scrape-formats markdown --pretty
# URLs are optional
firecrawl agent "Find the top 5 AI startups and their funding amounts" --wait
# 特定のURLを対象にする
firecrawl agent "Compare pricing plans" --urls https://slack.com/pricing,https://teams.microsoft.com/pricing --wait
# Extract URLs from search results
jq -r '.data.web[].url' search-results.json
# Get titles from search results
jq -r '.data.web[] | "\(.title): \(.url)"' search-results.json
# リンクを抽出してjqで処理
firecrawl https://example.com --format links | jq '.links[].url'
# Count URLs from map
firecrawl map https://example.com | wc -l
CLI は、製品の改善のために認証時に匿名の利用状況データを収集します:
- CLI バージョン、OS、Node.js バージョン
- 開発ツールの検出(例:Cursor、VS Code、Claude Code)
CLI を通じてコマンド内容、URL、ファイル内容が収集されることは一切ありません。
テレメトリーを無効にするには、次の環境変数を設定します:
export FIRECRAWL_NO_TELEMETRY=1
Firecrawl CLI と スキル はオープンソースで、GitHub で公開されています: firecrawl/cli
Firecrawl API キーが必要な AI エージェントですか? 自動オンボーディング手順については、firecrawl.dev/agent-onboarding/SKILL.md を参照してください。