Skip to main content
Version: 3.2

ConfigurationOptions

Index

Properties

optionalavailableMemoryRatio

availableMemoryRatio?: number = <p>0.25</p>

Sets the ratio, defining the amount of system memory that could be used by the AutoscaledPool. When the memory usage is more than the provided ratio, the memory is considered overloaded.

Alternative to CRAWLEE_AVAILABLE_MEMORY_RATIO environment variable.

optionalchromeExecutablePath

chromeExecutablePath?: string

Defines a path to Chrome executable.

Alternative to CRAWLEE_CHROME_EXECUTABLE_PATH environment variable.

optionaldefaultBrowserPath

defaultBrowserPath?: string

Defines a path to default browser executable.

Alternative to CRAWLEE_DEFAULT_BROWSER_PATH environment variable.

optionaldefaultDatasetId

defaultDatasetId?: string = <p>‘default’</p>

Default dataset id.

Alternative to CRAWLEE_DEFAULT_DATASET_ID environment variable.

optionaldefaultKeyValueStoreId

defaultKeyValueStoreId?: string = <p>‘default’</p>

Default key-value store id.

Alternative to CRAWLEE_DEFAULT_KEY_VALUE_STORE_ID environment variable.

optionaldefaultRequestQueueId

defaultRequestQueueId?: string = <p>‘default’</p>

Default request queue id.

Alternative to CRAWLEE_DEFAULT_REQUEST_QUEUE_ID environment variable.

optionaldisableBrowserSandbox

disableBrowserSandbox?: boolean

Defines whether to disable browser sandbox by adding --no-sandbox flag to launchOptions.

Alternative to CRAWLEE_DISABLE_BROWSER_SANDBOX environment variable.

optionaleventManager

eventManager?: EventManager = EventManager

Defines the Event Manager to be used.

optionalheadless

headless?: boolean = <p>true</p>

Defines whether web browsers launched by Crawlee will run in the headless mode.

Alternative to CRAWLEE_HEADLESS environment variable.

optionalinputKey

inputKey?: string = <p>‘INPUT’</p>

Defines the default input key, i.e. the key that is used to get the crawler input value from the default KeyValueStore associated with the current crawler run.

Alternative to CRAWLEE_INPUT_KEY environment variable.

optionallogLevel

logLevel?: LogLevel | (radix?: number) => string | (fractionDigits?: number) => string | (fractionDigits?: number) => string | (precision?: number) => string | () => number | ({ (locales?: string | string[], options?: NumberFormatOptions): string; (locales?: LocalesArgument, options?: NumberFormatOptions): string }) = LogLevel | (radix?: number) => string | (fractionDigits?: number) => string | (fractionDigits?: number) => string | (precision?: number) => string | () => number | ({ (locales?: string | string[], options?: NumberFormatOptions): string; (locales?: LocalesArgument, options?: NumberFormatOptions): string })

Sets the log level to the given value.

Alternative to CRAWLEE_LOG_LEVEL environment variable.

optionalmaxUsedCpuRatio

maxUsedCpuRatio?: number = <p>0.95</p>

Sets the ratio, defining the maximum CPU usage. When the CPU usage is higher than the provided ratio, the CPU is considered overloaded.

optionalmemoryMbytes

memoryMbytes?: number

Sets the amount of system memory in megabytes to be used by the AutoscaledPool. By default, the maximum memory is set to one quarter of total system memory.

Alternative to CRAWLEE_MEMORY_MBYTES environment variable.

optionalpersistStateIntervalMillis

persistStateIntervalMillis?: number = <p>60_000</p>

Defines the interval of emitting the persistState event.

Alternative to CRAWLEE_PERSIST_STATE_INTERVAL_MILLIS environment variable.

optionalpersistStorage

persistStorage?: boolean

Defines whether the storage client used should persist the data it stores.

Alternative to CRAWLEE_PERSIST_STORAGE environment variable.

optionalpurgeOnStart

purgeOnStart?: boolean = <p>true</p>

Defines whether to purge the default storage folders before starting the crawler run.

Alternative to CRAWLEE_PURGE_ON_START environment variable.

optionalstorageClient

storageClient?: StorageClient = StorageClient

Defines storage client to be used.

optionalstorageClientOptions

storageClientOptions?: Dictionary<any>

Could be used to adjust the storage client behavior e.g. MemoryStorageOptions could be used to adjust the MemoryStorage behavior.

optionalsystemInfoIntervalMillis

systemInfoIntervalMillis?: number = <p>60_000</p>

Defines the interval of emitting the systemInfo event.

optionalxvfb

xvfb?: boolean = <p>false</p>

Defines whether to run X virtual framebuffer on the web browsers launched by Crawlee.

Alternative to CRAWLEE_XVFB environment variable.