Skip to content

fix(js-sdk): forward ignoreRobotsTxt in v2 crawl payloads - #5985

Open
divdotdev wants to merge 1 commit into
firecrawl:mainfrom
divdotdev:fix/issue-3940-crawl-ignore-robots-txt
Open

divdotdev wants to merge 1 commit into
firecrawl:mainfrom
divdotdev:fix/issue-3940-crawl-ignore-robots-txt

Conversation

@divdotdev

@divdotdev divdotdev commented Nov 23, 2026 •

Copy link
Copy Markdown

Why is this change needed?

Fixes #3940.
In JS SDK v2, CrawlOptions accepts ignoreRobotsTxt?: boolean;, but the payload builder prepareCrawlPayload() omitted the option when constructing the request payload. As a result, calling crawl() or startCrawl() with { ignoreRobotsTxt: true } silently dropped the setting, leaving the backend unable to receive the parameter.

What behavior changed?

  • prepareCrawlPayload() in apps/js-sdk/firecrawl/src/v2/methods/crawl.ts now maps request.ignoreRobotsTxt into data.ignoreRobotsTxt when defined (!= null).
  • When ignoreRobotsTxt is not supplied or undefined, it remains omitted from the payload object.
  • Both startCrawl() and crawl() now faithfully forward ignoreRobotsTxt in the outgoing POST /v2/crawl JSON body.

Tests and verification

In apps/js-sdk/firecrawl:

  • pnpm vitest run src/__tests__/unit/v2/crawl.unit.test.ts (7/7 passed)
  • pnpm test:unit (360/360 passed across 44 test files)
  • pnpm run build (tsup build with CJS, ESM, and DTS emission passed)

Configuration, migration, security, or deployment impact

None. Non-breaking bugfix for existing ignoreRobotsTxt option.


Summary by cubic

Fixes #3940 by forwarding the ignoreRobotsTxt option in v2 crawl request payloads.

Previously, callers passing ignoreRobotsTxt: true to startCrawl() or crawl() had the setting silently dropped, so the backend never received it. prepareCrawlPayload() now maps request.ignoreRobotsTxt into the payload when defined, while omitting it when not supplied or undefined. Adds unit tests covering true, false, and undefined cases for both entry points.

Written for commit ffc962e. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] JS SDK v2 crawl() silently drops ignoreRobotsTxt option

1 participant