firecrawl v4.32.0 (firecrawl/apps/js-sdk/firecrawl) and the v2 OpenAPI spec. Method names, parameters, and types match the SDK public API.
Install
Authenticate
When To Use What
search: use when you start with a query and need discovery.scrape: use when you already have a URL and want page content.interact: use when the page needs clicks, forms, or other browser actions after a scrape has created a session. For multi-step interactive flows, preferinteractover scrape-timeactions.
Search
Why use it
Use search to discover relevant pages from a query, then pick URLs to scrape or interact with. You can constrain results to a site withsite:, for example site:docs.firecrawl.dev crawl webhooks.
Preferred SDK method
client.search(query, options?) → Promise<SearchData>
Example
Parameters
Return value:
SearchData with optional arrays web, news, images, developer. Do not access result.data — it throws an error directing you to use result.web, result.news, etc.
Scrape
Why use it
Use scrape when you already have a URL and want structured content in one or more formats.Preferred SDK method
client.scrape(url, options?) → Promise<Document>
Example
Parameters
Interact
Why use it
Useinteract for code or natural-language control of the browser session tied to a scrape job (via metadata.scrapeId). The SDK requires at least one of code or prompt. For flows that go beyond quick pre-scrape tweaks, prefer interact over scrape-time actions.
Preferred SDK method
client.interact(jobId, args) → Promise<ScrapeExecuteResponse>
Example
Parameters
Stop session
client.stopInteraction(jobId) → Promise<ScrapeBrowserDeleteResponse>
Ends the scrape-bound browser session. Response includes success, sessionDurationMs, creditsBilled.
Notes
- Deprecated aliases:
scrapeExecute→interact;stopInteractiveBrowseranddeleteScrapeBrowser→stopInteraction;scrapeUrl→scrape. - The default
Firecrawlexport is the v2 client; v1 remains underclient.v1. - Zod schemas passed to
formats(forjsonorchangeTracking) are converted to JSON Schema by the SDK. - The package declares Node.js >= 22 in
engines.
Source Of Truth
firecrawl/apps/js-sdk/firecrawl/package.jsonfirecrawl/apps/js-sdk/firecrawl/src/index.tsfirecrawl/apps/js-sdk/firecrawl/src/v2/client.tsfirecrawl/apps/js-sdk/firecrawl/src/v2/types.tsfirecrawl-docs/api-reference/v2-openapi.json

