Community研究與資料分析github.com

ComposioHQ/Firecrawl-自動化

透過 Composio 的 Firecrawl 整合來自動化網頁爬取與資料擷取——您可以輕鬆地抓取頁面、爬取整站、提取結構化資料、批次處理多個 URL 以及繪製網站結構。

Firecrawl-自動化 是什麼?

這個技能讓 Claude Code 能夠直接透過 Composio 的 Firecrawl 整合執行完整的網頁爬取與資料擷取工作流程。它提供了六個核心工具:單頁抓取(支援多種輸出格式與瀏覽器互動)、整站爬取(可自訂深度與路徑篩選)、AI 驅動的結構化資料提取(支援自然語言提示或 JSON Schema)、批次 URL 抓取(高效並行處理)、網站地圖繪製(用於發現與審計),以及非同步任務監控與管理。使用者需要先將 Composio MCP 伺服器連接到 Claude Code,並驗證 Firecrawl 帳戶。此技能對於開發者、研究人員與內容聚合者特別有價值,因為它能夠將網路資料收集無縫整合到 AI 代理的工作流程中,無需在終端機與瀏覽器之間切換。同時,文件中詳細說明了常見陷阱,例如速率限制、點數消耗與 JavaScript 繁重頁面的處理,確保使用者可以避開這些雷區,順利進行大規模爬取任務。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/firecrawl-automation

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Firecrawl 自動化

直接從 Claude Code 執行 Firecrawl 網頁爬取與資料提取。無需離開終端機,即可抓取單頁面、爬取整站、用 AI 提取結構化資料、批次處理 URL 列表以及繪製網站結構。

工具組文件: composio.dev/toolkits/firecrawl


設定

  1. 將 Composio MCP 伺服器加入您的設定中:
    https://rube.app/mcp
    
  2. 依提示連結您的 Firecrawl 帳戶。Agent 會提供一個驗證連結。
  3. 注意點數消耗——精確地設定爬取範圍,並先在小規模 URL 集合上測試,再進行擴展。

核心工作流程

1. 抓取單一頁面

從 URL 取得內容,支援多種格式,並可對動態頁面執行瀏覽器操作。

工具: FIRECRAWL_SCRAPE

關鍵參數:

  • url(必填)——要抓取的完整 URL
  • formats —— 輸出格式:markdown(預設)、html、rawHtml、links、screenshot、json
  • onlyMainContent(預設為 true)——僅提取主要內容,排除導覽列/頁尾/廣告
  • waitFor —— 等待 JS 渲染的毫秒數(預設 0)
  • timeout —— 最大等待毫秒數(預設 30000)
  • actions —— 抓取前的瀏覽器操作(點擊、填入、等待、按鍵、滾動)
  • includeTags / excludeTags —— 依 HTML 標籤篩選
  • jsonOptions —— 搭配 schema 和/或 prompt 進行結構化提取

範例提示:「以 markdown 形式抓取 https://example.com/pricing 的主要內容」


2. 爬取整站

從一個網站發現並抓取多個頁面,可設定深度、路徑篩選器與並行數。

工具: FIRECRAWL_CRAWL_V2

關鍵參數:

  • url(必填)——爬取的起始 URL
  • limit(預設 10)——最大爬取頁數
  • maxDiscoveryDepth —— 從根頁面起的深度限制
  • includePaths / excludePaths —— URL 路徑的正則表達式模式
  • allowSubdomains —— 是否包含子域名(預設 false)
  • crawlEntireDomain —— 跟隨同級/上層連結,而不僅限於子頁面(預設 false)
  • sitemap —— include(預設)、skip 或 only
  • prompt —— 自然語言,用於自動設定爬取器參數
  • scrapeOptions_formats —— 每個頁面的輸出格式
  • scrapeOptions_onlyMainContent —— 每個頁面的主要內容提取

範例提示:「爬取 firecrawl.dev 的文件區段,最多 50 頁,僅限路徑符合 docs 的頁面」


3. 提取結構化資料

使用 AI 搭配自然語言提示或 JSON Schema,從網頁提取結構化的 JSON 資料。

工具: FIRECRAWL_EXTRACT

關鍵參數:

  • urls(必填)——要從中提取的 URL 陣列(beta 版最多 10 個)。支援萬用字元,例如 https://example.com/blog/*
  • prompt —— 自然語言描述要提取的內容
  • schema —— 定義期望輸出結構的 JSON Schema
  • enable_web_search —— 允許爬取初始域名之外的連結(預設 false)

必須至少提供 prompt 或 schema 其中之一。

使用 FIRECRAWL_EXTRACT_GET 搭配返回的 id 來檢查提取狀態。

範例提示:「從 https://example.com/pricing 提取公司名稱、定價方案與功能列表」


4. 批次抓取多個 URL

使用共用設定並行抓取多個 URL,實現高效率的大量資料收集。

工具: FIRECRAWL_BATCH_SCRAPE

關鍵參數:

  • urls(必填)——要抓取的 URL 陣列
  • formats —— 所有頁面的輸出格式(預設 markdown)
  • onlyMainContent(預設 true)——主要內容提取
  • maxConcurrency —— 並行抓取數量限制
  • ignoreInvalidURLs(預設 true)——跳過無效 URL 而不是導致批次失敗
  • location —— 地理定位設定,包含 country 代碼
  • actions —— 套用至每個頁面的瀏覽器操作
  • blockAds(預設 true)——封鎖廣告

範例提示:「批次抓取這 20 個產品頁面 URL,以 markdown 格式輸出,並啟用廣告封鎖」


5. 繪製網站結構

從起始 URL 發現網站上所有的 URL,有助於規劃爬取或審計網站結構。

工具: FIRECRAWL_MAP_MULTIPLE_URLS_BASED_ON_OPTIONS

關鍵參數:

  • url(必填)——起始 URL(必須是 https:// 或 http://)
  • search —— 引導 URL 發現朝向特定頁面類型
  • limit(預設 5000,最大 100000)——返回的最大 URL 數量
  • includeSubdomains(預設 true)——包含子域名
  • ignoreQueryParameters(預設 true)——去除僅因查詢參數不同的重複 URL
  • sitemap —— include、skip 或 only

範例提示:「繪製 docs.example.com 上所有 URL 的地圖,專注於 API 參考頁面」


6. 監控與管理爬取任務

追蹤爬取進度、取得結果,並取消失控的任務。

工具: FIRECRAWL_CRAWL_GET、FIRECRAWL_GET_THE_STATUS_OF_A_CRAWL_JOB、FIRECRAWL_CANCEL_A_CRAWL_JOB

  • FIRECRAWL_CRAWL_GET —— 取得狀態、進度、已使用的點數以及已爬取的頁面資料
  • FIRECRAWL_CANCEL_A_CRAWL_JOB —— 停止一個正在進行或佇列中的爬取任務

兩者都需要在啟動爬取時返回的 id(UUID)。

範例提示:「檢查爬取任務 019b0806-b7a1-7652-94c1-e865b5d2e89a 的狀態」


已知陷阱

  • 速率限制: Firecrawl 可能觸發「Rate limit exceeded」錯誤(429)。建議優先使用 FIRECRAWL_BATCH_SCRAPE 而非多次個別的 FIRECRAWL_SCRAPE 呼叫,並在遇到 429/5xx 回應時實作遞迴退避。
  • 點數消耗: FIRECRAWL_EXTRACT 可能因「Insufficient credits」而失敗。請精確設定範圍,避免使用回傳欄位稀疏的寬泛首頁 URL。先在小規模 URL 集合上測試。
  • 巢狀錯誤回應: 即使外層 API 呼叫成功,每頁的失敗可能巢狀在 response.data.code 中(例如 SCRAPE_DNS_RESOLUTION_ERROR)。務必驗證內層的狀態/錯誤欄位。
  • JS 繁重頁面: 未渲染的擷取可能遺漏關鍵內容。對動態頁面使用 waitFor(例如 1000-5000ms),或設定 scrapeOptions_actions 在抓取前與頁面互動。
  • 提取 Schema 的精確性: 模糊或變動的 schema/prompt 會產生雜亂、不一致的輸出。請固定 schema 並先在小樣本上測試,再擴展到大量 URL。
  • 爬取任務是非同步的: FIRECRAWL_CRAWL_V2 會立即返回一個任務 ID。請使用 FIRECRAWL_CRAWL_GET 輪詢結果。使用 FIRECRAWL_CANCEL_A_CRAWL_JOB 取消卡住的爬取,以避免浪費點數。
  • 提取任務輪詢: FIRECRAWL_EXTRACT 對於較大任務也是非同步的。使用 FIRECRAWL_EXTRACT_GET 取得最終輸出。
  • 提取的 URL 分批處理: 保持提取 URL 批次較小(約 10 個 URL),以避免 429 速率限制錯誤。
  • 深層巢狀回應: 結果通常巢狀在 data.data 或更深層。請檢查返回的形狀,而非假設扁平鍵。

快速參考

工具名稱說明
FIRECRAWL_SCRAPE使用格式/操作選項抓取單一 URL
FIRECRAWL_CRAWL_V2以深度/路徑控制爬取網站
FIRECRAWL_EXTRACT使用 AI 提示/Schema 提取結構化資料
FIRECRAWL_BATCH_SCRAPE並行批次抓取多個 URL
FIRECRAWL_MAP_MULTIPLE_URLS_BASED_ON_OPTIONS發現/繪製網站上所有 URL
FIRECRAWL_CRAWL_GET取得爬取任務狀態與結果
FIRECRAWL_GET_THE_STATUS_OF_A_CRAWL_JOB檢查爬取任務進度
FIRECRAWL_CANCEL_A_CRAWL_JOB取消正在進行的爬取任務
FIRECRAWL_EXTRACT_GET取得提取任務狀態與結果
FIRECRAWL_CRAWL_PARAMS_PREVIEW啟動前預覽爬取參數
FIRECRAWL_SEARCH網頁搜尋 + 抓取前幾筆結果

由 Composio 提供支援

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能