enact-firecrawl
Scrape, crawl, search, and extract structured data from websites using Firecrawl API - converts web pages to LLM-ready markdown
- License 许可
- MIT
- 最近更新
- 2026-04-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- env
- { "FIRECRAWL_API_KEY": { "secret": true, "description": "Your Firecrawl API key from firecrawl.dev" } }
- from
- python:3.12-slim
- name
- enact-firecrawl
- tags
- [ "web-scraping", "crawling", "markdown", "llm", "ai", "data-extraction", "search", "structured-data" ]
- build
- [ "pip install requests" ]
- enact
- 2.0
- command
- python /workspace/firecrawl.py ${action} ${url} ${formats} ${limit} ${only_main_content} ${prompt} ${schema}
- license
- MIT
- timeout
- 300s
- version
- 1.2.1
- examples
- [ { "input": { "url": "https://example.com", "action": "scrape" }, "description": "Scrape a single page and get markdown" }, { "input": { "url": "https://docs.example.com", "limit": 5, "action": "crawl" }, "description": "Crawl a documentation site (up to 5 pages)" }, { "input": { "url": "https://example.com", "action": "map" }, "description": "Get all URLs from a website" }, { "input": { "url": "latest AI news", "limit": 5, "action": "search" }, "description": "Search the web and get scraped results" }, { "input": { "url": "https://news.ycombinator.com", "action": "extract", "prompt": "Extract the top 5 news headlines with their URLs and point counts" }, "description": "Extract structured data from a page using AI" } ]
- annotations
- { "readOnlyHint": true, "openWorldHint": true }
- description
- Scrape, crawl, search, and extract structured data from websites using Firecrawl API - converts web pages to LLM-ready markdown
- inputSchema
- { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "description": "The URL to process (for scrape, crawl, map, extract) or search query (for search action)" }, "limit": { "type": "integer", "default": 10, "description": "Maximum number of pages to crawl (crawl action) or search results to return (search action)" }, "action": { "enum": [ "scrape", "crawl", "map", "search", "extract" ], "type": "string", "default": "scrape", "description": "The action to perform:\n- scrape: Extract content from a single URL\n- crawl: Discover and scrape all subpages of a website\n- map: Get all URLs from a website (fast discovery)\n- search: Search the web and get scraped results\n- extract: Extract structured data using AI\n" }, "prompt": { "type": "string", "default": "", "description": "Multi-purpose field:\n- For map: Search query to filter URLs\n- For extract: Natural language instruction for what to extract\n" }, "schema": { "type": "string", "default": "", "description": "JSON schema string for structured extraction (extract action only). Define the shape of data you want to extract." }, "formats": { "type": "string", "default": "markdown", "description": "Comma-separated output formats (markdown, html, links, screenshot). Used by scrape and crawl actions." }, "only_main_content": { "type": "boolean", "default": true, "description": "Extract only the main content, excluding headers, navs, footers (scrape action)" } } }
- outputSchema
- { "type": "object", "properties": { "url": { "type": "string", "description": "The URL or query that was processed" }, "data": { "type": "object", "description": "The scraped/crawled/extracted data including markdown, metadata, and structured content" }, "error": { "type": "string", "description": "Error message if the operation failed" }, "action": { "type": "string", "description": "The action that was performed" }, "success": { "type": "boolean", "description": "Whether the operation succeeded" } } }
02 资源文件 2
- 脚本firecrawl.py7.0 KB
- 参考文档skill-report.json9.4 KB
03 SKILL.md 正文
Firecrawl Web Scraping Tool
A powerful web scraping tool that uses the Firecrawl API to convert websites into clean, LLM-ready markdown and extract structured data.
Features
- Scrape: Extract content from a single URL as markdown, HTML, or with screenshots
- Crawl: Automatically discover and scrape all accessible subpages of a website
- Map: Get a list of all URLs from a website without scraping content (extremely fast)
- Search: Search the web and get full scraped content from results
- Extract: Use AI to extract structured data from pages with natural language prompts
Setup
- Get an API key from firecrawl.dev
- Set your API key as a secret:
enact env set FIRECRAWL_API_KEY <your-api-key> --secret --namespace enact
This stores your API key securely in your OS keyring (macOS Keychain, Windows Credential Manager, or Linux Secret Service).
Usage Examples
CLI
Scrape a single page
enact run enact/firecrawl -a '{"url": "https://example.com", "action": "scrape"}'
Crawl an entire documentation site
enact run enact/firecrawl -a '{"url": "https://docs.example.com", "action": "crawl", "limit": 20}'
Map all URLs on a website
enact run enact/firecrawl -a '{"url": "https://example.com", "action": "map"}'
Search the web
enact run enact/firecrawl -a '{"url": "latest AI developments 2024", "action": "search", "limit": 5}'
Extract structured data with AI
enact run enact/firecrawl -a '{"url": "https://news.ycombinator.com", "action": "extract", "prompt": "Extract the top 10 news headlines with their URLs"}'
Extract with a JSON schema
enact run enact/firecrawl -a '{
"url": "https://example.com/pricing",
"action": "extract",
"prompt": "Extract pricing information",
"schema": "{\"type\":\"object\",\"properties\":{\"plans\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"price\":{\"type\":\"string\"}}}}}}"
}'
MCP (for LLMs/Agents)
When using this tool via MCP, call enact__firecrawl with these parameters:
Scrape a single page
Call with url set to the target URL and action set to "scrape".
Crawl a documentation site
Call with url, action set to "crawl", and limit to control the maximum number of pages.
Map all URLs on a website
Call with url and action set to "map" to discover all URLs without scraping content.
Search the web
Call with url set to your search query (e.g., "latest AI news") and action set to "search". Use limit to control result count.
Extract structured data with AI
Call with url, action set to "extract", and prompt describing what data to extract. Optionally provide a schema for structured output.
Output
The tool returns JSON with:
- markdown: Clean, LLM-ready content
- metadata: Title, description, language, source URL
- extract: Structured data (for extract action)
- links: Discovered URLs (for map action)
API Features
Firecrawl handles the hard parts of web scraping:
- Anti-bot mechanisms
- Dynamic JavaScript content
- Proxies and rate limiting
- PDF and document parsing
- Screenshot capture
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
vue-testing-best-practices
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
vue-router-best-practices
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
vue-pinia-best-practices
Pinia stores, state management patterns, store setup, and reactivity with stores.
vue-options-api-best-practices
Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.
vue-development-guides
A collection of best practices and tips for developing applications using Vue.js. This skill MUST be apply when developing, refactoring or reviewing Vue.js or Nuxt projects.