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

# Apify Run Actor: Inputs, Cost & CLI Example

> Running an Apify Actor asynchronously when you need non-blocking execution and can check later. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=apify_run_actor:{"actorId":"{{actorId}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name              | Type      | Required | Default | Description |
| ----------------- | --------- | -------- | ------- | ----------- |
| `payload.actorId` | `string`  | Yes      |         |             |
| `payload.input`   | `unknown` | No       |         |             |
| `payload.params`  | `object`  | No       |         |             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Apify run actor input.",
    "properties": {
      "actorId": {
        "type": "string"
      },
      "input": {},
      "params": {
        "type": "object",
        "properties": {
          "timeout": {
            "type": "number"
          },
          "memory": {
            "type": "number"
          },
          "build": {
            "type": "string"
          },
          "maxItems": {
            "type": "number"
          },
          "waitForFinish": {
            "type": "number"
          },
          "webhooks": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "required": [
      "actorId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "run": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "defaultDatasetId": {
                    "type": "string"
                  },
                  "defaultKeyValueStoreId": {
                    "type": "string"
                  },
                  "defaultRequestQueueId": {
                    "type": "string"
                  },
                  "startedAt": {
                    "type": "string"
                  },
                  "finishedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "status",
                  "defaultDatasetId",
                  "defaultKeyValueStoreId",
                  "defaultRequestQueueId",
                  "startedAt",
                  "finishedAt"
                ],
                "additionalProperties": true
              },
              "runId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              }
            },
            "required": [
              "run",
              "runId",
              "defaultDatasetId",
              "defaultKeyValueStoreId",
              "defaultRequestQueueId"
            ],
            "additionalProperties": true
          },
          "meta": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute apify_run_actor --payload '{
  "actorId": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0` per pricing unit.
* Billing mode: `post_deduct`.
