Skip to main content

Firecrawl Node Agent Quickstart

Canonical quickstart for external agents. Generated from SDK source (@mendable/firecrawl-js) and the OpenAPI spec. Use this file to get an agent calling Firecrawl correctly in one pass.

Install

Requires Node >= 22.

Authenticate

Constructor accepts a string (API key) or an options object:
No API key is required for scrape, search, and interact — they fall back to a keyless free tier (rate-limited per IP).

When To Use What

  • search: Start with a text query and need to discover relevant URLs and content across the web.
  • scrape: Already have a URL and want page content (markdown, HTML, structured JSON, screenshots, etc.).
  • interact: The page needs clicks, form fills, or post-scrape browser actions — run code or a prompt against the live browser session.

Why use it

Search the web and optionally scrape each result. Returns categorized results (web, news, images) with optional content scraping.

Preferred SDK method

Example

Parameters

Return type: SearchData with properties .web, .news, .images. Accessing .data throws with guidance to use the named properties instead.

Scrape

Why use it

Fetch a single URL and extract content in various formats: markdown, HTML, structured JSON, screenshots, audio, video, and more. Handles JavaScript rendering, ad blocking, proxies, and caching.

Preferred SDK method

Example

Parameters

Interact

Why use it

Execute code or a natural-language prompt against the live browser session from a previous scrape. Use it to click buttons, fill forms, navigate, or extract dynamic content that only appears after user interaction.

Preferred SDK method

Example

Parameters

Stop the session when done:

Notes

  • All parameter names use camelCase (e.g. onlyMainContent, skipTlsVerification).
  • SearchData uses .web, .news, .images — accessing .data throws an error with migration guidance.
  • Deprecated aliases (use the preferred names above):
    • scrapeUrlscrape
    • scrapeExecuteinteract
    • stopInteractiveBrowser / deleteScrapeBrowserstopInteraction
  • The QueryFormat ({ type: "query", prompt, mode }) is deprecated in favor of QuestionFormat or HighlightsFormat.

Source Of Truth

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