apify.startTask starts a saved Apify task and returns its initial run state.
Example
automations/apify-start-task.automation.ts
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Starts a saved Apify task and returns its initial run state.
apify.startTask starts a saved Apify task and returns its initial run state.
import { automation, onHttpRequest } from "automate.ax"
import { apify } from "automate.ax/apify"
export default automation("Start task", () => {
onHttpRequest({ scope: "automation" })
apify.startTask({
taskId: "username/task-name",
input: { maxRequestsPerCrawl: 100 },
})
})
| Field | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID or username/name reference. |
input | Record<string, JSON> | No | Properties that override the task’s saved input. |
build | string | No | Build tag or number. |
maxItems | number | No | Maximum paid dataset items. |
maxTotalChargeUsd | number | No | Maximum total charge in US dollars. |
memoryMbytes | number | No | Power-of-two memory from 128 to 32768 MB. |
restartOnError | boolean | No | Restart after a container error. |
timeoutSecs | number | No | Maximum run time; 0 disables the timeout. |