Firecrawl Node SDK is a wrapper around the Firecrawl API to help you easily turn websites into markdown.
FIRECRAWL_API_KEY
or pass it as a parameter to the FirecrawlApp
class.scrapeUrl
method. It takes the URL as a parameter and returns the scraped data as a dictionary.
crawlUrl
method. It takes the starting URL and optional parameters as arguments. The params
argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format. See Pagination for auto/ manual pagination and limiting.
startCrawl
. It returns a job ID
you can use to check status. Use crawl
when you want a waiter that blocks until completion. See Pagination for paging behavior and limits.
checkCrawlStatus
method. It takes the ID
as a parameter and returns the current status of the crawl job.
cancelCrawl
method. It takes the job ID of the startCrawl
as a parameter and returns the cancellation status.
mapUrl
method. It takes the starting URL as a parameter and returns the mapped data as a dictionary.
crawlUrlAndWatch
method. It takes the starting URL and optional parameters as arguments. The params
argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format.
next
URL when more data is available. The Node SDK auto-paginates by default and aggregates all documents; in that case next
will be null
. You can disable auto-pagination or set limits.
crawl
for the simplest experience, or start a job and page manually.
autoPaginate: false
.maxPages
, maxResults
, or maxWaitTime
.batchScrape
, or start a job and page manually.
autoPaginate: false
.maxPages
, maxResults
, or maxWaitTime
.try/catch
blocks.