Documentation of Apify actors - serverless computing jobs that enable execution of long-running web scraping and automation tasks in the cloud.
Apify actors can accept input and generate output. Both input and output are stored in a key-value store in the actor's
apify_storage/key_value_stores/default directory. They are created when the actor is started and can be found under the
OUTPUT keys, respectively.
Note that the actor can store other values such as crawling results or screenshots of web pages under arbitrary keys.
The key-value store associated with an actor run can be conveniently accessed using the
setValue() functions provided by the
apify NPM package. Internally, these functions read the ID of the key-value store from the
APIFY_DEFAULT_KEY_VALUE_STORE_ID environment variable. They then access the key-value store using the Apify API.
For more details about the key-value stores, visit the Storage section.
There are three ways to pass input to an actor