Skip to content

fix(js-sdk): forward ignoreRobotsTxt in v2 crawl payload - #3959

Open
Shraman123 wants to merge 1 commit into
firecrawl:mainfrom
Shraman123:fix/js-sdk-crawl-ignore-robots-txt
Open

Shraman123 wants to merge 1 commit into
firecrawl:mainfrom
Shraman123:fix/js-sdk-crawl-ignore-robots-txt

Conversation

@Shraman123

@Shraman123 Shraman123 commented Jul 6, 2026 •

Copy link
Copy Markdown

Summary

  • CrawlOptions.ignoreRobotsTxt is declared in the v2 JS SDK types and the /v2/crawl API endpoint accepts it (ignoreRobotsTxt: z.boolean().prefault(false) in apps/api/src/controllers/v2/types.ts), but prepareCrawlPayload() in apps/js-sdk/firecrawl/src/v2/methods/crawl.ts never read it, so client.crawl(url, { ignoreRobotsTxt: true }) silently dropped the flag and crawls stayed subject to robots.txt.
  • Adds the missing forwarding line next to the existing robotsUserAgent forwarding (which already worked).
  • Related to [Bug] JS SDK v2 crawl() silently drops ignoreRobotsTxt option #3940.

Test plan

  • Added crawl.unit.test.ts covering: flag forwarded when true, omitted from the body when not provided, and forwarded alongside robotsUserAgent.
  • Verified the new tests fail on the pre-fix code and pass after the fix.
  • npx tsc --noEmit and npx tsup build clean (no new errors introduced).

Summary by cubic

Fixes v2 JS SDK crawls dropping the ignoreRobotsTxt option. The flag is now forwarded to /v2/crawl, so callers can bypass robots.txt when they set it.

  • Bug Fixes
    • Forward ignoreRobotsTxt in prepareCrawlPayload() next to robotsUserAgent.
    • Add unit tests verifying forwarding when true, omission when unset, and coexistence with robotsUserAgent.

Written for commit 47fe07c. Summary will update on new commits.

Review in cubic

CrawlOptions declares ignoreRobotsTxt and the v2 API accepts it, but
prepareCrawlPayload() never read it, so client.crawl(url, { ignoreRobotsTxt: true })
silently dropped the flag and crawls remained subject to robots.txt.

@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

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.

1 participant