Skip to main content
Version: 3.1

Accept user input

This example accepts and logs user input:

import { Actor } from 'apify';

await Actor.init();

const input = await Actor.getInput();

await Actor.exit();

To provide the Actor with input, create a INPUT.json file inside the "default" key-value store:


Anything in this file will be available to the Actor when it runs.

To learn about other ways to provide an Actor with input, refer to the Apify Platform Documentation.