Documentation Index
Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt
Use this file to discover all available pages before exploring further.
Why switch?
ScrapeGraph v2 offers AI-powered scraping, extraction, search, crawling, and first-class scheduled monitoring through a unified API. If you’re coming from Firecrawl, this page maps every endpoint, SDK method, and concept to its ScrapeGraph equivalent so you can migrate quickly.Feature comparison at a glance
| Capability | Firecrawl | ScrapeGraph v2 |
|---|---|---|
| Single-page scrape (markdown, html, screenshot…) | POST /v2/scrape | POST /api/scrape |
| Structured extraction (prompt + schema) | POST /v2/extract | POST /api/extract |
| Web search with optional extraction | POST /v2/search | POST /api/search |
| Async multi-page crawl | POST /v2/crawl → GET /v2/crawl/{id} | POST /api/crawl → GET /api/crawl/{id} |
| URL discovery (sitemap + links) | POST /v2/map | Use crawl.start with patterns, or the legacy sitemap endpoint |
| Batch scrape a list of URLs | POST /v2/batch/scrape | Loop over scrape, or use crawl.start with a URL list |
| Change tracking | changeTracking format on scrape/crawl | First-class monitor resource with cron scheduling (POST /api/monitor) |
| Browser interactions before scrape | actions array on /v2/scrape | fetchConfig (mode="js", stealth, wait) on scrape/extract |
Authentication
| Firecrawl | ScrapeGraph v2 | |
|---|---|---|
| Header | Authorization: Bearer fc-... | SGAI-APIKEY: sgai-... |
| Env var | FIRECRAWL_API_KEY | SGAI_API_KEY |
| Base URL | https://api.firecrawl.dev/v2 | https://v2-api.scrapegraphai.com/api |
SDK installation
| Firecrawl | ScrapeGraph v2 | |
|---|---|---|
| Python | pip install firecrawl-py | pip install scrapegraph-py (≥ 2.1.0, Python ≥ 3.12) |
| Node.js | npm i @mendable/firecrawl-js | npm i scrapegraph-js (≥ 2.1.0, Node ≥ 22) |
| CLI | npm i -g firecrawl | npm i -g just-scrape |
| MCP server | Available | pip install scrapegraph-mcp |
Migration checklist
# Remove Firecrawl
pip uninstall firecrawl-py # Python
npm uninstall @mendable/firecrawl-js # Node.js
# Install ScrapeGraph
pip install -U "scrapegraph-py>=2.1.0" # Python (3.12+)
npm install scrapegraph-js@latest # Node.js (22+)
Get your API key from the dashboard.
Firecrawl’s
scrape fetches a page in one or more formats. ScrapeGraph’s scrape mirrors that, with typed format configs in Python and plain objects in JS.Firecrawl accepts a list of URLs or wildcards in one call. On ScrapeGraph, call
extract per URL or use crawl.start to discover pages first.Firecrawl’s
crawl() blocks until completion; start_crawl() returns a job id. ScrapeGraph’s crawl is always async — start, then poll (or stop/resume).Firecrawl’s
/map returns a list of URLs quickly. ScrapeGraph doesn’t have a one-shot map; use crawl.start with pattern filters to discover URLs, or call the legacy sitemap endpoint if that fits your use case.For batch scraping, iterate
scrape calls (run them concurrently for speed), or crawl.start with a seed list.Firecrawl ships change tracking as a
changeTracking format bolted onto scrape/crawl. ScrapeGraph makes monitoring a first-class resource with cron scheduling and history.The ScrapeGraph Python and JS SDKs wrap every response in an
ApiResult — no exceptions to catch on HTTP errors. Check status before reading data:result = sgai.extract("...", url="https://example.com")
if result.status == "success":
data = result.data.json_data
else:
print(f"Error: {result.error}")
const result = await sgai.extract({ url: "https://example.com", prompt: "..." });
if (result.status === "success") {
console.log(result.data?.json);
} else {
console.error(result.error);
}
Direct HTTP callers (curl, fetch) receive the unwrapped response body — the envelope is applied client-side by the SDKs.