Skip to content

Commit

Permalink
feat: Add Actor environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jirimoravcik committed Jul 18, 2023
1 parent a98bc0f commit 23d9b92
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ The Actor's process has several environment variables set to provide it with con

| Environment Variable | Description |
|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `APIFY_ACTOR_ID` | ID of the Actor. |
| `APIFY_ACTOR_RUN_ID` | ID of the Actor run. |
| `APIFY_ACTOR_BUILD_ID` | ID of the Actor build used in the run. |
| `APIFY_ACTOR_BUILD_NUMBER` | Build number of the Actor build used in the run. |
| `APIFY_ACTOR_TASK_ID` | ID of the Actor task. It's empty if Actor is run outside of any task, e.g. directly using the API. |
| `APIFY_ACTOR_EVENTS_WS_URL` | Websocket URL where Actor may listen for events from Actor platform. See [documentation](/sdk/js/api/apify/class/PlatformEventManager) for more information. |
| `APIFY_DEFAULT_DATASET_ID` | ID of the dataset where you can push the data. |
| `APIFY_DEFAULT_KEY_VALUE_STORE_ID` | ID of the key-value store where the Actor's input and output data are stored. |
| `APIFY_DEFAULT_REQUEST_QUEUE_ID` | ID of the request queue that stores and handles requests that you enqueue. |
| `APIFY_INPUT_KEY` | The key of the record in the default key-value store that holds the Actor input. Typically it's **INPUT**, but it might be something else. |
| `ACTOR_ID` | ID of the Actor. |
| `ACTOR_RUN_ID` | ID of the Actor run. |
| `ACTOR_BUILD_ID` | ID of the Actor build used in the run. |
| `ACTOR_BUILD_NUMBER` | Build number of the Actor build used in the run. |
| `ACTOR_TASK_ID` | ID of the Actor task. It's empty if Actor is run outside of any task, e.g. directly using the API. |
| `ACTOR_EVENTS_WEBSOCKET_URL` | Websocket URL where Actor may listen for events from Actor platform. See [documentation](/sdk/js/api/apify/class/PlatformEventManager) for more information. |
| `ACTOR_DEFAULT_DATASET_ID` | ID of the dataset where you can push the data. |
| `ACTOR_DEFAULT_KEY_VALUE_STORE_ID` | ID of the key-value store where the Actor's input and output data are stored. |
| `ACTOR_DEFAULT_REQUEST_QUEUE_ID` | ID of the request queue that stores and handles requests that you enqueue. |
| `ACTOR_INPUT_KEY` | The key of the record in the default key-value store that holds the Actor input. Typically it's **INPUT**, but it might be something else. |
| `APIFY_HEADLESS` | If set to **1**, the web browsers inside the Actor should run in headless mode because there is no windowing system available. |
| `APIFY_IS_AT_HOME` | Is set to **1** if the Actor is running on Apify servers. |
| `APIFY_MEMORY_MBYTES` | Indicates the size of memory allocated for the Actor run, in megabytes. It can be used by Actors to optimize their memory usage. |
| `ACTOR_MEMORY_MBYTES` | Indicates the size of memory allocated for the Actor run, in megabytes. It can be used by Actors to optimize their memory usage. |
| `APIFY_PROXY_PASSWORD` | The [Apify Proxy](../../../proxy/index.md) password of the user who started the Actor. |
| `APIFY_STARTED_AT` | Date when the Actor was started. |
| `APIFY_TIMEOUT_AT` | Date when the Actor will time out. |
| `ACTOR_STARTED_AT` | Date when the Actor was started. |
| `ACTOR_TIMEOUT_AT` | Date when the Actor will time out. |
| `APIFY_TOKEN` | The API token of the user who started the Actor. |
| `APIFY_USER_ID` | ID of the user who started the Actor. Note that it might be different than the owner of the Actor. |
| `APIFY_CONTAINER_PORT` | TCP port on which the Actor can start an HTTP server to receive messages from the outside world. See [Container web server](../../running/index.md) section for more details. |
| `APIFY_CONTAINER_URL` | A unique public URL under which the Actor run web server is accessible from the outside world. See [Container web server](../../running/index.md) section for more details. |
| `ACTOR_WEB_SERVER_PORT` | TCP port on which the Actor can start an HTTP server to receive messages from the outside world. |
| `ACTOR_WEB_SERVER_URL` | A unique public URL under which the Actor run web server is accessible from the outside world. |


Dates are always in the UTC timezone and are represented in simplified extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), e.g. **2022-07-13T14:23:37.281Z**.
Expand Down

0 comments on commit 23d9b92

Please sign in to comment.