Firecrawl Node.js Agent Quickstart
Canonical quickstart for external agents integrating Firecrawl with Node.js. Generated from SDK source and OpenAPI spec.Install
Authenticate
FIRECRAWL_API_KEY environment variable and omit apiKey:
When To Use What
- search: Start with a query, discover relevant URLs, and get their content in one call.
- scrape: You already have a URL and want its page content as markdown, HTML, JSON, or other formats.
- interact: The page needs clicks, form fills, or post-scrape browser actions on a live session.
Search
Why use it
Search the web for a query and get scraped content from the top results. Combines discovery and content extraction in one call.Preferred SDK method
search(query, options?)
Example
Parameters
Response groups results by source:
results.web, results.news, results.images, results.developer.
Scrape
Why use it
Get the content of a single URL as markdown, HTML, JSON, screenshots, or other formats.Preferred SDK method
scrape(url, options?)
Example
Parameters
Format config objects
Interact
Why use it
Control a live browser session tied to a scrape job. Click buttons, fill forms, navigate, and extract dynamic content using code or natural-language prompts.Preferred SDK method
interact(jobId, args)
Example
Parameters
Stop the session when done:
Notes
- Parameter names use camelCase (e.g.
onlyMainContent,includeTags,scrapeOptions). includeDomainsandexcludeDomainson search are mutually exclusive.- Deprecated aliases (do not use in new code):
scrapeExecute()→ useinteract()stopInteractiveBrowser()/deleteScrapeBrowser()→ usestopInteraction()scrapeUrl()→ usescrape()crawlUrl()→ usecrawl()mapUrl()→ usemap()
Source Of Truth
firecrawl/apps/js-sdk/firecrawl/src/v2/client.tsfirecrawl/apps/js-sdk/firecrawl/src/v2/types.tsfirecrawl/apps/js-sdk/firecrawl/src/index.tsfirecrawl-docs/api-reference/v2-openapi.json

