Skip to main content
Version: 2.5

ApifyEnvVars

Environment variables with APIFY_ prefix set by the Apify platform.

These variables provide configuration, authentication, and platform-specific settings for Actors running on the Apify platform. They control behavior like logging, proxy settings, browser configuration, and platform integration.

Index

Enumeration Members

API_BASE_URL

API_BASE_URL: 'APIFY_API_BASE_URL'

Base URL of the Apify API (typically 'https://api.apify.com').

API_PUBLIC_BASE_URL

API_PUBLIC_BASE_URL: 'APIFY_API_PUBLIC_BASE_URL'

Public URL of the Apify API accessible from external networks.

DEDICATED_CPUS

DEDICATED_CPUS: 'APIFY_DEDICATED_CPUS'

Number of dedicated CPU cores allocated to the Actor based on memory allocation.

DEFAULT_BROWSER_PATH

DEFAULT_BROWSER_PATH: 'APIFY_DEFAULT_BROWSER_PATH'

File system path to the default browser executable for web scraping.

DISABLE_BROWSER_SANDBOX

DISABLE_BROWSER_SANDBOX: 'APIFY_DISABLE_BROWSER_SANDBOX'

Set to '1' to disable browser sandbox mode for compatibility with containerized environments.

DISABLE_OUTDATED_WARNING

DISABLE_OUTDATED_WARNING: 'APIFY_DISABLE_OUTDATED_WARNING'

Set to '1' to suppress warnings about outdated SDK versions.

FACT

FACT: 'APIFY_FACT'

Fun fact about the Apify platform displayed during Actor startup.

HEADLESS

HEADLESS: 'APIFY_HEADLESS'

Set to '1' to run browsers in headless mode without graphical interface.

INPUT_SECRETS_PRIVATE_KEY_FILE

INPUT_SECRETS_PRIVATE_KEY_FILE: 'APIFY_INPUT_SECRETS_PRIVATE_KEY_FILE'

Path to the private key file used for decrypting secret input values.

INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE

INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE: 'APIFY_INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE'

Passphrase for unlocking the private key file used for secret decryption.

IS_AT_HOME

IS_AT_HOME: 'APIFY_IS_AT_HOME'

Set to '1' when the Actor is running on official Apify platform infrastructure.

LOCAL_STORAGE_DIR

LOCAL_STORAGE_DIR: 'APIFY_LOCAL_STORAGE_DIR'

Local file system directory path where Actor data and storage is persisted.

LOG_FORMAT

LOG_FORMAT: 'APIFY_LOG_FORMAT'

Logging output format: 'pretty' for human-readable, 'json' for structured logs.

LOG_LEVEL

LOG_LEVEL: 'APIFY_LOG_LEVEL'

Minimum logging level: 'DEBUG', 'INFO', 'WARNING', 'ERROR' in ascending order.

MAX_USED_CPU_RATIO

MAX_USED_CPU_RATIO: 'APIFY_MAX_USED_CPU_RATIO'

Maximum CPU utilization ratio (0.0-1.0) that the Actor should not exceed.

META_ORIGIN

META_ORIGIN: 'APIFY_META_ORIGIN'

How the Actor run was initiated: 'WEB', 'API', 'SCHEDULER', 'TEST', etc.

METAMORPH_AFTER_SLEEP_MILLIS

METAMORPH_AFTER_SLEEP_MILLIS: 'APIFY_METAMORPH_AFTER_SLEEP_MILLIS'

Milliseconds to wait before Actor metamorphosis (transformation) occurs.

PERSIST_STATE_INTERVAL_MILLIS

PERSIST_STATE_INTERVAL_MILLIS: 'APIFY_PERSIST_STATE_INTERVAL_MILLIS'

Interval in milliseconds for automatic state persistence (default: 60000ms).

PERSIST_STORAGE

PERSIST_STORAGE: 'APIFY_PERSIST_STORAGE'

Set to '1' to persist Actor storage data after run completion.

PROXY_HOSTNAME

PROXY_HOSTNAME: 'APIFY_PROXY_HOSTNAME'

Hostname for Apify Proxy service (typically 'proxy.apify.com').

PROXY_PASSWORD

PROXY_PASSWORD: 'APIFY_PROXY_PASSWORD'

Authentication password for accessing Apify Proxy services.

PROXY_PORT

PROXY_PORT: 'APIFY_PROXY_PORT'

TCP port number for connecting to Apify Proxy (typically 8000).

PROXY_STATUS_URL

PROXY_STATUS_URL: 'APIFY_PROXY_STATUS_URL'

URL endpoint for retrieving Apify Proxy status and connection information.

PURGE_ON_START

PURGE_ON_START: 'APIFY_PURGE_ON_START'

Set to '1' to clear all local storage before Actor execution begins.

SDK_LATEST_VERSION

SDK_LATEST_VERSION: 'APIFY_SDK_LATEST_VERSION'

Latest available version of the Apify SDK for update notifications.

SYSTEM_INFO_INTERVAL_MILLIS

SYSTEM_INFO_INTERVAL_MILLIS: 'APIFY_SYSTEM_INFO_INTERVAL_MILLIS'

Interval in milliseconds for sending system resource usage information.

TOKEN

TOKEN: 'APIFY_TOKEN'

API authentication token of the user who initiated the Actor run.

USER_ID

USER_ID: 'APIFY_USER_ID'

Unique identifier of the user who started the Actor (may differ from Actor owner).

USER_IS_PAYING

USER_IS_PAYING: 'APIFY_USER_IS_PAYING'

Set to '1' if the user who started the Actor has an active paid subscription.

WORKFLOW_KEY

WORKFLOW_KEY: 'APIFY_WORKFLOW_KEY'

Unique identifier for grouping related Actor runs and API operations together.