@mendable/firecrawl-js). Point the client at the ZapFetch endpoint, swap in your ZapFetch API key, and your existing Firecrawl code runs without any other changes. The SDK ships TypeScript types so you get autocomplete and type-safe responses out of the box.
Already using
@mendable/firecrawl-js against Firecrawl? Your code runs against ZapFetch unchanged — just update apiUrl and apiKey.Initialize the client
Import
FirecrawlApp and pass your ZapFetch API key and the ZapFetch base URL. Keep your key in an environment variable rather than committing it to source control.Scrape a single page
Call
scrapeUrl with the target URL and the formats you want back. The method returns a typed object whose properties match the requested formats.Crawl a site
Pass
true as the third argument to crawlUrl to wait for the job to finish and receive all pages in a single response. Iterate over job.data to access each crawled page.Crawls are billed per page fetched. Set
limit to control how many pages the crawl visits so you stay within your credit budget.Handling rate limits
ZapFetch returns a standard429 Too Many Requests response with a Retry-After header when you exceed your plan’s rate limit. The SDK surfaces this as a thrown error — wrap calls in your usual retry or exponential backoff policy to handle it gracefully.
Next steps
- Make your first ZapFetch API call with curl — explore all five endpoints without writing any code.
- Use ZapFetch with Python — the same scrape, crawl, and extract operations using
firecrawl-py. - Check your current plan and credit balance in the Console.