Skip to content

Implement or remove the unused Request.skip_navigation flag #2311

Open

Description

@vdusek

CrawleeRequestData.skip_navigation (_request.py) is declared, persisted and serialized as skipNavigation, but nothing in src/crawlee reads it. Setting it has no effect.

Either implement it or remove it in 2.0. JS v4 implements it: the crawler skips opening the page and navigating, runs the handler, and accessing navigation-only context members (the response, the loaded URL) raises a NavigationSkippedError.

This will be a breaking change.

JS references: apify/crawlee#3107, apify/crawlee#3381

✍️ Drafted by Claude Code

Activity

  1. added this to the 2.0 milestone on Oct 13, 2026
  2. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    debtCode quality improvement or decrease of technical debt.
    on Oct 13, 2026
  3. janbuchar commented on Oct 14, 2026

    @janbuchar
    Collaborator

    Implement it. It isn't breaking. Because it's not possible to make it type-safe, we made accessing context properties that are only present after navigation throw on runtime so that you don't have to handle undefined fields in the 99% use cases where you don't use skipNavigation.

  4. enriquealonso01 commented on Oct 16, 2026

    @enriquealonso01

    Picking this up per janbuchar's direction — PR incoming.

    Approach mirrors JS SDK v4 (apify/crawlee#3107, #3381): BasicCrawler routes skip_navigation requests around the context pipeline and calls the router directly; navigation-only request.loaded_url raises a new public NavigationSkippedError; other attribute reads/writes pass through so router state updates still work. The existing skipNavigation serialization is unchanged.

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

    debtCode quality improvement or decrease of technical debt.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions