# CrawlerRunOptions<!-- -->

### Hierarchy

* [CrawlerAddRequestsOptions](https://crawlee.dev/js/api/basic-crawler/interface/CrawlerAddRequestsOptions.md)
  * *CrawlerRunOptions*

## Index[**](#Index)

### Properties

* [**batchSize](#batchSize)
* [**forefront](#forefront)
* [**maxNewRequests](#maxNewRequests)
* [**purgeRequestQueue](#purgeRequestQueue)
* [**waitBetweenBatchesMillis](#waitBetweenBatchesMillis)
* [**waitForAllRequestsToBeAdded](#waitForAllRequestsToBeAdded)

## Properties<!-- -->[**](#Properties)

### [**](#batchSize)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/storages/request_provider.ts#L1020)optionalinheritedbatchSize

**batchSize?

<!-- -->

: number = 1000

Inherited from CrawlerAddRequestsOptions.batchSize

### [**](#forefront)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/storages/request_provider.ts#L993)optionalinheritedforefront

**forefront?

<!-- -->

: boolean = false

Inherited from CrawlerAddRequestsOptions.forefront

If set to `true`:

* while adding the request to the queue: the request will be added to the foremost position in the queue.
* while reclaiming the request: the request will be placed to the beginning of the queue, so that it's returned in the next call to [RequestQueue.fetchNextRequest](https://crawlee.dev/js/api/core/class/RequestQueue.md#fetchNextRequest). By default, it's put to the end of the queue.

In case the request is already present in the queue, this option has no effect.

If more requests are added with this option at once, their order in the following `fetchNextRequest` call is arbitrary.

### [**](#maxNewRequests)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/storages/request_provider.ts#L1037)optionalinheritedmaxNewRequests

**maxNewRequests?

<!-- -->

: number

Inherited from CrawlerAddRequestsOptions.maxNewRequests

If set, only this many *actually new* requests (i.e. not already present in the queue) will be added. Once the budget is reached, remaining requests from the iterable will be collected in [`requestsOverLimit`](https://crawlee.dev/js/api/core/interface/AddRequestsBatchedResult.md#requestsOverLimit) instead.

This is useful in combination with `maxRequestsPerCrawl` to avoid duplicate URLs consuming the budget.

**Note:** Setting this option implicitly enables [`waitForAllRequestsToBeAdded`](https://crawlee.dev/js/api/core/interface/AddRequestsBatchedOptions.md#waitForAllRequestsToBeAdded), since all batches must complete before leftover requests can be accurately reported.

### [**](#purgeRequestQueue)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/basic-crawler/src/internals/basic-crawler.ts#L2116)optionalpurgeRequestQueue

**purgeRequestQueue?

<!-- -->

: boolean = true

Whether to purge the RequestQueue before running the crawler again. Defaults to true, so it is possible to reprocess failed requests. When disabled, only new requests will be considered. Note that even a failed request is considered as handled.

### [**](#waitBetweenBatchesMillis)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/storages/request_provider.ts#L1025)optionalinheritedwaitBetweenBatchesMillis

**waitBetweenBatchesMillis?

<!-- -->

: number = 1000

Inherited from CrawlerAddRequestsOptions.waitBetweenBatchesMillis

### [**](#waitForAllRequestsToBeAdded)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/storages/request_provider.ts#L1015)optionalinheritedwaitForAllRequestsToBeAdded

**waitForAllRequestsToBeAdded?

<!-- -->

: boolean = false

Inherited from CrawlerAddRequestsOptions.waitForAllRequestsToBeAdded

Whether to wait for all the provided requests to be added, instead of waiting just for the initial batch of up to `batchSize`.
