Firecrawl API guide

Choose the endpoint that matches the web data job.

Firecrawl Space is an independent guide. Use official Firecrawl docs as the canonical implementation source before shipping production code.

EndpointUse whenOutput fitProduction checks
SearchThe job starts with a query and needs sources.Search results plus page content for agent context.Log query, source URLs, ranking assumptions, and freshness.
ScrapeYou know the URL and need clean content.Markdown, HTML, screenshot, metadata, or structured JSON.Validate allowed URLs, empty states, redirects, and schema drift.
CrawlYou need many pages from one site.Async job with page-level documents.Set limits, respect robots and policies, monitor job status, dedupe URLs.
MapYou need URL discovery before extraction.Candidate links with titles and descriptions where available.Filter admin, account, duplicate, and low-value paths before crawling.
Batch scrapeYou already have a URL list.Async extraction over known targets.Track per-URL status, retry policy, and partial failure handling.
AgentThe task is research-like and does not start with a fixed URL.Natural-language result with sources, optionally schema-shaped.Keep source citations, model choice, prompt, and audit notes.
InteractA page requires clicking, typing, scrolling, or waiting before extraction.Post-action scrape result and live interaction context.Avoid private areas, consent barriers, and fragile selectors.

Starter code shape

import { Firecrawl } from 'firecrawl';

const app = new Firecrawl({ apiKey: process.env.FIRECRAWL_API_KEY });
const doc = await app.scrape('https://example.com', {
  formats: ['markdown'],
});

console.log(doc.metadata?.sourceURL, doc.markdown?.slice(0, 500));

Output design

  • Use Markdown for LLM context and citations.
  • Use schema JSON for repeatable extraction and tables.
  • Use screenshots when visual state is part of the evidence.
  • Keep source URL, crawl time, task prompt, and output format together.
Source notes: official API reference at docs.firecrawl.dev, GitHub repository github.com/firecrawl/firecrawl, and official hosted service firecrawl.dev. These are source facts, not outbound purchase links.
Brand note: Firecrawl Space is independent and unofficial. Do not present local examples as official Firecrawl pricing, uptime, or support commitments.