Skip to main content

Firecrawl Node Agent Quickstart

This file is the canonical quickstart for external agents integrating Firecrawl via the Node.js/TypeScript SDK. It is generated from SDK source and the OpenAPI spec.

Install

Requires Node >= 22.0.0.

Authenticate

You can also pass a plain string: new Firecrawl("fc-YOUR_API_KEY"). The API key can be omitted — scrape, search, and interact work on a keyless free tier (rate-limited per IP). All other methods require a key. Constructor options:

When To Use What

  • search — Use when you start with a query and need discovery. Returns web, news, and image results with optional scraping of each result.
  • scrape — Use when you already have a URL and want page content (markdown, HTML, screenshots, structured JSON, etc.).
  • interact — Use when the page needs clicks, form fills, or post-scrape browser actions. Runs code or a prompt against an active browser session.

Why use it

Search the web with a query and get back structured results. Optionally scrape each result page inline. Useful for discovery, research, and finding relevant URLs before scraping them in detail.

Preferred SDK method

Example

Results are grouped under .web, .news, and .images — there is no .data property.

Parameters

Scrape

Why use it

Fetch a single URL and get back structured page data — markdown, HTML, screenshots, extracted JSON, and more. The workhorse endpoint for turning a known URL into usable content.

Preferred SDK method

Example

Parameters

Interact

Why use it

Run code or a natural-language prompt against an active browser session tied to a scrape job. Use it for clicking buttons, filling forms, navigating multi-step flows, or extracting data that requires browser interaction after the initial scrape.

Preferred SDK method

Example

Parameters

Stopping a session

Notes

  • camelCase naming — All parameter names use camelCase (e.g. onlyMainContent, includeTags).
  • Deprecated aliasesscrapeUrl() maps to scrape(). scrapeExecute() maps to interact(). stopInteractiveBrowser() and deleteScrapeBrowser() map to stopInteraction(). Always use the preferred names.
  • Zod schema support — The json format accepts a Zod schema in schema which is auto-converted to JSON Schema before sending.
  • Auto-resume — By default, scrape() transparently retries when a large document outlives the request window (max 5 retries / 20 min). Set autoResume: false to disable.
  • Search result shape — Results are on .web, .news, .images. Accessing .data throws a helpful error.

Source Of Truth

  • firecrawl/apps/js-sdk/firecrawl/src/index.ts
  • firecrawl/apps/js-sdk/firecrawl/src/v2/client.ts
  • firecrawl/apps/js-sdk/firecrawl/src/v2/types.ts
  • firecrawl-docs/api-reference/v2-openapi.json