Skip to main content

Prerequisites

  • Astro project with SSR enabled (output: "server" or "hybrid")
  • A Firecrawl API key — get one free

Install the SDK

Add your API key to .env:

Search the web

Create src/pages/api/search.ts:
Or search at request time in a server-rendered page (src/pages/search.astro):

Scrape a page

Create src/pages/api/scrape.ts:
Or scrape at request time in a server-rendered page (src/pages/scrape.astro):

Interact with a page

Create src/pages/api/interact.ts:

Next steps

Scrape docs

All scrape options including formats, actions, and proxies

Search docs

Search the web and get full page content

Interact docs

Click, fill forms, and extract dynamic content

Node SDK reference

Full SDK reference with crawl, map, batch scrape, and more