---
title: "@pitlane/crawler"
description: "`crawl()` — spider a Remix 3 fetch router in memory. Requests go straight into `router.fetch`, so an app can be walked and written to disk without a socket, a server, or a browser. `staticPaths()` answers the question that comes first: which paths a route map can serve with no params."
url: "https://pitlane.tools/package/crawler/"
---

# @pitlane/crawler

`crawl()` — spider a Remix 3 fetch router in memory. Requests go straight into `router.fetch`, so an app can be walked and written to disk without a socket, a server, or a browser. `staticPaths()` answers the question that comes first: which paths a route map can serve with no params.

## See

- [Crawler guide](https://pitlane.tools/guides/crawler.md)
- [Prerendering guide, without a build](https://pitlane.tools/guides/prerendering-no-build.md)

## Interfaces

- [CrawlOptions](https://pitlane.tools/package/crawler/interface/CrawlOptions.md). What [crawl](https://pitlane.tools/package/crawler/function/crawl.md) fetches and how: the starting paths, whether to follow links and queue assets, how many requests run at once, and hooks for `nofollow` pages and redirects. Every option has a default, so `crawl(router)` walks everything reachable from `/`.
- [CrawlResult](https://pitlane.tools/package/crawler/interface/CrawlResult.md). One fetched path and the response the router produced for it.
- [CrawlTarget](https://pitlane.tools/package/crawler/interface/CrawlTarget.md). What [crawl](https://pitlane.tools/package/crawler/function/crawl.md) needs from a router. A `createRouter()` router satisfies it, and so does anything else that answers a `Request` — a built server bundle's default export, a worker-style `{ fetch }` object, a test double.

## Functions

- [crawl](https://pitlane.tools/package/crawler/function/crawl.md). Walks an app by dispatching requests straight into its router, yielding each response as it arrives. No socket, no server, no browser: the router's `fetch` is the whole transport, so this runs anywhere the app itself runs.
- [staticPaths](https://pitlane.tools/package/crawler/function/staticPaths.md). Collects every path in a route map that can be requested without params: the Remix 3 answer to "what pages does this app have", and the input a prerender pass needs before it knows any dynamic values.
