> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Start task

> Starts a saved Apify task and returns its initial run state.

`apify.startTask` starts a saved Apify task and returns its initial run state.

## Example

```ts automations/apify-start-task.automation.ts theme={null}
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 },
  })
})
```

## Inputs

| 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.      |

## Output

Returns the created Actor run with status, storage IDs, timestamps, options, and usage.

The action does not wait for completion. Input properties override, rather than replace, the task's saved input. Starting the task again creates another run.
