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

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

任意のウェブサイトを、1 回の API コールでクリーンな LLM 向けデータに変換できます。 Firecrawlスキルは、エージェントがFirecrawlを見つけて利用できるようにする最速の方法です。これがない場合、エージェントはFirecrawlが利用可能であることを認識できません。
npx skills add firecrawl/cli
スキルのインストール後に、エージェントを再起動してください。セットアップ方法の詳細は Skill + CLI を参照してください。

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

以下のコードをコピーし、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 レンダリング、動的コンテンツまでカバー
  • 高い信頼性: プロダクション向けに構築されており、高い稼働率と一貫した結果を提供
  • 高速: 秒単位で結果を返し、高スループット向けに最適化

スクレイピング

任意の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/mendableai/firecrawl",
        "title": "mendableai/firecrawl: サイト全体をLLM対応に変換する ... - GitHub",
        "description": "FirecrawlはURLを受け取り、クロールして、クリーンなMarkdownまたは構造化データに変換するAPIサービスです。",
        "position": 2
      },
      ...
    ],
    "images": [
      {
        "title": "クイックスタート | 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のスタートアップFirecrawl、従業員としてAIエージェント3名を採用するために100万ドルの予算を用意",
        "url": "https://techcrunch.com/2025/05/17/y-combinator-startup-firecrawl-is-ready-to-pay-1m-to-hire-three-ai-agents-as-employees/",
        "snippet": "現在、YCの求人ボードに「AIエージェントのみ」を対象とした新規求人を3件掲載し、実現のために合計100万ドルの予算を確保しています。",
        "date": "3か月前"
        "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"
    ]
  }
}

リソース