Skip to main content
Version: Next

ApifyClientOptions

Configuration options for ApifyClient.

Index

Properties

optionalbaseUrl

baseUrl?: string = https://api.apify.com

URL of the Apify API, with or without the /v2 version path, which is appended when missing.

optionalcompression

Compression of request bodies: the name of a built-in algorithm, or an HttpCompressor for a custom quality or algorithm. Bodies are compressed only in Node.js, and only when they are large enough to benefit and their content type does not already carry its own compression.

optionalheaders

headers?: Record<string, string>

Additional headers sent with every request, such as an integration platform marker. They win over the built-in defaults, and a header set on a single call wins over them.

optionalmaxRetries

maxRetries?: number = 8

optionalminDelayBetweenRetriesMillis

minDelayBetweenRetriesMillis?: number = 500

optionalpublicBaseUrl

publicBaseUrl?: string = https://api.apify.com

Publicly accessible URL of the Apify API, used in the URLs the client generates. Like baseUrl, with or without the /v2 version path.

Added in 2.17.0

optionaltimeoutLongSecs

timeoutLongSecs?: number = 360

Duration of the long timeout tier, in seconds: downloads, uploads and streaming.

optionaltimeoutMaxSecs

timeoutMaxSecs?: number = 360

Cap on the timeout of a single request attempt, in seconds. It bounds the doubling of the timeout across retries, and caps tier and per-call timeouts alike, so raise it to allow a request timeout above 360 s.

optionaltimeoutMediumSecs

timeoutMediumSecs?: number = 30

Duration of the medium timeout tier, in seconds: listing, batch and trigger operations.

optionaltimeoutShortSecs

timeoutShortSecs?: number = 5

Duration of the short timeout tier, in seconds: simple metadata reads and writes.

optionaltoken

token?: string

optionaluserAgentSuffix

userAgentSuffix?: string | string[]

Added in 2.10.0