ApifyRequestConfig
Index
Properties
optionalauthorizationHeader
Header that carries the client's API token for this request. The Apify API reads Authorization. Actor
servers also accept X-Apify-Authorization, which the platform removes before the request reaches the Actor,
so the Authorization header stays free for the Actor's own authentication. A per-request header of either
name still wins.
optionalcompression
How to compress the request body: an HttpCompressor for this request only, or false to send the body
uncompressed. Defaults to the client's HttpClient.httpCompressor.
optionaldata
Request body. A plain object or array is serialized to JSON and sent as application/json, or form-encoded
when a Content-Type: application/x-www-form-urlencoded header asks for it. A string, binary value
(Buffer, ArrayBuffer, typed array) or Readable is sent as it is, and URLSearchParams is sent
form-encoded. A Blob or File, such as one from fs.openAsBlob(), is streamed without being held in
memory, under its own type when no Content-Type header is set. A FormData or web ReadableStream is
rejected with a TypeError, since serializing one would send an empty body.
optionaldoNotRetryTimeouts
Give up on the first transport timeout instead of retrying it.
optionalfollowRedirects
Whether the transport follows redirects. With false, a redirect response is handled like an error status, so
headers that carry the token never go to a host the server picked.
optionalheaders
Per-request headers. They win over the client's default headers, header names compared case-insensitively.
method
HTTP method.
optionalparams
Query parameters. undefined values are dropped, booleans are sent as 1 and 0, Date values as ISO 8601
strings and arrays comma-separated.
optionalresponseType
optionalretryStatusCodes
Status codes to retry. Defaults to rate limits (429) and server errors (5xx).
optionalretryTransportErrors
Whether transport errors, timeouts included, are retried. With false, the first one fails the call, since the
request may have reached the server before it failed.
optionalsignal
Aborts the call. Once the signal aborts, the attempt in flight is ended, no retry follows, and the call
rejects with the signal's reason.
optionalstringifyFunctions
Serialize function-valued fields of a JSON body to their source instead of dropping them, which is how Actor input carrying page functions reaches the API.
optionalthrowOnErrorStatus
Whether an error status throws ApifyApiError. With false, the call resolves to the error response
once no retry follows, and a rate limit (429) doesn't count toward the client's statistics, which track the
API's rate limits.
optionaltimeoutSecs
Timeout of the request: a tier name, a number of seconds, or 'noTimeout'. The client resolves it to the
timeout of each attempt in milliseconds, doubling it with every retry up to timeoutMaxSecs.
url
Full URL of the endpoint, without the query string.
A request as the resource clients hand it to HttpClient.call.