Execute FireCrawl major re-architecture and migration strategies with strangler fig pattern.
Use when migrating to or from FireCrawl, performing major version upgrades,
or re-platforming existing integrations to FireCrawl.
Trigger with phrases like "migrate firecrawl", "firecrawl migration",
"switch to firecrawl", "firecrawl replatform", "firecrawl upgrade major".
Migrate from custom scraping (Puppeteer, Playwright, Cheerio) or competing APIs to Firecrawl. Firecrawl eliminates browser management, anti-bot handling, and JS rendering infrastructure. This skill shows equivalent code for common scraping patterns.
Migration Comparison
Feature
Puppeteer/Playwright
Cheerio
Firecrawl
JS rendering
Manual browser
No
Automatic
Anti-bot bypass
DIY (stealth plugin)
No
Built-in
Output format
Raw HTML
Parsed HTML
Markdown/JSON/HTML
Infrastructure
Browser instances
None
API call
Concurrent scraping
Manage browser pool
Simple
Managed by Firecrawl
Cost model
Compute (CPU/RAM)
Free
Credits per page
Instructions
Step 1: Replace Puppeteer Single-Page Scrape
// BEFORE: Puppeteer (20+ lines, browser management)
import puppeteer from "puppeteer";
async function scrapePuppeteer(url: string) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url, { waitUntil: "networkidle2" });
const html = await page.content();
const title = await page.title();
await browser.close();
return { html, title };
}
// AFTER: Firecrawl (5 lines, no browser needed)
import FirecrawlApp from "@mendable/firecrawl-js";
const firecrawl = new FirecrawlApp({ apiKey: process.env.FIRECRAWL_API_KEY! });
async function scrapeFirecrawl(url: string) {
const result = await firecrawl.scrapeUrl(url, {
formats: ["markdown"],
onlyMainContent: true,
waitFor: 2000,
});
return { markdown: result.markdown, title: result.metadata?.title };
}