Skip to content

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

Description

@amogh-nagri-11

Describe the Bug
CrawlOptions.ignoreRobotsTxt is declared in the JS SDK's v2 types but never forwarded to the API. Calling crawl() or startCrawl() with ignoreRobotsTxt: true does not include the field in the outgoing request body, so the crawl silently continues to respect robots.txt regardless of what the caller passed.

Root cause: in apps/js-sdk/firecrawl/src/v2/methods/crawl.ts, prepareCrawlPayload() builds the request body option-by-option but has no line reading request.ignoreRobotsTxt, even though the field is declared in CrawlOptions (v2/types.ts line 700) and is fully supported by the API (apps/api/src/controllers/v2/types.ts, src/scraper/WebScraper/crawler.ts, src/lib/crawl-redis.ts).

$ grep -rn "ignoreRobotsTxt" apps/js-sdk/firecrawl/src/
v2/types.ts:700: ignoreRobotsTxt?: boolean;

That's the only reference in the whole SDK — declared, never used.

This is the same class of bug as robotsUserAgent, which was added to CrawlOptions in the same PR (#3375) but not wired into the payload either, and was later caught and fixed on its own in #3403 (fix(js-sdk): include robotsUserAgent in crawl payload). That fix appears to have missed ignoreRobotsTxt sitting right next to it in the same function.

For comparison, the Python SDK handles this field correctly end-to-end (firecrawl/v2/client.py, firecrawl/v2/methods/crawl.py, firecrawl/v2/types.py), including the snake_case/camelCase mapping.

To Reproduce
Steps to reproduce the issue:

  1. const client = new Firecrawl({ apiKey: "..." })
  2. await client.crawl("https://example.com", { ignoreRobotsTxt: true })
  3. Inspect the outgoing POST /v2/crawl request body
  4. ignoreRobotsTxt is absent from the payload; the crawl behaves as if the option was never passed

Expected Behavior
ignoreRobotsTxt should appear in the request body when set, matching the declared CrawlOptions type and the Python SDK's behavior.

Screenshots
N/A — this is a payload-construction bug, not a UI issue.

Environment:

  • OS: macOS
  • Deployment Type: Cloud (firecrawl.dev)
  • Firecrawl Version: @mendable/firecrawl-js 4.29.1
  • Node.js Version: 22.x

Logs
N/A — no error is thrown; the field is silently omitted from the request body, so there's nothing to log. The bug is confirmed by inspecting prepareCrawlPayload() directly (see root cause above).

Additional Context
There's an open PR (#3046) that touches robots handling more broadly (introducing a robotsMode enum across scrape/crawl/map) and does modify this same file, but it's been open since March 2026 with no recent activity and is scoped well beyond this specific gap. Flagging it here for visibility, but this issue describes a minimal, independently-fixable regression regardless of that PR's outcome.

I'd like to work on this — will open a PR shortly with the fix and a regression test.

Activity

  1. added
    bug
    on Jul 2, 2026
  2. TanzimHossainSafin commented on Jul 6, 2026

    @TanzimHossainSafin

    hello, i want to work on this issue. could you please assign me?

  3. sbalagan22 commented on Jul 7, 2026

    @sbalagan22

    Root cause confirmed: prepareCrawlPayload in apps/js-sdk/firecrawl/src/v2/methods/crawl.ts builds the request body field-by-field and has no line reading request.ignoreRobotsTxt, even though the field is declared in CrawlOptions and consumed by the API. This is the same omission as robotsUserAgent (wired up separately in #3403), which sits on the adjacent line. Fix: forward request.ignoreRobotsTxt into the payload alongside robotsUserAgent, guarded by the same != null check, and add a crawl unit test asserting the field reaches the POST /v2/crawl body.

  4. nankingjing commented on Jul 14, 2026

    @nankingjing

    Thanks for the report! This is now fixed in #4016 — prepareCrawlPayload will forward ignoreRobotsTxt to the API when set. The field was declared in CrawlOptions but never wired into the POST body.

  5. added a commit that references this issue on Jul 16, 2026
    c4275c5
  6. added a commit that references this issue on Jul 20, 2026
    840b744
  7. added a commit that references this issue on Jul 28, 2026
    2e41863
  8. added a commit that references this issue on Aug 11, 2026
    e9f27af
  9. added 5 commits that reference this issue on Sep 12, 2026
    39b5b76
    ded21d2
    94bc44c
    79ed9c3
    e4e63f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions