Skip to main content

Firecrawl Node.js Agent Quickstart

This is the canonical quickstart for external agents integrating with Firecrawl using the official Node.js/TypeScript SDK. Generated from SDK source and OpenAPI spec.

Install

Authenticate

Constructor options:

When To Use What

  • search — Use when you start with a query and need to discover relevant pages. Returns search results grouped by source type, optionally with scraped content.
  • scrape — Use when you already have a URL and want its content. Returns markdown, HTML, structured data, screenshots, or other formats.
  • interact — Use when the page needs post-scrape browser actions like clicking, filling forms, or executing code in the browser sandbox.

Why use it

Search the web and optionally scrape each result in one call. Start here when you have a question or topic but not a specific URL.

Preferred SDK method

Example

Parameters

All parameters are optional unless noted.

Scrape

Why use it

Fetch and extract content from a single URL. Use when you have a specific page to read.

Preferred SDK method

Example

Parameters

All parameters are optional unless noted.

Interact

Why use it

Execute code or natural-language prompts in the browser sandbox associated with a scrape job. Use after a scrape to click buttons, fill forms, navigate, or extract additional data.

Preferred SDK method

Example

Parameters

Stops the interactive browser session and returns billing info.

Notes

  • Naming style: All parameters use camelCase.
  • Deprecated aliases:
    • scrapeUrl() → use scrape() instead.
    • scrapeExecute() → use interact() instead.
    • stopInteractiveBrowser() and deleteScrapeBrowser() → use stopInteraction() instead.
  • Async client: The SDK is async by default (all methods return Promises).
  • Zod schemas: The json format accepts Zod schemas in addition to plain JSON Schema objects for the schema field.

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