メインコンテンツへスキップ

最初のウェブサイトをスクレイピングする

任意のウェブサイトを、1 回の API コールでクリーンな LLM 向けデータに変換できます。 Firecrawlスキルは、エージェントがFirecrawlを見つけて利用できるようにする最速の方法です。これがない場合、エージェントはFirecrawlが利用可能であることを認識できません。
npx -y firecrawl-cli@latest init --all --browser
スキルのインストール後に、エージェントを再起動してください。セットアップ方法の詳細は Skill + CLI を参照してください。
または MCP Server を使用して、Firecrawl を Claude、Cursor、Windsurf、VS Code などの AI ツールに直接接続することもできます。

最初のリクエストを送信する

以下のコードをコピーし、fc-YOUR-API-KEY を自分の API キーに置き換えて実行してください:
curl -X POST 'https://api.firecrawl.dev/v2/scrape' \
  -H 'Authorization: Bearer fc-YOUR-API-KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://example.com"}'
{
  "success": true,
  "data": {
    "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...",
    "metadata": {
      "title": "Example Domain",
      "sourceURL": "https://example.com"
    }
  }
}

Firecrawl でできること

なぜ Firecrawl なのか?

  • LLM 向けの出力: クリーンな Markdown、構造化 JSON、スクリーンショットなどを生成
  • 面倒な処理もまとめて対応: プロキシ、ボット対策、JavaScript レンダリング、動的コンテンツまでカバー
  • 高い信頼性: プロダクション向けに構築されており、高い稼働率と一貫した結果を提供
  • 高速: 秒単位で結果を返し、高スループット向けに最適化
  • ブラウザサンドボックス: エージェント向けの完全マネージドなブラウザ環境で、設定不要・任意の規模にスケール可能
  • MCP Server: Model Context Protocol 経由で、任意の AI ツールに Firecrawl を接続

スクレイピング

任意のURLをスクレイプして、そのコンテンツをMarkdown、HTML、その他さまざまなフォーマットで取得できます。すべてのオプションについては Scrape 機能ドキュメント を参照してください。
from firecrawl import Firecrawl

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

# ウェブサイトをスクレイピングする:
doc = firecrawl.scrape("https://firecrawl.dev", formats=["markdown", "html"])
print(doc)
SDKはデータオブジェクトを直接返します。cURLは以下のとおり、ペイロードをそのまま返します。
{
  "success": true,
  "data" : {
    "markdown": "Launch Week I が開幕![2日目のリリースを見る 🚀](https://www.firecrawl.dev/blog/launch-week-i-day-2-doubled-rate-limits)[💥 2か月無料をゲット...",
    "html": "<!DOCTYPE html><html lang=\"en\" class=\"light\" style=\"color-scheme: light;\"><body class=\"__variable_36bd41 __variable_d7dc5d font-inter ...",
    "metadata": {
      "title": "ホーム - Firecrawl",
      "description": "Firecrawl は、あらゆるウェブサイトをクリーンな Markdown にクロールして変換します。",
      "language": "en",
      "keywords": "Firecrawl,Markdown,データ,Mendable,Langchain",
      "robots": "follow, index",
      "ogTitle": "Firecrawl",
      "ogDescription": "あらゆるウェブサイトを LLM で使えるデータに変換。",
      "ogUrl": "https://www.firecrawl.dev/",
      "ogImage": "https://www.firecrawl.dev/og.png?123",
      "ogLocaleAlternate": [],
      "ogSiteName": "Firecrawl"
      "sourceURL": "https://firecrawl.dev",
      "statusCode": 200
    }
  }
}
Firecrawl の検索APIを使うと、ウェブ検索と、必要に応じた検索結果のスクレイピングを1回の操作で実行できます。
  • 出力フォーマット(markdown、HTML、links、screenshots)を選択
  • 取得元のソース(web、news、images)を選択
  • カスタマイズ可能なパラメータ(location など)でウェブを検索
詳細は Search Endpoint API Reference を参照してください。
from firecrawl import Firecrawl

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

results = firecrawl.search(
    query="Firecrawl",
    limit=3,
)
print(results)
SDK は data オブジェクトをそのまま返します。cURL では完全なペイロードが返されます。
JSON
{
  "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
      },
      ...
    ]
  }
}

Agent

Firecrawl の Agent は、自律的なウェブデータ収集ツールです。必要なデータを自然文で指示するだけで、ウェブ上を検索・移動し、任意のサイトからデータを抽出します。利用可能なオプションの詳細は Agent 機能ドキュメント を参照してください。
curl -X POST 'https://api.firecrawl.dev/v2/agent' \
  -H 'Authorization: Bearer fc-YOUR-API-KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "Find the pricing plans for Notion"
  }'
{
  "success": true,
  "data": {
    "result": "Notion offers the following pricing plans:\n\n1. **Free** - $0/month - For individuals...\n2. **Plus** - $10/seat/month - For small teams...\n3. **Business** - $18/seat/month - For companies...\n4. **Enterprise** - Custom pricing - For large organizations...",
    "sources": [
      "https://www.notion.so/pricing"
    ]
  }
}

リソース