firecrawl
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFirecrawl
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 match
"exact phrase" - - Exclude term
-term - - Limit to domain
site:example.com - - Word in title
intitle:word
搜索网页并获取包含内容的结果。
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
快速参考
| Task | MCP Tool |
|---|---|
| Scrape a page | |
| Crawl a site | |
| Map site URLs | |
| Search the web | |
| Extract data | |
| 任务 | MCP工具 |
|---|---|
| 抓取单个页面 | |
| 爬取整个网站 | |
| 映射网站URL | |
| 网页搜索 | |
| 数据提取 | |
Example Workflows
示例工作流
Research a Topic
主题研究
- Use to find relevant pages
firecrawl_search - Use on the best results for full content
firecrawl_scrape
- 使用查找相关页面
firecrawl_search - 对最佳结果使用获取完整内容
firecrawl_scrape
Analyze a Documentation Site
分析文档网站
- Use to discover all pages
firecrawl_map - Use on specific sections
firecrawl_scrape
- 使用发现所有页面
firecrawl_map - 对特定部分使用进行抓取
firecrawl_scrape
Extract Product Information
提取产品信息
- Use with a prompt describing what to extract
firecrawl_extract - Optionally provide a JSON schema for structured output
- 使用并提供描述提取需求的prompt
firecrawl_extract - (可选)提供JSON Schema以获得结构化输出
Environment Setup
环境配置
The MCP server requires environment variable.
FIRECRAWL_API_KEYGet 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:
- - Set FIRECRAWL_API_KEY in MCP config
API key required - - Check URL format
Invalid URL - - Wait and retry (auto-handled)
Rate limited - - Some sites block scraping
Site blocked
常见错误:
- - 在MCP配置中设置FIRECRAWL_API_KEY
API key required - - 检查URL格式
Invalid 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:
- : Your self-hosted instance URL (e.g.,
FIRECRAWL_API_URL)http://localhost:3002 - No API key needed for self-hosted
如果你在自己的服务器上自托管Firecrawl,请为MCP服务器配置以下内容:
- :你的自托管实例URL(例如:
FIRECRAWL_API_URL)http://localhost:3002 - 自托管版本无需API密钥