feat(batch-scrape): add a batch-scrape command and JSON extraction guidance
Adds firecrawl batch-scrape, a command for the /v2/batch/scrape API, and teaches the bundled skills when to use it and how to extract JSON fields from a page.
Today firecrawl scrape url1 url2 ... runs concurrent single scrapes that keep markdown only. batch-scrape runs one async job that keeps every requested format, supports JSON extraction, webhooks and cancellation, and can be checked later by job ID.
Command
- URLs come from arguments and/or
--urls-file(one per line; blank lines and#comments ignored). URLs are normalised and de-duplicated. - A job ID instead of URLs checks status;
--statusand--cancelwork likecrawl. - Scrape options:
--format,--only-main-content,--wait-for,--max-age, and--scrape-options/--scrape-options-fileas the base that explicit flags override.--schema,--schema-fileand--promptadd thejsonformat;--format jsonwithout either fails locally. - Job options:
--wait,--progress,--poll-interval,--timeout,--webhook,--max-concurrency,--ignore-invalid-urls,-o,--pretty. Without--waitit prints the job ID and a status hint, matchingcrawl. - Uses the SDK's
startBatchScrape,batchScrape,getBatchScrapeStatusandcancelBatchScrapewithintegration: 'cli'.
Skills and docs
firecrawl-scrape: new "Structured JSON from a page" (scrape --format json --schema) and "Many known URLs" (batch-scrape) sections.firecrawl: a command-table row and a pointer for batch scraping.- README: a
batch-scrapesection aftercrawl. - Version 1.26.10.
Tests
- 19 unit tests for URL collection, option building, job-ID routing, wait and no-wait, progress polling and cancel;
cli-aliasescovers the job-status case against the built CLI. pnpm run type-check,pnpm run format:checkandpnpm testpass.- Live runs against the API: a two-URL wait with
markdown,links, a no-wait start then status by job ID,--schemaand--promptextraction,--urls-filethen--cancel, and the two local error paths. Webhook delivery and a live--timeoutexpiry were not exercised.
Summary by cubic
Adds firecrawl batch-scrape, a command for the /v2/batch/scrape API, and teaches the bundled skills when to use it and how to extract JSON fields from a page. Unlike multi-URL scrape, which keeps markdown only, batch-scrape runs one async job that keeps every requested format, supports JSON extraction, webhooks, and cancellation, and can be checked later by job ID.
- URLs come from arguments and/or
--urls-file(one per line, blank lines and#comments ignored), normalised and de-duplicated. - A job ID instead of URLs checks status;
--statusand--cancelwork likecrawl. --schema,--schema-file, or--promptadd thejsonformat and keep existing--scrape-optionsformats; ajsonformat without any of them fails locally.- Uses the SDK's
startBatchScrape,batchScrape,getBatchScrapeStatus, andcancelBatchScrapewithintegration: 'cli'; version bumped to 1.26.18. - Skills, README, and tests updated with batch scrape usage and JSON extraction guidance.