Use the Apify CLI from KosmoKrator to call Apify tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Apify can be configured headlessly with `kosmokrator integrations:configure apify`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure apify --set api_token="$APIFY_API_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor apify --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API tokenapi_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
api_token
APIFY_API_TOKEN
Secret secret
yes
API Token
url
APIFY_URL
URL url
no
Apify API URL
Call Apify Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Apify.
apify.apify_run_actor
Write write
Run an Apify actor. Provide the actor ID and input configuration to start a new run. Returns the run details including run ID and status. Use apify_get_run to check progress.
Get details and status of an Apify actor run. Returns the run status (READY, RUNNING, SUCCEEDED, FAILED, ABORTED, TIMING-OUT, TIMED-OUT), output dataset ID, and other metadata.
List Apify actors available to the authenticated user. Returns actor names, IDs, descriptions, and versions. Supports pagination with offset and limit.
Get details of a specific Apify actor, including its description, input schema, default run options, and available versions. Use this to understand what input an actor requires before running it.
Get details of a specific Apify dataset, including its item count, size, name, and associated actor run. Use apify_get_dataset_items to retrieve the actual data.
Retrieve items from an Apify dataset. Supports JSON, CSV, and other formats. Use this to get the results from completed actor runs. Datasets are referenced by ID from run results.
List Apify key-value stores accessible to the authenticated user. Key-value stores hold actor outputs like screenshots, PDFs, or JSON results. Supports pagination.
Get a record from an Apify key-value store by its key. Common keys include "OUTPUT" for actor results, "SCREENSHOT" for page screenshots, or custom keys set by actor runs.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
apify.apify_run_actor
Run an Apify actor. Provide the actor ID and input configuration to start a new run. Returns the run details including run ID and status. Use apify_get_run to check progress.
The actor ID (e.g., "apify/web-scraper", "apify/cheerio-scraper") or numeric ID.
input
object
yes
The input configuration for the actor run. Structure depends on the specific actor.
build
string
no
Actor build to use (e.g., "latest", "beta"). Defaults to the latest build.
waitForFinish
integer
no
Maximum seconds to wait for the run to finish (0–300). Defaults to 0 (return immediately).
timeout
integer
no
Timeout for the actor run in seconds. Overrides the actor's default timeout.
memory
integer
no
Memory allocation in megabytes (128, 256, 512, 1024, 2048, 4096, 8192). Overrides the actor's default.
apify.apify_get_run
Get details and status of an Apify actor run. Returns the run status (READY, RUNNING, SUCCEEDED, FAILED, ABORTED, TIMING-OUT, TIMED-OUT), output dataset ID, and other metadata.
List Apify actors available to the authenticated user. Returns actor names, IDs, descriptions, and versions. Supports pagination with offset and limit.
Maximum number of actors to return (default: 20, max: 1000).
apify.apify_get_actor
Get details of a specific Apify actor, including its description, input schema, default run options, and available versions. Use this to understand what input an actor requires before running it.
Maximum number of datasets to return (default: 20, max: 1000).
apify.apify_get_dataset
Get details of a specific Apify dataset, including its item count, size, name, and associated actor run. Use apify_get_dataset_items to retrieve the actual data.
Retrieve items from an Apify dataset. Supports JSON, CSV, and other formats. Use this to get the results from completed actor runs. Datasets are referenced by ID from run results.
List Apify key-value stores accessible to the authenticated user. Key-value stores hold actor outputs like screenshots, PDFs, or JSON results. Supports pagination.
Maximum number of stores to return (default: 20, max: 1000).
apify.apify_get_record
Get a record from an Apify key-value store by its key. Common keys include "OUTPUT" for actor results, "SCREENSHOT" for page screenshots, or custom keys set by actor runs.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.