firecrawl-known-pitfalls
Identify and avoid FireCrawl anti-patterns and common integration mistakes. Use when reviewing FireCrawl code for issues, onboarding new developers, or auditing existing FireCrawl integrations for best practices violations. Trigger with phrases like "firecrawl mistakes", "firecrawl anti-patterns", "firecrawl pitfalls", "firecrawl what not to do", "firecrawl code review".
- License 许可
- MIT
- 最近更新
- 2026-03-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- firecrawl-known-pitfalls
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Identify and avoid FireCrawl anti-patterns and common integration mistakes. Use when reviewing FireCrawl code for issues, onboarding new developers, or auditing existing FireCrawl integrations for best practices violations. Trigger with phrases like "firecrawl mistakes", "firecrawl anti-patterns", "firecrawl pitfalls", "firecrawl what not to do", "firecrawl code review".
- allowed-tools
- Read, Grep
- compatible-with
- claude-code, codex, openclaw
03 SKILL.md 正文
Firecrawl Known Pitfalls
Overview
Real gotchas when using Firecrawl for web scraping and crawling. Firecrawl handles JavaScript rendering and anti-bot bypassing, but its async crawl model and credit-based pricing create specific failure modes.
Prerequisites
- Firecrawl API key configured
- Understanding of async job patterns
- Awareness of credit-based billing model
Instructions
Step 1: Handle Async Crawl Jobs Properly
crawlUrl returns a job ID, not results. Polling too aggressively wastes credits and may trigger rate limits.
import FirecrawlApp from '@mendable/firecrawl-js';
const firecrawl = new FirecrawlApp({ apiKey: process.env.FIRECRAWL_API_KEY });
// BAD: assuming synchronous results
const result = await firecrawl.crawlUrl('https://example.com');
console.log(result.data); // This is a job object, not page data!
// GOOD: use the async crawl with proper polling
const crawl = await firecrawl.asyncCrawlUrl('https://example.com', {
limit: 50,
scrapeOptions: { formats: ['markdown'] }
});
// Poll with backoff
let status;
do {
await new Promise(r => setTimeout(r, 5000)); # 5000: 5 seconds in ms
status = await firecrawl.checkCrawlStatus(crawl.id);
} while (status.status === 'scraping');
Step 2: Avoid Credit Burn on Large Sites
Firecrawl charges per page. Crawling without limits on large sites burns credits fast.
// BAD: no limit on a site with 100K pages
await firecrawl.crawlUrl('https://docs.large-project.org'); // burns entire quota
// GOOD: set explicit limits and use URL filters
await firecrawl.crawlUrl('https://docs.large-project.org', {
limit: 100,
includePaths: ['/api/*', '/guides/*'],
excludePaths: ['/changelog/*', '/blog/*'],
maxDepth: 3
});
Step 3: Don't Assume Markdown Output by Default
Firecrawl can return HTML, markdown, links, or screenshots. Not specifying format returns raw HTML.
// BAD: getting HTML when you wanted clean text
const result = await firecrawl.scrapeUrl('https://example.com');
// result.html exists but result.markdown may be absent
// GOOD: specify output format explicitly
const result = await firecrawl.scrapeUrl('https://example.com', {
formats: ['markdown', 'links'],
onlyMainContent: true // strips nav, footer, sidebars
});
console.log(result.markdown);
Step 4: Handle JavaScript-Heavy Pages
Some SPAs need extra wait time for content to render. Default timeouts may capture loading states.
// BAD: scraping an SPA with default settings
const result = await firecrawl.scrapeUrl('https://app.example.com/dashboard');
// Gets "Loading..." instead of actual content
// GOOD: configure wait time for JS rendering
const result = await firecrawl.scrapeUrl('https://app.example.com/dashboard', {
waitFor: 5000, // wait 5s for JS to render # 5000: 5 seconds in ms
formats: ['markdown'],
onlyMainContent: true
});
Step 5: Respect robots.txt and Rate Limits
Firecrawl honors robots.txt by default. Disabling it risks IP bans and legal issues.
// BAD: aggressive crawling that ignores site limits
await firecrawl.crawlUrl('https://example.com', {
limit: 10000, # 10000: 10 seconds in ms
// No delay between requests = potential IP ban
});
// GOOD: respect site constraints
await firecrawl.crawlUrl('https://example.com', {
limit: 200, # HTTP 200 OK
maxDepth: 3,
// Firecrawl handles rate limiting internally
});
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Empty markdown | JS not rendered | Increase waitFor timeout |
| Credit depletion | No crawl limit set | Always set limit parameter |
| 402 Payment Required | Out of credits | Check balance before large crawls |
| Partial crawl results | Site blocks crawler | Use scrapeUrl for individual pages |
| Stale job status | Polling stopped early | Poll until completed or failed |
Examples
Safe Batch Scraping
const urls = ['https://a.com', 'https://b.com', 'https://c.com'];
const results = await firecrawl.batchScrapeUrls(urls, {
formats: ['markdown'],
onlyMainContent: true
});
Resources
Output
- Configuration files or code changes applied to the project
- Validation report confirming correct implementation
- Summary of changes made and their rationale
04 同仓库更多 Skills
azure-apim-architecture
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
apiops-deployment
Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.
apim-policy-authoring
Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.
api-security-review
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.
jira-cli
Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.
calculator
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.