Firecrawl Node.js 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 OpenAPI spec.Install
Authenticate
FIRECRAWL_API_KEY environment variable. If omitted, the client falls back to keyless free tier (rate-limited per IP).
When To Use What
search: Use when you start with a query and need to discover relevant URLs and their content. Returns results from web, news, and image sources.scrape: Use when you already have a specific URL and want its page content in markdown, HTML, JSON, or other formats.interact: Use when the page needs post-scrape browser actions like clicking, typing, scrolling, or executing code in a live browser session.
Search
Why use it
Search the web for a query and optionally scrape the results. Returns categorized results from web, news, and image sources with optional content extraction.Preferred SDK method
Example
Parameters
Scrape
Why use it
Scrape a single URL and get its content in one or more formats. Supports browser automation, LLM extraction, screenshots, and more.Preferred SDK method
Example
Parameters
Format objects
Actions
Interact
Why use it
Execute code or send natural-language prompts in a live browser session tied to a scrape job. Use for post-scrape interactions like clicking buttons, filling forms, or running scripts.Preferred SDK method
Example
Parameters
Use
client.stopInteraction(jobId) to end the browser session when done.
Notes
- Naming style: All parameters use camelCase.
- Deprecated aliases:
scrapeUrl()is deprecated in favor ofscrape().scrapeExecute()is deprecated in favor ofinteract().stopInteractiveBrowser()anddeleteScrapeBrowser()are deprecated in favor ofstopInteraction(). - Zod schema support: The
scrape()method accepts Zod schemas inJsonFormatand will narrow the return type accordingly. - Async: All methods return Promises.
Source Of Truth
/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

