firecrawl

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Firecrawl

Firecrawl

Overview

概述

Firecrawl is a powerful web scraping and search API. This skill provides a token-efficient interface for Claude Code through the MCP server integration.
Firecrawl是一款功能强大的网页抓取与搜索API。本技能通过MCP服务器集成,为Claude Code提供了一个高效利用token的接口。

When to Use This Skill

何时使用本技能

  • Scraping: Fetch content from a single URL as markdown
  • Crawling: Crawl entire websites following links
  • Mapping: Discover all URLs on a website
  • Searching: Search the web and optionally scrape results
  • Extracting: Pull structured data from pages using LLM
  • 抓取:从单个URL获取markdown格式的内容
  • 爬取:跟随链接爬取整个网站
  • 映射:发现网站上的所有URL
  • 搜索:搜索网页并可选择抓取结果
  • 提取:使用LLM从页面中提取结构化数据

MCP Server Tools

MCP服务器工具

When the Firecrawl MCP server is configured, you have access to these tools:
当配置好Firecrawl MCP服务器后,你可以使用以下工具:

firecrawl_scrape

firecrawl_scrape

Scrape a single URL and get clean markdown content.
Use: mcp__firecrawl__firecrawl_scrape
Parameters:
  - url: The URL to scrape
  - formats: ["markdown"] (optional)
抓取单个URL并获取干净的markdown内容。
Use: mcp__firecrawl__firecrawl_scrape
Parameters:
  - url: 要抓取的URL
  - formats: ["markdown"] (可选)

firecrawl_crawl

firecrawl_crawl

Crawl a website starting from a URL, following links.
Use: mcp__firecrawl__firecrawl_crawl
Parameters:
  - url: Starting URL
  - maxDepth: How deep to crawl (default: 2)
  - limit: Max pages to crawl
从指定URL开始爬取网站,跟随链接进行遍历。
Use: mcp__firecrawl__firecrawl_crawl
Parameters:
  - url: 起始URL
  - maxDepth: 爬取深度(默认值:2)
  - limit: 最大爬取页面数

firecrawl_map

firecrawl_map

Discover all URLs on a website without scraping content.
Use: mcp__firecrawl__firecrawl_map
Parameters:
  - url: The website URL
  - limit: Max URLs to return (default: 100)
发现网站上的所有URL,但不抓取内容。
Use: mcp__firecrawl__firecrawl_map
Parameters:
  - url: 网站URL
  - limit: 返回的最大URL数量(默认值:100)

firecrawl_search

firecrawl_search

Search the web and get results with content.
Use: mcp__firecrawl__firecrawl_search
Parameters:
  - query: Search query
  - limit: Max results (default: 5)
Supports search operators:
  • "exact phrase"
    - Exact match
  • -term
    - Exclude term
  • site:example.com
    - Limit to domain
  • intitle:word
    - Word in title
搜索网页并获取包含内容的结果。
Use: mcp__firecrawl__firecrawl_search
Parameters:
  - query: 搜索查询词
  - limit: 最大结果数(默认值:5)
支持以下搜索运算符:
  • "exact phrase"
    - 精确匹配
  • -term
    - 排除指定术语
  • site:example.com
    - 限定域名
  • intitle:word
    - 标题中包含指定词汇

firecrawl_extract

firecrawl_extract

Extract structured data from pages using LLM.
Use: mcp__firecrawl__firecrawl_extract
Parameters:
  - urls: Array of URLs to extract from
  - prompt: What to extract
  - schema: JSON Schema for structured output (optional)
使用LLM从页面中提取结构化数据。
Use: mcp__firecrawl__firecrawl_extract
Parameters:
  - urls: 要提取数据的URL数组
  - prompt: 提取需求描述
  - schema: 结构化输出的JSON Schema(可选)

Quick Reference

快速参考

TaskMCP Tool
Scrape a page
firecrawl_scrape
Crawl a site
firecrawl_crawl
Map site URLs
firecrawl_map
Search the web
firecrawl_search
Extract data
firecrawl_extract
任务MCP工具
抓取单个页面
firecrawl_scrape
爬取整个网站
firecrawl_crawl
映射网站URL
firecrawl_map
网页搜索
firecrawl_search
数据提取
firecrawl_extract

Example Workflows

示例工作流

Research a Topic

主题研究

  1. Use
    firecrawl_search
    to find relevant pages
  2. Use
    firecrawl_scrape
    on the best results for full content
  1. 使用
    firecrawl_search
    查找相关页面
  2. 对最佳结果使用
    firecrawl_scrape
    获取完整内容

Analyze a Documentation Site

分析文档网站

  1. Use
    firecrawl_map
    to discover all pages
  2. Use
    firecrawl_scrape
    on specific sections
  1. 使用
    firecrawl_map
    发现所有页面
  2. 对特定部分使用
    firecrawl_scrape
    进行抓取

Extract Product Information

提取产品信息

  1. Use
    firecrawl_extract
    with a prompt describing what to extract
  2. Optionally provide a JSON schema for structured output
  1. 使用
    firecrawl_extract
    并提供描述提取需求的prompt
  2. (可选)提供JSON Schema以获得结构化输出

Environment Setup

环境配置

The MCP server requires
FIRECRAWL_API_KEY
environment variable.
Get your API key from: https://firecrawl.dev
MCP服务器需要设置
FIRECRAWL_API_KEY
环境变量。
从以下地址获取你的API密钥:https://firecrawl.dev

Token Efficiency

Token效率

The MCP tools are designed for minimal token consumption:
  • Scrape: Returns clean markdown
  • Map: Returns URL list only
  • Search: Returns summaries with optional full content
  • Extract: Returns only requested data
MCP工具专为最小化token消耗而设计:
  • 抓取:返回干净的markdown内容
  • 映射:仅返回URL列表
  • 搜索:返回摘要,可选择返回完整内容
  • 提取:仅返回请求的数据

Error Handling

错误处理

Common errors:
  • API key required
    - Set FIRECRAWL_API_KEY in MCP config
  • Invalid URL
    - Check URL format
  • Rate limited
    - Wait and retry (auto-handled)
  • Site blocked
    - Some sites block scraping
常见错误:
  • API key required
    - 在MCP配置中设置FIRECRAWL_API_KEY
  • Invalid URL
    - 检查URL格式
  • Rate limited
    - 等待后重试(自动处理)
  • Site blocked
    - 部分网站会阻止抓取

Pricing Note

定价说明

Firecrawl charges per operation:
  • Scrape: 1 credit per page
  • Map: 1 credit per call
  • Search: 1 credit per result
  • Extract: Varies by complexity
Check https://firecrawl.dev/pricing for current rates.
Firecrawl按操作次数收费:
  • 抓取:每页1个信用点
  • 映射:每次调用1个信用点
  • 搜索:每个结果1个信用点
  • 提取:根据复杂度收费

Self-Hosted Option

自托管选项

If you have Firecrawl self-hosted on your server, configure the MCP server with:
  • FIRECRAWL_API_URL
    : Your self-hosted instance URL (e.g.,
    http://localhost:3002
    )
  • No API key needed for self-hosted
如果你在自己的服务器上自托管Firecrawl,请为MCP服务器配置以下内容:
  • FIRECRAWL_API_URL
    :你的自托管实例URL(例如:
    http://localhost:3002
  • 自托管版本无需API密钥